Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

[RESOLVED] Trying To Get The Current Screen Resolution

$
0
0
Hi everyone. I am trying to use this code to get the resolution, but would like it to appear in a textbox called CurrentResTXT.text

I found this on the inter
VB Code:
  1. Public Function ScreenResolution() As String
  2.         Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
  3.         Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
  4.         Return intX & " X " & intY
  5. End Function
I tried to call this from the form load event, but am not seeing anything. I event tried adding CurrentResTXT.text = intX to see if that would at least give me the width, but it is still blank. Did I miss a step?

Thanks!

Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>