vb.net - Get screen size with two monitor -
i using code height of screen size :
dim hdcsrc intptr = user32.getwindowdc(handle) dim windowrect new user32.rect user32.getwindowrect(handle, windowrect) dim width integer = windowrect.right - windowrect.left dim height integer = windowrect.bottom - windowrect.top
now,when have 2 monitors of different sizes. considered default monitor?
there useful class in net framework substitute code.
and primary screen obtained using
screen.primaryscreen
for example code above replaceable using
dim area rectangle = screen.primaryscreen.bounds console.writeline("width: " & area.width.tostring) console.writeline("height: " & area.height.tostring)
Comments
Post a Comment