Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : PATH.FRM

 
Output of file : PATH.FRM contained in archive : VINST8.ZIP
VERSION 2.00
Begin Form PathDlg
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "PathDlg"
ClipControls = 0 'False
ControlBox = 0 'False
Height = 3105
Icon = 0
Left = 0
LinkTopic = " "
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2700
ScaleWidth = 6855
Tag = "NOTSTART"
Top = 120
Width = 6975
Begin CommandButton Command2
Caption = "&Exit Setup"
Height = 375
Left = 3480
TabIndex = 2
Top = 2040
Width = 1575
End
Begin CommandButton Command1
Caption = "&Continue"
Default = -1 'True
Height = 375
Left = 1320
TabIndex = 1
Top = 2040
Width = 1575
End
Begin TextBox Text1
BorderStyle = 0 'None
Height = 225
Left = 2550
TabIndex = 0
Text = "TEST TEXT"
Top = 1050
Width = 3735
End
Begin PictureBox Picture1
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 480
Left = 360
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 6
TabStop = 0 'False
Top = 150
Width = 480
End
Begin Label outPath
BackColor = &H00C0C0C0&
Caption = "outPath"
Height = 255
Left = 150
TabIndex = 8
Top = 2010
Visible = 0 'False
Width = 855
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "To quit Setup, choose the Exit button."
Height = 255
Left = 1290
TabIndex = 5
Top = 1560
Width = 3615
End
Begin Label outButton
BackColor = &H00C0C0C0&
Caption = "outButton"
Height = 255
Left = 120
TabIndex = 9
Top = 1590
Visible = 0 'False
Width = 975
End
Begin Label inDrive
BackColor = &H00C0C0C0&
Caption = "inDrive"
Height = 255
Left = 120
TabIndex = 7
Top = 1200
Visible = 0 'False
Width = 735
End
Begin Label Label2
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Install to:"
Height = 255
Left = 930
TabIndex = 4
Top = 1050
Width = 1575
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00C0C0C0&
ForeColor = &H00FF0000&
Height = 675
Left = 1260
TabIndex = 3
Top = 180
Width = 5415
End
End
DefInt A-Z

Option Explicit

Dim mDestPath$

Sub Command1_Click ()

Dim Msg$, Tmp$
Dim MBFlags%


mDestPath$ = Text1.Text


' ----------------------------------------------------
' Make some simplifying assumptions
' ----------------------------------------------------
If Mid$(mDestPath$, 2, 1) <> ":" Then
mDestPath$ = Mid$(mDestPath$, 1, 1) + ":" + Mid$(mDestPath$, 2, Len(mDestPath$) - 1)
End If
inDrive.Tag = mDestPath$


' ----------------------------------------------------
' The IsValidPath function not only returns
' True/False as to whether or not it is a valid
' path, but also reformats the path variable
' into the format, "X:\dir\dir\dir\"
' ----------------------------------------------------
On Error GoTo ErrorSetup

If IsValidPath%(mDestPath$, (inDrive.Tag)) Then
outPath.Tag = mDestPath$
outButton.Tag = "continue"
PathDlg.Hide
Else
' -------------------------------------------------
' Since this is only called from the initial disk
' drive dialog, assume user gave the wrong floppy
' disk.
' -------------------------------------------------
Msg$ = "There is not a readable disk in drive "
Msg$ = Msg$ + UCase$(Left$(Text1.Text, 1))
Msg$ = Msg$ + ". Switching to the other floppy drive."
MBFlags% = MB_OK & MB_ICONEXCLAMATION
MsgBox Msg$, MBFlags%, "DOS ERROR"
If UCase$(Left$(Text1.Text, 1)) = "A" Then
Text1.Text = "B:\"
ElseIf UCase$(Left$(Text1.Text, 1)) = "B" Then
Text1.Text = "A:\"
End If
Text1.SelStart = 0
Text1.SelLength = 3
Text1.SetFocus
Exit Sub
End If

CmdExit:
On Error GoTo 0
Exit Sub

ErrorSetup:
If gCancelCommand% = True Then GoTo CmdExit
Resume CmdExit
End Sub

Sub Command2_Click ()
outButton.Tag = "exit"
PathDlg.Hide
End Sub

Sub Form_Load ()
BackColor = RGB(BKGNDGRAY, BKGNDGRAY, BKGNDGRAY)
gFrameWidth% = DEFAULTWIDTH

' -----------------------------------------------------
' Set fonts based on Windows version
' -----------------------------------------------------
On Error Resume Next
PathDlg.FontName = gFontName$
Command1.FontName = gFontName$
Me.Command2.FontName = gFontName$
Me.Label1.FontName = gFontName$
Me.Label2.FontName = gFontName$
Me.Label3.FontName = gFontName$
Me.Text1.FontName = gFontName$
Me.inDrive.FontName = gFontName$
Me.outButton.FontName = gFontName$
Me.outPath.FontName = gFontName$
On Error GoTo 0

End Sub

Sub Form_Paint ()
HighLight PathDlg.Text1, CTLRAISED
HighLight PathDlg.Label1, CTLRAISED
End Sub



  3 Responses to “Category : BASIC Source Code
Archive   : VINST8.ZIP
Filename : PATH.FRM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/