السلام عليكم
هذا الموضوع استكمال لموضوع دورة الاكواد الشاملة
'51- تقنية المرآة للفورم
كود PHP:
Public Class Form1
Protected Overrides ReadOnly _
Property CreateParams() As _
System.Windows.Forms.CreateParams
Get
Const WS_EX_LAYOUTRTL As _
Integer = &H400000
Const WS_EX_NOINHERITLAYOUT As _
Integer = &H100000
Dim MirrorExStyle As _
System.Windows.Forms.CreateParams
MirrorExStyle = MyBase.CreateParams
MirrorExStyle.ExStyle = _
MirrorExStyle.ExStyle Or _
WS_EX_LAYOUTRTL Or WS_EX_NOINHERITLAYOUT
Return MirrorExStyle
End Get
End Property
End Class
'51- تقنية المرآة للفورم
'52-تقنية المرآة للفورم والادوات التي عليها
كود PHP:
Public Class Form1
Const WS_EX_LAYOUTRTL = &H400000
Private _mirrored As Boolean = False
Public Property IsMirrored() As Boolean
Get
Return _mirrored
End Get
Set(ByVal Value As Boolean)
If _mirrored <> Value Then
_mirrored = Value
MyBase.OnRightToLeftChanged _
(EventArgs.Empty)
End If
End Set
End Property
Protected Overrides ReadOnly Property _
CreateParams() As System.Windows.Forms.CreateParams
Get
Dim CP As System.Windows.Forms.CreateParams _
= MyBase.CreateParams()
If IsMirrored Then
CP.ExStyle = CP.ExStyle Or WS_EX_LAYOUTRTL
End If
Return CP
End Get
End Property
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.IsMirrored = True
End Sub
End Class
'52-تقنية المرآة للفورم والادوات التي عليها