Browse by Tags
All Tags » Dialogs » Forms (RSS)
Sorry, but there are no more tags available to filter with.
-
|
It is straightforward. Create an instance of the class and call its ShowDialog method. ColorDialog colorDialog1 = new ColorDialog(); if ( colorDialog1.ShowDialog() != DialogResult.Cancel ) textBox1.ForeColor = colorDialog1.Color; Contributed from George...
|
-
|
It is straightforward. Create an instance of the class and call its ShowDialog method. FontDialog fontDialog1 = new FontDialog(); if ( fontDialog1.ShowDialog() != DialogResult.Cancel ) textBox1.Font = fontDialog1.Font ; Contributed from George Shepherd's...
|
-
|
Below is a technique that uses FolderNameEditor and FolderBrowser classes to implement a solution. You can also use iterop to get a solution. Both the FolderNameEditor and FolderBrowser classes used in this solution are described in the Docs as "This...
|
-
|
In the .NET Framework 1.1 there is a SelectedPath property that will let you do this. Contributed from George Shepherd's Windows Forms FAQ
|
-
|
using System.Text; using System.IO; private string ChooseTextFile( string initialDirectory ) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open text file"; dlg.InitialDirectory = initialDirectory; dlg.Filter = "txt files (*...
|
-
|
You can listen to the Form's Closing event, where you can display a MessageBox as show below: using System.ComponentModel; private void Form1_Closing( object sender, CancelEventArgs e ) { string text = "Do you want to close the application?";...
|
-
|
One way to do this is to maintain a list of opened modeless dialogs, and check this list before you open a new one to see if one is already present. If you open all these modeless dialog's from the same 'main' form, then you can use the OwnedForms...
|
-
|
Use the Form.Deactivate event: Deactivate += new EventHandle( OnDeactivate ); // ... private void OnDeactivate( object s, EventArgs e ) { Close(); } Shawn Burke, Microsoft
|
-
|
You can do this by starting a new thread and executing Application.Run for the status dialog form when the background thread starts running. To communicate changes in percentage use BeginInvoke to executes a specific delegate asynchronously on the thread...
|