winforms

Accessing HTML DOM from Mono's webbrowser control?

...

Windows Forms: DataGridView Binding Question

I have a Winform DataGridView, which has a number of predefined columns. Now I have an array of objects (the object structure conforms to the defined gridview columns) and I want to bind the gridview to this array (with gridview.datasource = array) The problem is now, that I get several new columns in the grid after the predefined colum...

IComponentChangeService events don't fire when Property Value is modified

I am working on a WinForms designer hosting project. All controls that will be dropped on the DesignSurface are custom controls that inherit from existing controls. My DropDownListControl: [Serializable] [ToolboxBitmap(typeof(System.Web.UI.WebControls.DropDownList))] [ListControlSerializerAttribute("asp", "DropDownList")] public clas...

How do I prevent prerequisite files from being duplicated in the app deployment folder?

I have a .NET 3.5 SP1 WinForms application. I have set it up for ClickOnce deployment with the following settings: Publish to location: \\fileserver\installers\myapp\ Prerequisites: Windows Installer 3.1, .NET Framework 3.5 SP1 Download prerequisites from the following location: \\fileserver\installers\common\ Application is availab...

Getting value of NumericUpDown moves caret position, can I stop this?

I've noticed that when I request the Value of a NumericUpDown control in a C# app, the caret is reset to position 0. This is annoying because my app is periodically grabbing the value of the control, so if this happens while a user is typing into it the caret unexpectedly moves, messing with their input. Is there a way to prevent this, ...

Help debug a stackoverflow - next steps with repeating stack?

Folks, I've got a stack overflow in my .net 4.0 app. using WinDbg I've found the following chunk of stack-info repeated 110 times (with different memory addresses of course), which leads me to believe that this is the case of the overflow. The issue is that none of this seems like my code! Any suggestions on how to proceed with debug...

Change icon on InputBox

I changed the main icon used on a WinForms project. I updated the icon in project properties, and also the icon property on a number of forms in the project. However, when I display a InputBox the old project icon is still displayed in the task bar for the input box. string userInput = Interaction.InputBox("Enter Your Favorite Color...

Winforms Combobox SelectedValue is Null

Hi Everyone- I have a data entry form that had several comboboxes on it. Each of the combo boxes has its own binding source and it is populating correctly when I launch the form. However, if I edit the record on the form and try to pass to the database the updated selectedvalue from the combobox I get an error that the value I am pass...

Design to Dynamically create buttons/menu in WinForms

This is more of a design question. The requirement is to have a winform with multiple buttons. Each button may either open another form with multiple buttons or open a function form e.g. add orders etc. So basically we have menu forms (made up of buttons) and function forms (the functionality the app provides). Because this is a produc...

Writing in notepad with keyboard application

Keyboard simulator ، Like Like On-Screen Keyboard how to make Like "On-Screen Keyboard " ? ...

When is a click event raised?

Looking at the MSDN documentation, it is not quite clear to me when a click event is raised. What is the order? is it: mousedown, mouseup, click? Thanks ...

ComboBox.MaxDopDownItems is not working when adding items using the Click event

I am populating the ComboBox items with a list using the Click event. When it is already populated the MaxDropDownItems is not working. Does anyone know how to fix this one? Here's the code: List<string> list = new List<string>(); ComboBox cb; private void button1_Click(object sender, EventArgs e) { cb = new Comb...

How to allow user to drag a dynamically created control at the location of his choice

I am creating an application where I need to generate dynamically created controls say textbox or label etc. Now what I that user can relocate that textbox to his desired location. Like we do in Visual Studio. One way is to get new location by getting values from him using textbox. But I want the user interface easy. Can we have such...

How to take the date automaticaly from the xtrascheduler to an other form

hii I am using devexpress xtrascheduler in that i need to get the date n the next form while clickin on a particular date on the xtrascheduler for example if i am clicking on a cell having date 02-06-2010 then when an other form is opening it shud take that date...Is it possible..help me please ...

How do I access the existing running windows forms application through url?

I have a windows forms application and which provides a way to search the database based on the provided value. Sometime I need to open the application through a simple html hyperlink with the search result while loading itself. There are two questions/doubts from here. How to access the existing running windows forms application as ur...

Exception Production in os vista

Why make an exception in the code is not : try { FileIOPermission FIP = new FileIOPermission(FileIOPermissionAccess.Write, @"c:\SD.txt"); FIP.Demand();//Exception must rise here StreamWriter SW = new StreamWriter(@"c:\SD.txt");//but Exception rise here SW.Write(textBox1.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } ...

Why is my C# application code not working with my GUI?

Ok so I am adding on to my last project, where I created a shark race. Everything ran smoothly, and then it got fancy. Here are the requirements: 1) Declare all of the instance variables to be public properties defined with get and set accessor methods along with corresponding private backing fields. 2) Remove the MyBet instance variabl...

Memory usage during update label with System.Windows.Forms.Timer control

I have a form with label that is updating by System.Windows.Forms.Timer control every 2 seconds. In task manager i see that memory usage is growing even if program is doing nothing(but label is still updating with latest info, that is memory usage for example) Example code for label text: tlblRam.Text = string.Format("Ram: {0} MB", Conv...

Replace left click behavior by ctrl-click behavior in a datagridview

I would like a DataGridView row selection to behave the same way than when holding the ctrl button down (Click a new row to add to selection, click again to deselect, etc.) But I want it using the left mouse button. Can I set this behaviour or will I have to do it programmatically ? ...

Windows Forms: Progress Bar in a DataGridView column

How can I show progressbars in the cells of a winforms datagridview column? ...