You need to first identify what you mean by the form being on a screen, because it's possible for a single form to span multiple screens. You're going to be using the Screen
class regardless, but the calculations will be different. The simplest option would be to use the Location
property, e.g.
For Each scrn In Screen.AllScreens
If scrn.Bounds.Contains(Location) Then
MessageBox.Show($"Resolution: {scrn.Bounds.Width} x {scrn.Bounds.Height}")
Exit For
End If
Next
Another option would be to use the screen that contains the largest proportion of the form, e.g.
Dim maxArea = 0
Dim resolution = Size.Empty
For Each scrn In Screen.AllScreens
Dim intersection = Rectangle.Intersect(scrn.Bounds, Bounds)
Dim area = intersection.Width * intersection.Height
If area > maxArea Then
maxArea = area
resolution = scrn.Bounds.Size
End If
Next
MessageBox.Show($"Resolution: {resolution.Width} x {resolution.Height}")
Note that this code will display the resolution of the first encountered if the equal parts of the form are on multiple screens.
There may be other options too, although these seem the most likely.
EDIT:
It's also worth noting that the first code won't work for a maximised form because the actual Location
value will be outside the bounds of the screen it's on, so you'd need a bit of jiggery-pokery to handle that. The second code will handle that without issue.