Is it possible to change a Winforms combobox to disable typing into it?
So that it just allows selecting items already inside, but not allow typing/editing the text inside it? ...
So that it just allows selecting items already inside, but not allow typing/editing the text inside it? ...
I've got a list of UserControl objects; when a menu option is clicked to go to another section of the application it does the following: Set the currently displayed usercontrol to visible Clear the main panel's Controls list New up the requested control (if not already created in the list) Add the new control to the main panels' Contro...
Hi there, I've been wondering about this problem for some time - doubleclicking a winforms TabControl's header doesn't get detected, but I'd like to handle this event. It looks like all mouse events (click,move,etc.) don't get raised when they are on the 'inactive' area of TabControl. I've even tried subclassing TabControl, but the de...
i have a databound datagrid in vb.net 2008. This is a program where i use the double click event multipal times.. but for some reason on a new form it's not working anymore. In code behind i selected the datagrid and double click event. when i double click on teh grid in debug mode, it never fires off the event(i put a breakpoint in)....
When designing a form I have the option of putting a close button at the bottom of the form. The form will also have a close form "x" button in the upper right corner of the window as provided by winforms. Based on the principle of "There should be one and preferably only one obvious way to do it" I was thinking the close button should ...
please tell me the use of parameter e as System.EventArgs in CheckChanged event of CheckBox ...
First, sorry for my bad english :) Second, I can know when the form is being moved/resized, using this code: protected override void WndProc(ref Message m) { if (m.Msg == WM_WINDOWPOSCHANGING) { WINDOWPOS winPos = new WINDOWPOS(); winPos = (WINDOWPOS)Marshal.PtrToStructure(m.LParam, typeo...
Hello all How i can represent the following hierarchical data ? What control should be used , if possible example will help. -node -----node1 - -data--data --data -------------node111 -- data -- data -------------node112 -- data -- data -------------node113 -- data -- data -----node2 - -data--data --data -------------node1121 -- data...
I created a console application, but I want to turn it into a windows forms application. I found This and it appeared to be what I needed, but I got an error message when I tried to use using System.Windows.Forms; This is the error message I got: Error 1 The type or namespace name 'Windows' does not exist in the namespace 'Syst...
Amazon has an address correction feature and I want to implement something similar. One problem I ran into is how to create a label that supports different formatting (like in the image). I could plunk down a browser control or a richtextbox control, but that seems like a massive overkill. Is there something simpler? Maybe an imp...
Im using the facebook api to connect to facebook and get my friend list in a c# winforms application. FaceBookService1.ConnectToFacebook(); FriendList.Friends = FaceBookService1.Friends.GetUserObjects(); while those two lines of code get me the list of friends for the logged in user. Im unable to find out which of thos...
I'm updating a WinForms application that uses a BackgroundWorker to do something useful when a button is pressed. The trouble is, "something useful" iterates sequentially through a long list of things to do, and can take quite a while to complete. I'm considering having the button press event create multiple BackgroundWorkers instead o...
If I call textBox.GetLineFromCharIndex(int) in a TextBox with WordWrap = true, it returns the line index as the user sees it (wrapped lines count as multiple lines), not the line according to the line breaks. Line one extends to // <- word wrapped here. // <- logical line 1, GetLineFromCharIndex returns line 2 ...
I'm trying to make my console application into a winforms application. The console version would ask for multiple inputs, then return output. For the winforms version, I want to have multiple text boxes for the user to enter the data, with a button to reset them all, and another to actually perform the calculation. Then there'd be a di...
What's the best method for securing connectionstring information in an app.config file for deployed winforms applications? reference ...
In C# WinForms - I am drawing a line chart in real-time that is based on data received via serial port every 500 ms. The e.Graphics.DrawLine logic is within the form's OnPaint handler. Once I receive the data from the serial port, I need to call something that causes the form to redraw so that the OnPaint handler is invoked. I have tr...
I have one function ParseHtmlTable(string htmlContent). Now in that function I want to pass the content of the html file. Now can I do by writing only filename with its path.Then I have to read that file.But I dont how to read this file ? Then how to open particular file and read the contents of the file and send those contents to par...
Hi, I've tried to embed a .NET WinForms graph (Stephan Zimmermann's Graph Display) in a WPF window, under a WindowsFormsHost (I've referenced both System.Windows.Forms and WindowsFormsIntegration). However, I can see the form panel but not the graph. I've ran the demo application on a windows form and it worked, but when I transfered t...
I have a MDI Windows Forms application and I remind on FormClosing event the user to save, this happens on the parent and child forms. But I would like the program to ask only one time for all the forms when the user tries to exit the application using the parent X button or the Exit Application menu button. I tried with a bool static f...
How can we find how many columns and rows are there in the html file ? How can we count that how many td tags are there in the html file ? ...