annaguianis22 قام بنشر أكتوبر 16, 2022 قام بنشر أكتوبر 16, 2022 السلام عليكم .. لابد من التحية عند بدء أى مشاركة ,,,ارجو المساعده في تثبيت وضغ الازرار عند تكبير الفورم
مهند محسن قام بنشر أكتوبر 16, 2022 قام بنشر أكتوبر 16, 2022 وكيف تنتظر المساعدة من أحد بدون رفع الملف ؟!!هل يمكن العمل على الصورة ؟!!لا يمكن العمل على التخمين وتجنباً لإهدار وقت الأساتذة دون جدوى أو أهمية فلابد من رفع ملف مدعوم بشرح كافى عن المطلوب !!! 1
annaguianis22 قام بنشر أكتوبر 21, 2022 الكاتب قام بنشر أكتوبر 21, 2022 لتكبير حجم الفورم بطريقة احترافية توصلت و اخيرا لهذا الكود بدون مشاكل ان كان السيستم 32 او 64 😉 #If VBA7 Then Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal ms As LongPtr) #Else Private Declare Sub Sleep Lib "kernel32" (ByVal ms as Long) #End If Option Explicit 'http://www.mrexcel.com/archive/VBA/24009.html Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare PtrSafe Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long Private Declare PtrSafe Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long Private Const GWL_STYLE As Long = (-16) 'Sets a new window style Private Const WS_SYSMENU As Long = &H80000 'Windows style Private Const WS_MINIMIZEBOX As Long = &H20000 Private Const WS_MAXIMIZEBOX As Long = &H10000 Private Const SW_SHOWMAXIMIZED = 3 Private Sub UserForm_Activate() Dim lFormHandle As Long, lStyle As Long '=========================================== '= Originally from Dax = '= Modified with comments by Ivan F Moala = '= 22/07/01 = '=========================================== 'Lets find the UserForm Handle the function below retrieves the handle 'to the top-level window whose class name ("ThunderDFrame" for Excel) 'and window name (me.caption or UserformName caption) match the specified strings. lFormHandle = FindWindow("ThunderDFrame", Me.Caption) 'The GetWindowLong function retrieves information about the specified window. 'The function also retrieves the 32-bit (long) value at the specified offset 'into the extra window memory of a window. lStyle = GetWindowLong(lFormHandle, GWL_STYLE) 'lStyle is the New window style so lets set it up with the following lStyle = lStyle Or WS_SYSMENU 'SystemMenu lStyle = lStyle Or WS_MINIMIZEBOX 'With MinimizeBox lStyle = lStyle Or WS_MAXIMIZEBOX 'and MaximizeBox 'Now lets set up our New window the SetWindowLong function changes 'the attributes of the specified window , given as lFormHandle, 'GWL_STYLE = New windows style, and our Newly defined style = lStyle SetWindowLong lFormHandle, GWL_STYLE, (lStyle) 'Remove >'< if you want to show form Maximised 'ShowWindow lFormHandle, SW_SHOWMAXIMIZED 'Shows Form Maximized 'The DrawMenuBar function redraws the menu bar of the specified window. 'We need this as we have changed the menu bar after Windows has created it. 'All we need is the Handle. DrawMenuBar lFormHandle End Sub 2
a.kawkab قام بنشر سبتمبر 19, 2023 قام بنشر سبتمبر 19, 2023 السلام عليكم يمكنك الاستفادة من الفيديو التالى للاستاذ عماد غازى https://www.youtube.com/watch?v=M3APTvZ0nfw
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.