home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4609
/
wavplus
/
wavname.frm
< prev
next >
Wrap
Text File
|
1994-06-28
|
3KB
|
123 lines
VERSION 2.00
Begin Form WavName
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "New Wav File Name"
ClientHeight = 1560
ClientLeft = 1095
ClientTop = 1485
ClientWidth = 4140
ControlBox = 0 'False
Height = 1965
Left = 1035
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1560
ScaleWidth = 4140
Top = 1140
Width = 4260
Begin CommandButton CmdOkay
BackColor = &H00C0C0C0&
Caption = "O &K A Y"
Default = -1 'True
Height = 375
Left = 2040
TabIndex = 2
Top = 960
Width = 1815
End
Begin CommandButton CmdCancel
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 240
TabIndex = 1
Top = 960
Width = 1815
End
Begin TextBox Text1
BackColor = &H00FFFF00&
ForeColor = &H00000000&
Height = 285
Left = 240
MaxLength = 11
TabIndex = 0
Text = "Text1"
Top = 480
Width = 3615
End
Begin Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Enter a name for the new Wav file:"
ForeColor = &H00800000&
Height = 200
Left = 240
TabIndex = 3
Top = 240
Width = 3615
End
End
Sub CmdCancel_Click ()
FormPassString2 = ""
Unload Me
End Sub
Sub CmdOkay_Click ()
TheText$ = Text1.Text
pos% = InStr(TheText$, ".")
If pos% <> 0 Then
FormPassString2 = TheText$
Else
If Len(TheText$) > 8 Then
TheText$ = Left$(TheText$, 8)
End If
TheText$ = TheText$ + ".WAV"
FormPassString2 = TheText$
End If
ThePath$ = WavPlay.Dir1.Path
ThePath$ = AddSeparator(ThePath$)
ThePath$ = LCase$(ThePath$ + FormPassString2)
If Dir$(ThePath$) = "" Then
FormPassString2 = ThePath$
Unload Me
Exit Sub
Else
msg$ = ThePath$ + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
msg$ = msg$ + "This file already exists!"
MsgBox msg$, 16, "File Error"
Text1.SetFocus
End If
End Sub
Sub Form_Load ()
FormCenterForm Me, MCIwav
Text1.Text = ""
Screen.MousePointer = 0
End Sub
Sub Form_Paint ()
DoForm3D Me, sunken, 1, 5
DoControl3D Text1, raised, 2
End Sub
Sub Text1_GotFocus ()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
Sub Text1_KeyPress (KeyAscii As Integer)
Char = Chr(KeyAscii)
KeyAscii = Asc(UCase(Char))
If Char = Chr$(8) Then Exit Sub
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then Exit Sub
If KeyAscii = Asc(".") Then Exit Sub
If KeyAscii < Asc("A") Or KeyAscii > Asc("Z") Then
KeyAscii = 0
Exit Sub
End If
End Sub