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.

screen class

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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -