G
Guest
Hi,
Below source code I have try on Win 2k, XP & 2003 is work, but I try on
win 98 & ME the screen is capture black screen.
Dim dInt_dwRop As Integer = &HCC0020
Dim dImg As New
System.Drawing.Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height,
System.Drawing.Imaging.PixelFormat.Format16bppRgb565)
Dim g As System.Drawing.Graphics =
System.Drawing.Graphics.FromImage(dImg)
Dim dc2 As IntPtr = g.GetHdc()
Dim hdcSrc As IntPtr =
User32.GetWindowDC(User32.GetDesktopWindow())
Gdi32.BitBlt(dc2, 0, 0, Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height, hdcSrc, 0, 0, dInt_dwRop)
g.ReleaseHdc(dc2)
thk,
Fong
Below source code I have try on Win 2k, XP & 2003 is work, but I try on
win 98 & ME the screen is capture black screen.
Dim dInt_dwRop As Integer = &HCC0020
Dim dImg As New
System.Drawing.Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height,
System.Drawing.Imaging.PixelFormat.Format16bppRgb565)
Dim g As System.Drawing.Graphics =
System.Drawing.Graphics.FromImage(dImg)
Dim dc2 As IntPtr = g.GetHdc()
Dim hdcSrc As IntPtr =
User32.GetWindowDC(User32.GetDesktopWindow())
Gdi32.BitBlt(dc2, 0, 0, Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height, hdcSrc, 0, 0, dInt_dwRop)
g.ReleaseHdc(dc2)
thk,
Fong