Create WinForms ComboBox with non-selectable items
How to create combobox control with non-selectable items? For example, such groupnames or categorynames which visually divide items in dropdownlist into some groups or categories. ...
How to create combobox control with non-selectable items? For example, such groupnames or categorynames which visually divide items in dropdownlist into some groups or categories. ...
I have a winform application that controls some transmitters and sound cards. There is a requirement to be able to provide a web interface for controlling those devices. Currently I use WCF to communicate from the controllers in my asp.net MVC site to the winform app. That works well, but there is now a desire to move the hardware to ...
I would like to have a TextBox that supports AutoComplete and lets users type multiple words separated by a comma or semicolon, offering suggestions for each word. I have a standard TextBox with textBox.AutoCompleteCustomSource.AddRange(new[] { "apple", "banana", "carrot" }); textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; t...
Hi, I'm trying to hijack an existing window and replace it with the contents of a Winforms I own. I figured it would be pretty cool swapping the form's inner handle with the one I want to override, and wondered if anyone ever tried it? Cheers, Florian ...
I have tried the following: private void Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if((Keys) e.KeyValue == Keys.Escape) this.Close(); } ...doesn't work. Then i tried this: protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); if (e.KeyCode == Keys.Escape) this.Close(); } ..still ...
How call Click event on button in WebBrowser control? ...
Hello everyone! I've got a standard TextBox control which I'm trying to have mimic the "soft descriptions" like those found in the title and tags boxes on StackOverflow. Essentially, when the user's focus enters the control, it hides the description ("Username") in this case, and sets alignment and color to be that of a standard text co...
Is it possible to databind 2 properties to 1 control? Specifically, I'm thinking phone numbers. I've got an object where all of the properties are bindable directly to 1 control, but there is an areacode and phonenumber property on the object. My users very much prefer a masked textbox for entering phone numbers as opposed to 2 separate ...
I'm having trouble with my COM component written in .NET throwing warnings that look like: Context 0x15eec0 is disconnected. No proxy will be used to service the request on the COM component. This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the app...
All, I'm currently working on some ListBox customization in order to improve the clearness of my app. Basically, it is quite easy to find 'how to' for this purpose leading to my current result below. I'm happy with the display but ... I faced strange behavior with the mousewheel. I tried to find information on this issue and I found...
How can I make a window always stay on top of another window that already always stays on top? Not that it has to stay on top of all other windows, I just need it to stay on top of a particular window. ...
I am hosting a MediaElement in a WinForms application, which I would like to play both images and video through. My images and video are set as embedded resources to the application. The MediaElement.Source property only accepts a URI. Any ideas on how to get the MediaElement to play the embedded resourece files without writing them...
Hi All I apologise if the title was confusing, it took me nearly 5 minutes to finally think of a title for this one... Okay, you know how in Visual Studio Express when you add a TabControl to the Form, and you can click on the right-arrow on the top right of the TabControl and it will add a new TabPage, or remove one? Well, I'm creati...
Hi, Can I develop a desktop app in VS2008 that can also run on Mac? What approach? That is, if I am developing an application (thick client) that runs on a Windows XP/Vista PC, is there an approach to do this such that I could also run it on a Mac? (e.g. silverlight?) The kind of things my winforms type app needs includes: HttpWeb...
I am writing a packet analysis app using C# and putting the packets coming from network in the datagridview, but once it starts populating, datagrivdview scrolling becomes like shown below in the image and I am unable to score? How I can fix this? Basically the problem is that the data is coming in very fast so maybe it's not able to ha...
When you drag a new Button onto a Windows Form it is automatically assigned the text "button1". If you have a control that inherits button called "CustomButton" then that one is automatically assigned the text "customButton1" when added to a form. Is it possible to make this text default to something else? For example, can I have the te...
I've been looking for a databound control to show some data to the user, who needs to be able to filter and group the output. I've looked at the documentation for the standard DataGridView control, but it doesn't seem to have the drag-and-drop grouping/filtering that I've seen in many apps. For an example, if anyone uses Toad to do SQL ...
I'm using a ButtonRenderer to draw a button in a custom cell. I'd like the button to have a nonstandard BackColor. This is supported by normal buttons, but there's nothing in button cells or ButtonRenderer to support it. How do I draw a button with a nonstandard BackColor? The method has to take the user's theme into account - I can'...
Hi All I've seen many websites AND programs that access the google translation service. I'm trying to create a little app where there are basically 2 TextBox controls and a Button, where you can select a language to translate from and to... But how do I access the API?? I've not found anything so far. Or if anybody knows of any other tr...
Is there a way to have a ToolStripMenuItem not closing when I click a child control (in its DropDrowItems Collection)? In my case, I have some ToolStripMenuItems that work as a check box. Actually, I implemented a radio behavior in some ToolStripMenuItems using their Check property. But I don't want the menu closing when I click any of ...