winforms

How can I have multiple forms share a common menu in a Winforms app?

I have an existing .NET Winforms app made with a few complex forms, and 1) the forms all live for the life of the app, and 2) only one form is displayed at a time (the user switches between the forms) I need for these forms to share a common menu that will be processed by a single business-logic controller. (The visible form is als...

Red X GUI crash! I almost gave up on solving it!

I am facing a complex bug with the Dundas Charting for Winforms tool used with MS Visual Studio 2008 C#. The following error occurs when a GUI event is raised on the Chart object while it’s invalidating. When the error happens the dundas chart shows a big X mark. ... ************** Exception Text ************** System.ArgumentOutOfRa...

What is the best way in c# to determine whether the programmer is running the program via IDE or it's user?

hi What is the best way in c# to determine whether the programmer is running the program via IDE or it's user? ...

Clearing checkboxes within groupboxes.

I have a form with several groupboxes, each containing controls several checkboxes. I want to clear the checkboxes. I use the following code. However it does not get cleared. What am i doing wrong? foreach (Control ctrl in this.Controls) { if (ctrl is CheckBox) ((CheckBox)(ctrl)).Checked = false; } ...

Triggering an event after a Winform layout is complete.

I am working on a C# WinForm application. I want to trigger some processing once the form has been "shown" and the layout of the form is complete. I am using the "_Shown" event, but this seems to trigger before the layout of the form has completed. Is there event I can use that fires once the layout is complete? ...

Free or Open Source Diagramming Component for Winforms

I need to be able to generate dependency diagrams programmatically. I'd like it to be able to generate a bunch of boxes with labels and connectors linking them, and ideally the component would position them automatically onto a design surface which could then be manually rearranged. I'm using Winforms and C# 2.0 (VS2005). EDIT: Howeve...

Highlight in Listboxes without permitting user selection

Is there a way to highlight an item in a VB.Net listbox without allowing the user to change selection? When I set the selection Mode to "NONE" I can´t select an item in the code. Same when I disable the listbox. ...

Different exception handling in XP and Vista

Hi I have a weird issue. Say you have the following: Application.ThreadException += something; try { Application.Run(new Form1()); } catch (Exception ex) { } Now given an exception happens somewhere in the app, Vista raises the ThreadException event, but XP just jumps straight to the catch block. How do I get the handling to beh...

detect all windows minimized from c# application

how to detect all windows(of other applications) minimized from c# application ...

Is possible to convert the object like button or label placed in the toolstripcontainer?

I have made one function named SetControls(control controlName) which only takes control as a argument.And I want to pass the toolstripbutton which is in the tooltipcontainer.Function SetControls() consider toolstripContainer but does not consider toolstripbutton as control and there is error if I pass the toolstripbutton as control. Th...

WPF - Floating Toolbar

Hi, How can I make a floating toolbar (like the mini font floating toolbar in Word 2007) using WPF? I would like it to appear and disappear from mouse movement over items. Thanks Q ...

How to use C++/CLI to program Winforms applications

Is there a pdf or video or some media that can inform me on how to program Winforms with C++. Obviously C++ is the most common programming language and I already have some prior knowledge. But when I try to find media about programming in C++, the examples are usually Console applications. I want some media that can teach me how to progr...

Winforms - changing form content from one context to another

Hi, I'm an ASP.NET developer who has been assigned a small Winforms application task. I'm doing the following: I have a form with login fields and button After successful login I want to provide the main function of the app. At the moment I'm using two forms - one for login (form1) and one for the main function (form2) - making form2 v...

Data binding an Enum stored in an object into a Winforms ComboBox?

Anyone knows how to do this? I tried this, but it just populates this ComboBox which I already do. What I need is a way to get the combobox updated whenever the enum property on my object changes: DataObject.DataEnum but also get the above Enum updated whenever I change the selected item in the combobox. Is it possible to do this? ...

.NET: TextChanged event for TextBox not always firing, even though KeyUp and KeyDown are firing

I'm running into a very peculiar issue. I noticed that occasionally while typing into my TextBox, I'll lose some keystrokes. I added a bunch of trace statements in events hooked by this TextBox, and I found that when I lost keystrokes, the KeyUp, KeyDown, and KeyPress events all correctly fired, but the TextChanged event never fired. ...

Problem to convert byte array to double

I have a problem to convert an byte array to double array using BitConverter.ToDouble(). Simply my program will select an image then convert the image to byte array. Then it will convert the byte array to double array. The problem that when I convert the byte array to the double I will get this error before the loop finish. (Destinat...

Is Possible to convert the controls to Component or component to control in winforms?

Is Possible to convert the controls to Component or component to control in winforms?And is possible to make transparent the button in winforms? ...

C# Implementation process blocks

In my C# winforms application I need to draw blocks. These blocks are so called process blocks. All the blocks together are a process. There are different kinds of process blocks. At this moment I have three kinds of process blocks: A, B, C. When I draw a process block it looks like this: A B B C A Every block has it's own backgrou...

Highlighting multiple dates in MonthCalender Control in window application

Hi All. i am create a Event Calender using MonthCalender control in window application asp.net can any one tell me how can i highlight multiple dates in MonthCalender thanks in advance ...

Help setting focus on the parent

I have a simple situation (.NET2): a texbox1 on a UserControl1(or Form1). I want to unfocus(leave) the texbox when I click on the usercontrol/form(focus the usercontrol/form instead): I do the following on the UC/form: Protected Overrides Sub OnMouseClick _ (ByVal e As System.Windows.Forms.MouseEventArgs) MyB...