|
-
Jan 5th, 2004, 02:11 PM
#1
Thread Starter
Lively Member
Using a form to return information
My program copies files from a user's hard drive to a network drive. In one case, the user must decide into which subdirectory a file should go. I want to pop up a form that asks, "Should this file go into subdirectory A?" and give two radio buttons of yes and no and an OK button.
I'd like the popup form to return a 1 if the yes radio button is checked and a 0 if the no radio button is checked so I could use the result in an if statement like:
VB Code:
Dim Frm2 As Form2
Dim dir As String
If Frm2.show().result() Then
dir = "SubdirectoryA"
Else
dir = "SubdirectoryB"
End If
I have Frm2.show().result(), but I don't know what should go there.
Does this make any sense?
-
Jan 5th, 2004, 02:24 PM
#2
-
Jan 5th, 2004, 06:15 PM
#3
Fanatic Member
Couldn't you use a "Save As" dialog control?
-
Jan 5th, 2004, 06:22 PM
#4
Actually on second look wouldn't a normal Msgbox work?
VB Code:
If MsgBox("Should this file go into subdirectory A?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
dir = "SubdirectoryA"
Else
dir = "SubdirectoryB"
End If
-
Jan 6th, 2004, 04:19 PM
#5
Thread Starter
Lively Member
Thanks Edneesis. I broke out in a cold sweat when I looked at your tutorial, but the MsgBox idea was right up my alley.
I am ashamed that I didn't think of it myself.
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
|