الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كود الفورم لا يعمل

مغلق
بدأه hala في 29 ديسمبر 2001 · 1 رد · 574 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

لقد عملت الكود التالي لعمل مسج عربيه اي اسم الفورم جهة اليمين والx التي تغلق الفورم not activeلكن المشكله لو اخترت من تول بوكس الimage

واضفت صوره للفورم تظهر الصوره بعد الرن مقلوبه بالاضافه ان الكود للصوره لايعمل

فارجوكم توضيح لي ماهي المشكله

Code:

--------------------------------------------------------------------------------

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 DrawMenuBar Lib "user32" _

(ByVal hwnd As Long) As Long

Private Declare Function RemoveMenu Lib "user32" _

(ByVal hMenu As Long, ByVal nPosition As Long, _

ByVal wFlags As Long) As Long

Private Const MF_BYPOSITION = &H400&

Private Const MF_REMOVE = &H1000&

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Const WS_EX_LAYOUTRTL = 4194304

Const GWL_EXSTYLE = -20

Private Sub Form_Load()

SetWindowLong Form1.hwnd, GWL_EXSTYLE, WS_EX_LAYOUTRTL

Form1.Refresh

Dim hSysMenu As Long

Dim nCnt As Long

'First, show the form

Me.Show

'Get handle To our form's system menu

'(Restore, Maximize, Move, Close etc.)

hSysMenu = GetSystemMenu(Me.hwnd, False)

If hSysMenu Then

'Get System menu's menu count

nCnt = GetMenuItemCount(hSysMenu)

If nCnt Then

'Menu count is based On 0 (0, 1, 2, 3...)

RemoveMenu hSysMenu, nCnt - 1, MF_BYPOSITION Or MF_REMOVE

RemoveMenu hSysMenu, nCnt - 2, _

MF_BYPOSITION Or MF_REMOVE

DrawMenuBar Me.hwnd

'Force caption bar's refresh. Disabling X button

Me.Caption = "النتيجة"

End If

End If

Form1.BorderStyle = fixedsingle

End Sub

#2

استخدمي الاداة PictureBox لضمان عدم قلب الصورة وشكرا

هذا الموضوع مغلق.

مواضيع مشابهة