获取当前显示器的显示分辨率 ————读取注册表HKEY_CURRENT_CONFIG\Display\Settings下的键BitsPerPixel、Resolution 

解决方案 »

  1.   

    我看过个,我显示的是1024*768 但HKEY_CURRENT_CONFIG\Display\Settings下的键Resolution 下为800*600 为什么!!~~
      

  2.   

    Screen.width / Screen.TwipsPerPixelX
    Screen.height / Scfreen.TwipsPerPixelY 
      

  3.   

    ResWidth = Screen.Width \ Screen.TwipsPerPixelX
    ResHeight = Screen.Height \ Screen.TwipsPerPixelY
    ScreenRes = ResWidth & "x" & ResHeightResWidth 就是指螢幕解析度中的寬
    ResHeight 就是指螢幕解析度中的長而最後算出的 ScreenRes,格式會像 800x600 一樣!win98和win2000的一样
      

  4.   

    westlink(非常菜) ,这得到的好象是像数吧!
      

  5.   

    顺便问一下ChangeDisplaySettings在2000中不起作用,返回值总为-2
    请问DEVMODE.dmSize这个参数是什么意思!?
      

  6.   

    Private Sub Form_Load()
    CR$ = Chr$(13) + Chr$(10)
    TWidth% = Screen.Width \ Screen.TwipsPerPixelX
    THeight% = Screen.Height \ Screen.TwipsPerPixelY
    MsgBox "Screen Resolution:" + CR$ + CR$ + Str$(TWidth%) + " x" + Str$(THeight%), 64, "Info"
    End Subwin2K调试通过~~