|
-
Sep 4th, 2007, 09:35 AM
#1
Thread Starter
PowerPoster
[RESOLVED] User input
This should be simple. I can create an situation where the user has to input data. No problem. However, I am having a problem figuring out how to do s imple message box with a yes/no button configuration. I can't find an example in any of my manuals.
VB6 code:
Dim PRINTREPLY As VbMsgBoxResult
PRINTREPLY = MsgBox("Print to screen?", vbYesNo)
If PRINTREPLY = vbNo Then
glbPrinterDestination = 1
Else
glbPrinterDestination = 0
End If
That is the kind of thing I am looking to do.
===================================================
If your question has been answered, mark the thread as [RESOLVED]
-
Sep 4th, 2007, 10:01 AM
#2
Thread Starter
PowerPoster
Re: User input
This seems to work:
Dim drClear As MsgBoxResult
drClear = MsgBox("Do you really want to clear the scans?", MsgBoxStyle.YesNo, "Clear scans confirmation")
If drClear = MsgBoxResult.Yes Then
Dim appFullPath As String = appPath '& appFile
System.IO.File.Delete(appFullPath)
Dim file As System.IO.FileStream
file = System.IO.File.Create(appFullPath)
file.Close()
objReader = New StreamReader(appFullPath)
objReader.Close()
MessageBox.Show("Scan file cleared")
End If
===================================================
If your question has been answered, mark the thread as [RESOLVED]
-
Sep 4th, 2007, 10:16 AM
#3
Frenzied Member
Re: [RESOLVED] User input
Hi,
msgbox is retained for VB6 compatibility - take a look at Messagebox.Show instead
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|