Subscribe For Free Updates!

We'll not spam mate! We promise.

الاثنين، 7 يوليو 2014

function disable the Close button to close that exists in each window visual basic codes

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Const MF_BYPOSITION = &H400&
Private Sub Form_Load()
Dim a As Long, b As Long
a = GetSystemMenu(Me.hwnd, False)
b = GetMenuItemCount(a)
RemoveMenu a, b - 1, MF_BYPOSITION
DrawMenuBar Me.hwnd
End Sub 

from ----

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 التعليقات:

إرسال تعليق