اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

الاخوة بحاجة لكود اخفاء اطار الفورم وكود عمل مينمايز وماكس مايز للفورم


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

السلام عليكم

اخي الفاضل أبو الحسن

أنت تستاهل كل خير

تكبير تصغير اخفاء الاطار فقط

الكثير والكثير اطلع على الملف المرفق

تحكم بشكل الفورم.rar

رابط هذا التعليق
شارك

تسلم اخي ابو الحسن

والحمد لله انه اشتغل معك تمام

اذا عانا احد الاخوة من عدم تشغيل الفورم

يتبع شرح الفيديو

وإن شاء الله يمشي الحال

shrh.rar

رابط هذا التعليق
شارك

السلام عليكم

تفضل

هذا الكود حطه في ماكرو


Private Const GWL_STYLE As Long = -16

Public Const MIN_BOX As Long = &H20000

Public Const MAX_BOX As Long = &H10000

Const SC_CLOSE As Long = &HF060

Const SC_MAXIMIZE As Long = &HF030

Const SC_MINIMIZE As Long = &HF020

Const SC_RESTORE As Long = &HF120

Private Declare Function GetWindowLong _

  Lib "user32.dll" _

   Alias "GetWindowLongA" _

	(ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong _

  Lib "user32.dll" _

   Alias "SetWindowLongA" _

	(ByVal hwnd As Long, _

	 ByVal nIndex As Long, _

	 ByVal dwNewLong As Long) As Long

Private Declare Function DrawMenuBar _

  Lib "user32.dll" _

   (ByVal hwnd As Long) As Long

Private Declare Function GetForegroundWindow _

  Lib "user32.dll" () As Long

Public Sub AddToForm(ByVal Box_Type As Long)

Dim BitMask As Long

Dim Window_Handle As Long

Dim WindowStyle As Long

Dim Ret As Long

   If Box_Type = MIN_BOX Or Box_Type = MAX_BOX Then

	  Window_Handle = GetForegroundWindow()

	   WindowStyle = GetWindowLong(Window_Handle, GWL_STYLE)

	   BitMask = WindowStyle Or Box_Type

	  Ret = SetWindowLong(Window_Handle, GWL_STYLE, BitMask)

	  Ret = DrawMenuBar(Window_Handle)

   End If

End Sub

وهذا حطه في حدث الفورم

Private Sub UserForm_Activate()

AddToForm MIN_BOX

AddToForm MAX_BOX

End Sub

رابط هذا التعليق
شارك

السلام عليكم

الاخ الفاضل ابو الحسن

لكي تستفيد اكثر راجع هذا الموضوع وبه ماتريد واكثر

روح على مشاركة رقم 12

http://www.officena.net/ib/index.php?showtopic=34088&st=0

والسلام عليكم

رابط هذا التعليق
شارك

السلام عليكم


Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Declare Function GetActiveWindow Lib "user32.dll" () 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

Private Declare Function BringWindowToTop Lib "user32.dll" (ByVal hWnd As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long

Const GWL_STYLE = -16

Const WS_CAPTION = &HC00000

Const WS_SYSMENU = &H80000

Private Const GWL_EXSTYLE = (-20)

Private Const WS_EX_LAYERED = &H80000

Private Const LWA_ALPHA = &H2

Dim hWnd As Long

'===================================================

Private Sub UserForm_Initialize()

On Error Resume Next

Dim lngWindow As Long, lFrmHdl As Long

lFrmHdl = FindWindow(vbNullString, Me.Caption)

lngWindow = GetWindowLong(lFrmHdl, GWL_STYLE)

lngWindow = lngWindow And (Not WS_CAPTION)

Call SetWindowLong(lFrmHdl, GWL_STYLE, lngWindow)

Call DrawMenuBar(lFrmHdl)

End Sub

الصق الكود في بداية أكواد الفورم

وهذا مرفق اطلع عليه

F_HID.rar

رابط هذا التعليق
شارك

الأخ الكريم أبو الحسن

وبعد إذن الإخوة المشاركين

ما تريده وأكثر موجود في هذه المشاركة

http://www.officena.net/ib/index.php?showtopic=36867&view=findpost&p=220256

  • Like 1
رابط هذا التعليق
شارك

  • 2 weeks later...

السلام عليكم

اخي الفاضل أبو الحسن

أنت تستاهل كل خير

تكبير تصغير اخفاء الاطار فقط

الكثير والكثير اطلع على الملف المرفق

استاذنا / الفاضل على

الملف اكثر من روعة

ممكن اريد تثبيت Task Bar Icon

وهل يمكن عمل اسم الفورم متحرك

رابط هذا التعليق
شارك

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.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information