L
Larry Brindise
I have a project that raises a print dialog so the user
can select a printer and click "OK".
I have included a snippet of code. When the "real"
project gets to the
DialogResult = dlg.ShowDialog()
statement, you can see the dialog flash instantly, then
the code immediately drops to the next statement without
giving the user the opportunity to hit any button. The
result is always "cancel". (Not very useful!)
I have copied this code to a "test" project with a single
form/button. When I run this code in the "test" project,
it works as expected - the dialog box remains until the
user makes a selection.
What can I look for in my project that would be causing
the bad behavior in the "real" project? A review of
available properties of the DialogResult does not reveal
anything obvious to me.
Thanks,
-Larry
VB.NET Framework 1.0, CODE>>>>>>
Dim dlg As New PrintDialog()
AddHandler p_doc.PrintPage, AddressOf p_doc_PrintPage
dlg.Document = p_doc
dlg.AllowPrintToFile = False
Dim DialogResult As New System.Windows.Forms.DialogResult
()
DialogResult = dlg.ShowDialog()
'see box for < 1 second and instantly DialogResult
= "cancel" value!!!
can select a printer and click "OK".
I have included a snippet of code. When the "real"
project gets to the
DialogResult = dlg.ShowDialog()
statement, you can see the dialog flash instantly, then
the code immediately drops to the next statement without
giving the user the opportunity to hit any button. The
result is always "cancel". (Not very useful!)
I have copied this code to a "test" project with a single
form/button. When I run this code in the "test" project,
it works as expected - the dialog box remains until the
user makes a selection.
What can I look for in my project that would be causing
the bad behavior in the "real" project? A review of
available properties of the DialogResult does not reveal
anything obvious to me.
Thanks,
-Larry
VB.NET Framework 1.0, CODE>>>>>>
Dim dlg As New PrintDialog()
AddHandler p_doc.PrintPage, AddressOf p_doc_PrintPage
dlg.Document = p_doc
dlg.AllowPrintToFile = False
Dim DialogResult As New System.Windows.Forms.DialogResult
()
DialogResult = dlg.ShowDialog()
'see box for < 1 second and instantly DialogResult
= "cancel" value!!!