Private Declare Function InitCommonControls Lib "Comctl32.dll" () As Long
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Inserire il nome del file", vbInformation
ElseIf Right(Text1.Text, 3) = "obj" Then
MsgBox "File non valido! Inserire il file .asm!", vbInformation
ElseIf Right(Text1.Text, 3) <> "asm" And Right(Text1.Text, 3) <> "obj" Then
MsgBox "Inserire il file .asm o il file .obj", vbInformation
Else
Shell "C:\TASM\BIN\TASM.exe " & Text1.Text
End If
End Sub
Private Sub Command2_Click()
If Text1.Text = "" Then
MsgBox "Inserire il nome del file", vbInformation
ElseIf Right(Text1.Text, 3) = "asm" Then
MsgBox "File non valido! Inserire il file .obj!", vbInformation
ElseIf Right(Text1.Text, 3) <> "asm" And Right(Text1.Text, 3) <> "obj" Then
MsgBox "Inserire il file .asm o il file .obj", vbInformation
Else
Shell "C:\Tasm\BIN\Tlink.exe " & Text1.Text
End If
End Sub
Private Sub Command3_Click()
If Text1.Text = "" Then
MsgBox "Inserire il nome del file", vbInformation
ElseIf Right(Text1.Text, 3) = "obj" Then
MsgBox "File non valido! Inserire il file .asm!", vbInformation
ElseIf Right(Text1.Text, 3) <> "asm" And Right(Text1.Text, 3) <> "obj" Then
MsgBox "Inserire il file .asm o il file .obj", vbInformation
Else
Shell "C:\Tasm\BIN\Tasm32.exe " & Text1.Text
End If
End Sub
Private Sub Command4_Click()
If Text1.Text = "" Then
MsgBox "Inserire il nome del file", vbInformation
ElseIf Right(Text1.Text, 3) = "asm" Then
MsgBox "File non valido! Inserire il file .obj!", vbInformation
ElseIf Right(Text1.Text, 3) <> "asm" And Right(Text1.Text, 3) <> "obj" Then
MsgBox "Inserire il file .asm o il file .obj", vbInformation
Else
Shell "C:\Tasm\BIN\Tlink32.exe " & Text1.Text
End If
End Sub
Private Sub Command5_Click()
CommonDialog1.Filter = "Assembly (*.asm)|*.asm|" _
& "Object (*.obj)|*.obj|" _
& "Tutti i file |*.*|"
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileName
End Sub
Private Sub Form_Initialize()
Dim x As Long
x = InitCommonControls
End Sub
Private Sub Form_Load()
Form1.Caption = "ASM Compiler - ver. " & App.Major & "." & App.Minor & "." & App.Revision
End Sub