I am creating an GUI using winforms in C#, all the controls have numerous events. I would like to know which of these events are being fired and when. One way would be to put debug statements on each of the event handlers but that would require too much work. Is there any way of doing this in Visual Studio 2008/2010 or are there any tool...
Hi Guys,
I wonder if there is anyone who can help me?
The issue I have is a windows form TabPage stealing focus upon form re-activation. The form has a TabControl with four or five TabPages. Each tab page has many various controls.
The scenario is as follows:
A user tabs through a few controls on the first TabPage and a new form is sp...
My users want to be able to print a report I've designed in VS 2010, directly, rather than doing through the process of previewing the report. I've designed the report in VS 2010, using the report designer there, which has created a .rdlc file. I'm using the following MSDN walkthrough as an example, for my code:
http://msdn.microsoft....
The concept of a splash screen doesn't strike me as something that should be so complicated, but I'm having trouble getting the whole splash screen painted.
Let's say I have two System.Windows.Forms.Forms: RealForm and SplashScreen. The RealForm contains the initial GUI. During the RealForm's loading process (that is, in the event han...
I've got the following situation,
Private Sub MyButton_Click(sender as Object, args as EventArgs) Handles MyButton.Click
Me.pleaseWaitFrm = New PleaseWaitForm()
' Fire up new thread to do some work in (AddressOf DoMyWork)
Me.pleaseWaitFrm.ShowDialog()
End Sub
Private Sub DoMyWork()
Dim log = Me.DoTheActualWork()
Me.p...
Is there any explanation of the sequence of events that occurs in the creation, manipulation, and closing of System.Windows.Forms's various forms and components? Is there an explanation of all possible hooks that I can override and the order they are called in and what happens in between their calling?
I've run into so many avoidable p...
I have a LINQ query I wish to run and drop the result into a var or IQueryable. However, I'm binding the result to multiple (4 to 10) controls and only want the query to run once.
When I just put the result into all the datasource values, the query runs for every control and the controls (comboboxes, for example), change selectedvalue...
EDITED:
When I load a form dynamically inside another form or container control, the editing behaviour of all the form's components is different. Text editing, in a TextBox or ComboBox, does not allow me to select partial text with the mouse, though I can double click to select all the text in the control.
FormChild form = new For...
What happens here is when in the form opens, it shows the contextMenu and display the DataGridView on it with the value of dataSet1. But when I click the button to change the DataSource of the Grid, it doesn't show the records of dataSet2.
private void Form1_Load(object sender, EventArgs e)
{
SetDataSource(dataSet1);// A populated D...
I'm just trying to run a new thread each time a button click even occurs which should create a new form. I tried this in the button click event in the MainForm:
private void button1_Click(object sender, EventArgs e)
{
worker1 = new Thread(new ThreadStart(thread1));
worker2 = new Thread(new ThreadStart(thread2));
worker1.S...
Using C# winforms, i want to create custom controls that looks like the real ones.
There are a lot of classes that can be used to draw controls that looks like the real ones: ControlPaint, VisualStyleRenderer, ButtonRenderer, CheckBoxRenderer, ComboBoxRenderer, GroupBoxRenderer, ProgressBarRenderer, RadioButtonRenderer, ScrollBarRendere...
I have this Windows Forms application with a simple balloon tooltip. Depending on the application's window location on the desktop and the mouse cursor location, the balloon 'tip' (or balloon pointing arrow) may or may not be pointing to the location I want.
For instance, my app snaps to the desktop sides and when it's snapped to the ri...
I have a number of buttons on my frame and I want to show which one is selected by showing a background color. The only problem is that this background color is only visible when the mouse is hovering over the button, otherwise the button will be clear white.
Overriding the MouseEnter and MouseLeave events didn't help.
The button is in...
I basically have the same issue as this question: Embed multiple icons in WPF EXE
My .NET 2.0 WinForms application currently has this when you click "Change Icon" in explorer:
What I would like to see, and with some hacking about as suggested by the above article I get this:
However the process of getting there all of the version ...
I have created alot of stored procedures in my application that return the result of a query in a datatable object. I never use a dataset. Why would I ever use a dataset over simply returning the result of a query as a datatable object?
...
I have a UserControl which contains 3 labels. I want to make an event for it, which occurs when the text of one of the labels changed.
I am using Visual Studio 2010
...
OK so here is what I'm doing -- I want to write a .net app that redirects standard out / in to a richtextbox. I've got it working pretty well, but once I add standard input into the mix my read commands freeze up. Here is the relevant code from within my form.
Shell = new Process();
Shell.StartInfo.FileName = "cmd";
...
Lets say i have a text file with following content:
Hello!
How are you?
I want to call the file via a simple application that produces an output file with the following contents:
buildLetter.Append("Hello!").AppendLine();
buildLetter.Append("How are you?").AppendLine();
As you see, every line should be put between " ".
Any h...
Is it possible to use style for .net winform control ?
...
I'm using configuration manager in the simplest way:
Read:
ConfigurationManager.AppSettings["Foo"]
Write:
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["Foo"].Value = value;
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("a...