如何获取局域网中某台机器的快照??
解决方案 »
- 一个timer控制闪灯的程序,如何延时10s后?
- listbox与dadagrid组合使用问题!
- 哎....车祸归来.....还好身上零件没少多少.....大家热天坐摩托时小心点.....
- 我在1996年用QB编写了一个中型DOS软件mmsi.exe,现在有那种软件可以将其逆向工程,还原出设计框架。
- vb6.0 怎样实现鼠标滚动操作
- 请教:如何用ADO+SQL语句创建一个ACCESS数据库?
- WebBrowser中如何使图片的大小适应窗口(就如IE中那样)
- 怎样使数据库中的单精度数以固定小数位显示或打印出来?
- 沒法活了﹐VB要被壽終正寢了﹐散分。
- 关于文件的打开!
- 急:如何在PICTUREBOX 中画图象
- 在运行时,加载图标遇到的奇怪问题
共享桌面或者远程终端访问
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As LongPrivate Sub Command1_Click()
Dim wScreen As Long
Dim hScreen As Long
Dim w As Long
Dim h As Long
Picture1.Cls
wScreen = Screen.Width \ Screen.TwipsPerPixelX
hScreen = Screen.Height \ Screen.TwipsPerPixelY
Picture1.ScaleMode = vbPixels
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
hdcScreen = GetDC(0)
r = StretchBlt(Picture1.hdc, 0, 0, w, h, hdcScreen, 0, 0, wScreen, hScreen, vbSrcCopy)
End Sub
就是这个思路,要实现的话就得你自己来了~~
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As LongPrivate Sub Command1_Click()
Dim wScreen As Long
Dim hScreen As Long
Dim w As Long
Dim h As Long
Picture1.Cls
wScreen = Screen.Width \ Screen.TwipsPerPixelX
hScreen = Screen.Height \ Screen.TwipsPerPixelY
Picture1.ScaleMode = vbPixels
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
hdcScreen = GetDC(0)
r = StretchBlt(Picture1.hdc, 0, 0, w, h, hdcScreen, 0, 0, wScreen, hScreen, vbSrcCopy)
End Sub
请在代码后写上注释,好吗?
我看不明白。