How to Get Screen Resolution in VB.Net

0
580

This Tutorial is all about How to Get Screen Resolution in VB.Net. In this tutorial you will be able to learn Get Screen Resolution in VB.Net. So lets get Started:

  • First is open the Visual Basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK

  • After that, design your form like this just like what I’ve shown you below.
    Add a Button and 2 textbox.
  • Add this Code to the Button.
    [vbnet]
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    TextBox1.Text = Screen.PrimaryScreen.WorkingArea.Width
    TextBox2.Text = Screen.PrimaryScreen.WorkingArea.Height
    End Sub
    [/vbnet]
  • Finally, Click F5 to run
    Output:

If you have any comments or suggestions about on How to Get Screen Resolution in VB.Net, please feel free to contact our webpage.

Download How to Get Screen Resolution in VB.Net Here

Other Articles Readers might read:

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.