Getting imagegrabscreen to work

前端 未结 2 583
無奈伤痛
無奈伤痛 2020-12-03 12:58

I\'m trying to get imagegrabscreen (a GD function) to work with my Apache/Vista PC.

I\'m using the following code:



        
相关标签:
2条回答
  • 2020-12-03 13:31

    I think imagegrabscreen() only works in Windows XP not Vista.
    You should check this link

    0 讨论(0)
  • 2020-12-03 13:44

    I looked at the source to imagegrabscreen();

    at this point, I believe it is failing because we both have multi-monitor set-ups.

    The current code calls GetDC(0), which according to http://msdn.microsoft.com/en-us/library/dd144871(VS.85).aspx should return the device context for "the entire screen", but "To get the DC for a specific display monitor, use the EnumDisplayMonitors and CreateDC functions"

    I am going to do a bit more testing of this and see if I can come up with multi-monitor-friendly code.

    0 讨论(0)
提交回复
热议问题