winforms

Recommendations for C# controls that can be used to create a hierarchical list of prioritised items?

I need to be able to display and edit a hierarchical list of tasks in a C# app. It can either be a Windows form app, or ASP.NET. Basically, I want similar behaviour to the way Microsoft Project handles tasks. The control would need to: 1) Maintain a list of items made up of several fields 2) Each item can have a number of children (a...

this.Width=30; NOT WORKING!

Hi All, I've been doing this for years. But now it's just not working. private void Form1_Deactivate(object sender, EventArgs e) { this.Size = new Size(30, 29); txt.Visible = false; lbl.Visible = false; } The form just does not change Width. But, as above, the 3 controls DO become i...

How can I make a changing numerical value for a taskbar icon in C#?

I'm trying to make a program in C# that monitors the processor time of an application. I'd like to have a feature in this program where the task-bar icon is actually a number representing the processor time (like what coretemp has). How would I go about doing something like this? ...

Best way to implement some type of ITaggable interface

I've got a program I'm creating that reports on another certain programs backup xml files. I've gotten to the point where I need to implement some type of ITaggable interface - but am unsure how to go about it code wise. My idea is that each item (BackupClient, BackupVersion, and BackupFile) should implement an ITaggable interface for h...

Check Form for child Forms - C#

I have main form and some other forms, that can be shown by controls, placed on the main form, using ShowDialog(control). Also I have event handler on the main form, that can be handled anytime. How can I check inside it, is there any other dialog forms? ...

Alternative Button controls for winform?

Where can I find alternative button controls for vb.net Winform? ...

How to check whether the form has any ShowDialog() forms open?

I have a form MainForm with several properties/methods that are accessed from another thread. At some point I might open a form AuxForm with ShowDialog() and then while that modal form is open, the other thread still modifies the MainForm's properties. This is all desired. In one of the methods accessed from another thread I need to ...

Mouse forward/back shortcuts in winforms webbrowser

Hi, Does anyone know how I could make a mouse's back and forward shortcut buttons work within a System.Windows.Forms.WebBrowser control? /T ...

Regex to replace tr tag with th tag anywhere in html file.

What should be the regex for replacing a tr tag with a th tag for the table tag anywhere in an HTML file ? ...

how to draw nonscrollable elements on ScrollableControl

I have ScrollableControl inheritor and i want to draw elements (like header) which are not scrollable during scrolling. Is there any solution? ...

Windows retaining drag-drop cursor

I've got a strange issue that I'm hoping someone might have experienced/have some suggestions on. I'm using a 3rd party library (GoDiagram), which having reflected it briefly I don't think is the cause of the problem. What happens is that I drag a file onto a background canvas which inherits from the Control class. At the point of dragg...

Update Multiple Tables at a Time - SQL Server/T-SQL

I have two tables, Customer and CustomerPhone. Single record in Customer can have multiple CustomerPhone records. As you see in the image below, Phone and Fax resides in CustomerPhone table whereas the rest of the fields resides in Customer table. If user want to edits a customer record, obviously i will have to update the record in Cus...

Fast way to code forms in C# which is bind to SQL data

I am coming from MS-ACESS world and their programing habits, There was nice utility to make form from table, You can simply hit right click on table and make form for it. Now I looking for something similar for Visual Studio and WinForms. I am trying to develop simple application for which I need to have more then 30 forms for handling d...

Text property in a UserControl in C#

I have a control with a inner TextBox. I want to make a direct relationship between the Text property of the UserControl and the Text property of the TextBox. The first thing I realized is that Text was not being displayed in the Properties of the UserControl. Then I added the Browsable(true) attribute. [Browsable(true)] public override...

Can I use notepad++ exe in my application ?

I am parsing html file with the help of the html agility pack to extract the table data from the html file. But there is some html files where there is no ending tags which is optional or there is no starting tag which is also optional.So html agility pack does not parse that html page properly.If I open the content of that html file in ...

Is there a way to organize a icon collection to allow for easy searching?

Is there any way of organizing a icon collection so that it easier to find needed icons? For example: the program needs a save icon there are 5 icons collections on your HD that have a save icon and there are 5 more collections that don't have a save icon (but you don't know that) do you browse through each icon collection? run a se...

Send message to all running instance of windows app

I have a windows application which is published on a website and can be installed by users using 'Click once' method. I have several users, who will be working on the app at any given point of time. I'm thinking of implementing a Messaging system, wherein system administrator can broadcast messages to all the currently running instance...

.NET Vertical Scrollbar not Respecting Maximum Property

I have a form and have dropped a vertical scrollbar on it. Whatever I set the "Maximum" property to, the scrollbar will only scroll up to that value minus 9. Why is that? I'm using C# in Visual Studio 2008. (WinForms) ...

C# input dialog as a function.

In C#, I would like to create a function (method) that has the following behavior: When called, create and show a form. Wait for the user to enter or select a value on the form. Return the selected value. Is there a concise, readable way to implement this function? ...

ComboBox SelectedItem vs SelectedValue

The following code works as you’d expect — MyProperty on the model is updated when the user picks a new item in the dropdown. comboBox1.DataBindings.Add("SelectedValue", myModel, "MyProperty", true, DataSourceUpdateMode.OnPropertyChanged); The following, however, doesn’t work the same way and the model update isn’t triggered until the...