Click here to Skip to main content
15,902,873 members
Home / Discussions / C#
   

C#

 
GeneralGet XmlSchemaElement from XmlSchema by ID Pin
El'Cachubrey13-Jun-05 19:51
El'Cachubrey13-Jun-05 19:51 
QuestionUpdating Excel workbook using C#? Pin
kbalias13-Jun-05 19:29
kbalias13-Jun-05 19:29 
Generalof Open File Pin
Mr. Naveed Butt13-Jun-05 16:10
professionalMr. Naveed Butt13-Jun-05 16:10 
GeneralRe: of Open File Pin
Daniel Monzert13-Jun-05 20:43
Daniel Monzert13-Jun-05 20:43 
Questionhow to compare the text of two html pages Pin
Mohsen Saad13-Jun-05 14:20
Mohsen Saad13-Jun-05 14:20 
Generalconverting byte[] to string Pin
scott987uk13-Jun-05 10:01
scott987uk13-Jun-05 10:01 
GeneralRe: converting byte[] to string Pin
Christian Graus13-Jun-05 14:47
protectorChristian Graus13-Jun-05 14:47 
GeneralC# Modal Dialog returns too quickly Pin
Glenn E. Lanier II13-Jun-05 11:37
Glenn E. Lanier II13-Jun-05 11:37 
I have created a Windows Form that allows the user to enter a couple of file names, and select a couple of checkbox styled options. I have placed "Browse" buttons by the textbox that holds a filename. When Browse is selected, the OpenFileDialog is displayed. This all works like I expect. However, when I select Open in the OpenFileDialog, it runs the additional code in the Browse_Click method, then returns to the calling form. This is not what I want; I only want it to return when the user selects the AcceptButton or the CancelButton.

The code that shows the form in question:
			<br />
formImportDatabase frmImport = new formImportDatabase();<br />
DialogResult dr = frmImport.ShowDialog();<br />
if (DialogResult.OK == dr) // Control returns to this point after the Open button is selected in OpenFileDialog<br />
{<br />
...<br />
}<br />


The Browse_Click code:
<br />
if (DialogResult.OK == openFileDialog.ShowDialog())<br />
{<br />
   textBoxDestinationDB.Text = openFileDialog.FileName;<br />
}	<br />


How can I keep the dialog box displayed until the AcceptButton or CancelButton is selected?

Thanks,
Glenn
GeneralRe: C# Modal Dialog returns too quickly Pin
Christian Graus13-Jun-05 12:33
protectorChristian Graus13-Jun-05 12:33 
GeneralRe: C# Modal Dialog returns too quickly Pin
Glenn E. Lanier II14-Jun-05 4:38
Glenn E. Lanier II14-Jun-05 4:38 
GeneralRe: C# Modal Dialog returns too quickly Pin
Robert Rohde13-Jun-05 19:39
Robert Rohde13-Jun-05 19:39 
GeneralRe: C# Modal Dialog returns too quickly Pin
Glenn E. Lanier II14-Jun-05 4:40
Glenn E. Lanier II14-Jun-05 4:40 
QuestionCan someone point me to some nice clean search and replace code? Pin
ArchKaine13-Jun-05 11:24
ArchKaine13-Jun-05 11:24 
AnswerRe: Can someone point me to some nice clean search and replace code? Pin
Christian Graus13-Jun-05 12:36
protectorChristian Graus13-Jun-05 12:36 
GeneralRe: Can someone point me to some nice clean search and replace code? Pin
Luis Alonso Ramos13-Jun-05 14:16
Luis Alonso Ramos13-Jun-05 14:16 
GeneralRe: Can someone point me to some nice clean search and replace code? Pin
ArchKaine14-Jun-05 11:42
ArchKaine14-Jun-05 11:42 
GeneralRe: Can someone point me to some nice clean search and replace code? Pin
Luis Alonso Ramos14-Jun-05 12:38
Luis Alonso Ramos14-Jun-05 12:38 
GeneralRe: Can someone point me to some nice clean search and replace code? Pin
ArchKaine14-Jun-05 11:45
ArchKaine14-Jun-05 11:45 
GeneralRe: Can someone point me to some nice clean search and replace code? Pin
Christian Graus14-Jun-05 13:52
protectorChristian Graus14-Jun-05 13:52 
Generalfonts Pin
dizzybinty13-Jun-05 11:17
dizzybinty13-Jun-05 11:17 
GeneralRe: fonts Pin
Werdna13-Jun-05 19:26
Werdna13-Jun-05 19:26 
Questiongetting table schema info in ADO .NET? Pin
Jason Manfield13-Jun-05 11:16
Jason Manfield13-Jun-05 11:16 
AnswerRe: getting table schema info in ADO .NET? Pin
Luis Alonso Ramos13-Jun-05 14:20
Luis Alonso Ramos13-Jun-05 14:20 
QuestionIs there a spawnlp function in c#? Pin
adonisv13-Jun-05 10:26
adonisv13-Jun-05 10:26 
AnswerRe: Is there a spawnlp function in c#? Pin
DavidNohejl13-Jun-05 10:59
DavidNohejl13-Jun-05 10:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.