showdialog和返回值 [英] showdialog and return values
问题描述
嗨伙计们,
我不知道如何获得第二个对话框的信息,这个对话框出现在
后点击第一个对话框的按钮。
以下情况:
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
''如果我点击确定按钮,设置值为true,将创建pdfreport
如果(saveFileDialog1.ShowDialog()= DialogResult.OK)那么
saveMode = True
否则
saveMode = False
结束如果
第一次运行它运行正常。下次我开始和
点击确定按钮会出现一个新对话框,其中显示消息文件已经存在
存在,覆盖是/否。单击是后,程序在
else模式下运行,因此saveMode var设置为false。
如何查询返回值第二个对话?有什么想法吗?
Joerg
-
电邮: Jo **************** @ IndustrieHansa.de
前***************** ******@volkswagen.de
Hi folks,
Don''t know how to get info about the second dialog which appears after
clicking a button of the first dialog.
following situation:
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
'' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then
saveMode = True
Else
saveMode = False
End If
for the first time running this it works fine. The next time I start and
click the ok button a new dialog appears with a message "File already
exists, Override Yes/No". After clicking yes the programm runs on at the
else mode, so the saveMode var is set to false.
How can I ask for return values of the second dialog? Any idea?
Joerg
--
Email: Jo****************@IndustrieHansa.de
ex***********************@volkswagen.de
推荐答案
嗨Joerg,
我确实看起来很长,但我只看到一个showdialog。
你的消息中是否有遗漏或我看不到的东西(不是
不可能)?
Cor
Hi Joerg,
I did look very long, but I only see one showdialog.
Is there something missing in your message or am I seeing something not (not
impossible)?.
Cor
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
''如果我点击确定按钮,设置值为true,将创建pdfreport
如果(saveFileDialog1.ShowDialog()= DialogResult.OK)那么
saveMode = True
另外
saveMode = False
结束如果
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
'' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then
saveMode = True
Else
saveMode = False
End If
Hello Cor,
>
第二个迪alog我的意思是由系统自动出现(对话框 - 文件
已经存在...覆盖是/否)
Joerg
" Cor" < no*@non.com> schrieb im Newsbeitrag
新闻:O
Hello Cor,
the second dialog I mean appears automatically by system (dialog - "File
already exists ... Override Yes/no")
Joerg
"Cor" <no*@non.com> schrieb im Newsbeitrag
news:O
************** @ TK2MSFTNGP09.phx.gbl ...
**************@TK2MSFTNGP09.phx.gbl...
我看起来很长,但我只看到一个showdialog。
你的消息中是否有遗漏或我看到的东西不是
(不是不可能的)?
Hi Joerg,
I did look very long, but I only see one showdialog.
Is there something missing in your message or am I seeing something not (not impossible)?.
Cor
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog( )如果我点击确定按钮,设置值为true,将创建pdfreport
如果(saveFileDialog1.ShowDialog()= DialogResult.OK)那么
saveMode = True
另外
saveMode = False
结束如果
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
'' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then
saveMode = True
Else
saveMode = False
End If
这篇关于showdialog和返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!