Membuat From Agar Tidak Bisa Di Close Pada Visual Basic 6.0

Source code untuk membuat Form agar tidak bisa di Close.
Tombol Close pada Form di Disable sehingga Form tersebut tidak bisa di Close.

Buat 1 Project dengan :
1 Form
Copy source code berikut pada Form :

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Public Sub DisableCloseBtn(ByVal Frm As Form)
Dim h As Long
h = GetSystemMenu(Frm.hwnd, 0)
RemoveMenu h, 6, &H400
RemoveMenu h, 5, &H400
End Sub


Private Sub Form_Load()
DisableCloseBtn MeEnd Sub

Suka Dengan Artikel Ini ?

 
 
Copyright © 2013. BLOGGER Mr.17 - All Rights Reserved