Advertisement
Ham62

GetScreenRes.bas

Sep 21st, 2017
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "windows.bi"
  2.  
  3. ' Get device handle for entire display
  4. Dim as HDC hdc = CreateDC("DISPLAY", NULL, NULL, NULL)
  5.  
  6. var iWidth = GetDeviceCaps(hdc, HORZRES)
  7. var iHeight = GetDeviceCaps(hdc, VERTRES)
  8.  
  9. Print "Width", iWidth
  10. Print "Height", iHeight
  11.  
  12. DeleteDC(hdc)
  13.  
  14. Sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement