تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] كيف احل مشكلة نافذة البرنامج التي تختلف في كل شاشة ضروووري
#9
اخي العزيز ربما تجد ما ينفعك في هذا الكود .... علما انه يعمل على ضبط الرزليوشن للكونترولز الموجودة على الفورم .... تضعه في حدث التحميل للفورم

كود :
Dim DesignScreenWidth As Integer = 1600
    Dim DesignScreenHeight As Integer = 1200
    Dim CurrentScreenWidth As Integer = Screen.PrimaryScreen.Bounds.Width
    Dim CurrentScreenHeight As Integer = Screen.PrimaryScreen.Bounds.Height
    Dim RatioX as Double = CurrentScreenWidth / DesignScreenWidth
    Dim RatioY as Double = CurrentScreenHeight / DesignScreenHeight
    For Each iControl In Me.Controls
        With iControl
            If (.GetType.GetProperty("Width").CanRead) Then .Width = CInt(.Width * RatioX)
            If (.GetType.GetProperty("Height").CanRead) Then .Height = CInt(.Height * RatioY)
            If (.GetType.GetProperty("Top").CanRead) Then .Top = CInt(.Top * RatioX)
            If (.GetType.GetProperty("Left").CanRead) Then .Left = CInt(.Left * RatioY)
        End With
    Next
الرد }}}
تم الشكر بواسطة: shado1796


الردود في هذا الموضوع
RE: كيف احل مشكلة نافذة البرنامج التي تختلف في كل شاشة ضروووري - بواسطة beep - 01-05-14, 10:14 AM


التنقل السريع :


يقوم بقرائة الموضوع: