home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Mother of All Windows Books
/
CD-MOM.iso
/
cd_mom
/
newsletr
/
vbz
/
vbz1-3
/
sswiz.frm
< prev
next >
Wrap
Text File
|
1993-06-25
|
7KB
|
241 lines
VERSION 2.00
Begin Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Screen Saver Wizard"
Height = 4785
HelpContextID = 101
Icon = SSWIZ.FRX:0000
Left = 1425
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4095
ScaleWidth = 4905
Tag = "Screen Saver Wizard Version 1.0"
Top = 1335
Width = 5025
Begin CommandButton Command3
Caption = "Help"
Height = 495
Left = 1920
TabIndex = 15
Top = 3360
Width = 1095
End
Begin CommandButton Command2
Cancel = -1 'True
Caption = "Exit"
Height = 495
Left = 3480
TabIndex = 9
Top = 3360
Width = 1215
End
Begin CommandButton Command1
Caption = "Generate"
Default = -1 'True
Height = 495
Left = 240
TabIndex = 8
Top = 3360
Width = 1215
End
Begin Frame Frame3
Caption = "Passwords"
Height = 1095
Left = 3360
TabIndex = 14
Top = 1920
Width = 1335
Begin OptionButton optPWDLL
Caption = "DLL"
Height = 255
Left = 120
TabIndex = 6
Top = 360
Value = -1 'True
Width = 1095
End
Begin OptionButton Option3
Caption = "Native"
Height = 255
Left = 120
TabIndex = 7
Top = 720
Width = 1095
End
End
Begin Frame Frame2
Caption = "Saver Form"
Height = 1095
Left = 240
TabIndex = 13
Top = 1920
Width = 1335
Begin OptionButton optStdSaver
Caption = "&Standard"
Height = 255
Left = 120
TabIndex = 2
Top = 360
Value = -1 'True
Width = 1095
End
Begin OptionButton Option2
Caption = "&Custom"
Height = 255
Left = 120
TabIndex = 3
Top = 720
Width = 1095
End
End
Begin Frame Frame1
Caption = "Config Form"
Height = 1095
Left = 1800
TabIndex = 12
Top = 1920
Width = 1335
Begin OptionButton Option1
Caption = "Custom"
Height = 255
Left = 120
TabIndex = 5
Top = 720
Width = 1095
End
Begin OptionButton optStdConfig
Caption = "Standard"
Height = 255
Left = 120
TabIndex = 4
Top = 360
Value = -1 'True
Width = 1095
End
End
Begin TextBox txtFName
Height = 375
Left = 2400
MaxLength = 7
TabIndex = 1
Top = 1200
Width = 2055
End
Begin TextBox txtSSName
Height = 375
Left = 2400
MaxLength = 15
TabIndex = 0
Top = 360
Width = 2055
End
Begin Label Label2
Caption = "Saver &File Name: (without extention)"
Height = 495
Left = 480
TabIndex = 11
Top = 1200
Width = 1815
End
Begin Label Label1
Caption = "Screen Saver &Name: (in Control Panel)"
Height = 495
Left = 480
TabIndex = 10
Top = 360
Width = 1815
End
Begin Menu mnuHelp
Caption = "&Help"
Begin Menu mnuContents
Caption = "&Contents"
End
Begin Menu mnuHelpAbout
Caption = "&About Screen Saver Wizard..."
End
End
End
DefInt A-Z
Declare Function GetWindowsDirectory Lib "Kernel" (ByVal Buff$, ByVal nChars)
Sub Command1_Click ()
Module$ = txtFName + ".BAS"
Open "SSAVET.BAS" For Input As #1
Open Module$ For Output As #2
While Not EOF(1)
Line Input #1, Text$
If Left$(Text$, 3) = "Glo" Then
Text$ = "Global Const AppName$ = """ + txtSSName + """"
End If
Print #2, Text$
Wend
Close
MAK$ = txtFName + ".MAK"
Open MAK$ For Output As #1
Print #1, "SSMAIN.BAS"
Print #1, Module$
Print #1, "INI.BAS"
Print #1, "DLGBOX.BAS"
If OptStdSaver Then
Print #1, "SSFRM.FRM"
Else
CName$ = txtFName + ".FRM"
FileCopy "SSFRM.FRM", CName$
Print #1, CName$
End If
If OptPWDLL Then
Print #1, "SSPW_DLL.BAS"
Else
Print #1, "SSPW_VB.BAS"
Print #1, "SSGETPW.FRM"
Print #1, "SSSETPW.FRM"
End If
If OptStdConfig Then
Print #1, "SSCONFIG.FRM"
Else
CName$ = txtFName + "C.FRM"
FileCopy "SSCONFIG.FRM", CName$
Print #1, CName$
End If
Print #1, "ProjWinSize=243,421,218,237"
Print #1, "ProjWinShow=2"
Print #1, "IconForm="""; "frmSave"; """"
Print #1, "Title="; """"; "SCRNSAVE:" + txtSSName; """"
Print #1, "ExeName="""; txtFName + ".SCR"""
Buff$ = Space$(256)
nChars = GetWindowsDirectory(Buff$, 256)
Print #1, "Path="""; Left$(Buff$, nChars); """"
Close
MsgBox MAK$ + " has been created.", 64, "Wizard"
End Sub
Sub Command2_Click ()
Unload Me
End Sub
Sub Command3_Click ()
Ok = Shell("notepad sswiz.txt", 1)
End Sub
Sub Form_Load ()
ChDrive App.Path
ChDir App.Path
End Sub
Sub mnuContents_Click ()
SendKeys "{F1}"
End Sub
Sub mnuHelpAbout_Click ()
On Error Resume Next
Load frmAbout
End Sub
Sub txtFName_KeyPress (KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
End Sub