Main Form Source Code
This Sample Source Code For Main Menu
Private Sub MDIForm_Load()
Call Menu_Hilang
MnuFile(2).Enabled = False
End Sub
Private Sub MnuFile_Click(Index As Integer)
Select Case Index
Case 1
FrmLogin.Show
Case 2
Call Menu_Hilang
MnuFile(1).Enabled = True
MnuFile(2).Enabled = False
MnuFile(4).Enabled = True
Pesan = MsgBox("Terima Kasih atas Kerja Anda Hari ini !!!", vbOKOnly + vbInformation, "Perhatian")
Case 3
'Do Nothing
Case 4
Dim X As Integer
X = MsgBox("Are you sure want to exit this Application ?", vbYesNo + vbInformation, "Warning")
If X = vbYes Then
End
End If
End Select
End Sub
Private Sub MnuHelp_Click(Index As Integer)
Select Case Index
Case 1
'Tampilkan Help file
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
CommonDialog1.HelpCommand = cdlHelpForceFile
CommonDialog1.HelpFile = App.Path & "\Help.hlp"
CommonDialog1.ShowHelp
Exit Sub
ErrHandler:
' User pressed Cancel button.
Exit Sub
Case 2
'Tampilkan Form Rubah Password
FrmUbahPassword.Show
Case 3
'Do Nothing
Case 4
'Tampilkan Form About
FrmAbout.Show
End Select
End Sub
Private Sub MnuMaster_Click(Index As Integer)
Select Case Index
Case 1
'Tampilkan Form Asessor
FrmKurs.Show
Case 2
'Tampilkan Form Surveyor
FrmPreview.Show
End Select
End Sub
Private Sub MnuPengaturan_Click(Index As Integer)
Select Case Index
Case 1
'Tampilkan Form User Maintenance
FrmUserMaintenance.Show
Case 2
'Tampilkan Form User Log Activity
FrmLog.Show
End Select
End Sub
0 Response to "Main Form Source Code"
Posting Komentar