Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Is there a Screen.AvailWidth (VB6) property equivalent in VB.NET?

(see title)  
Thanks.
0
deshi777
Asked:
deshi777
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
There is no Screen.AvailWidth() in VB6...only Screen.Width() and Screen.Height().

In VB.Net you can use:

        ' This gives you the screen size
        Dim deskScreen As Rectangle = Screen.PrimaryScreen.GetBounds(New Point(0, 0))
        Debug.WriteLine(deskScreen.ToString)

        ' This gives you the desktop client area (screen minus TaskBar and any AppBars)
        Dim deskClient As Rectangle = Screen.GetWorkingArea(New Point(0, 0))
        Debug.WriteLine(deskClient.ToString)

~IM
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now