اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

تفضل اخى الحبيب

ضع هذا الكود فى الفورم

Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
  ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
  ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
  ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_STYLE = -16
Const WS_SYSMENU = &H80000

Private Sub UserForm_Initialize()
   Dim hWnd As Long, lStyle As Long
   If Val(Application.Version) >= 9 Then
   hWnd = FindWindow("ThunderDFrame", Me.Caption)
   Else
   hWnd = FindWindow("ThunderXFrame", Me.Caption)
   End If
   lStyle = GetWindowLong(hWnd, GWL_STYLE)
   SetWindowLong hWnd, GWL_STYLE, (lStyle And Not WS_SYSMENU)
End Sub

تقبل تحياتى

  • Like 1
  • أفضل إجابة
قام بنشر

اخى الحبيب 

يوضع هذا الجزء فى بداية اكواد الفورم

Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
  ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
  ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
  ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Const GWL_STYLE = -16
Const WS_SYSMENU = &H80000

ثم يوضع هذا الجزء مستقل

Private Sub UserForm_Initialize()
   Dim hWnd As Long, lStyle As Long
   If Val(Application.Version) >= 9 Then
   hWnd = FindWindow("ThunderDFrame", Me.Caption)
   Else
   hWnd = FindWindow("ThunderXFrame", Me.Caption)
   End If
   lStyle = GetWindowLong(hWnd, GWL_STYLE)
   SetWindowLong hWnd, GWL_STYLE, (lStyle And Not WS_SYSMENU)
End Sub

اخفاء زر الخروج.zip

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • اضف...

Important Information