Io per fare lo screen con vb6 faccio così:
codice:
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Declare Function GetWindowDC Lib "user32.dll" (ByVal hWnd As Long) As Long
Private Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC 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 dwRop As Long) As Long
Private Declare Function ReleaseDC Lib "user32.dll" (ByVal hWnd As Long, ByVal hDC As Long) As Long
Private Sub Command1_Click()
Dim hWnd As Long
Dim hDC As Long
hWnd = GetDesktopWindow()
hDC = GetWindowDC(hWnd)
BitBlt Picture1.hDC, 0, 0, 20000, 20000, hDC, 0, 0, vbSrcCopy
ReleaseDC hWnd, hDC
End Sub
Private Sub Command2_Click()
SavePicture Picture1.Image, "C:\a.bmp"
End Sub
Solo che mi fa lo screen in base a quanto è grande la picturebox.Invece, vorrei che in una discreta picturebox mi faccia visualizzare tutto lo schermo compresa taskbar. Mi potete aiutare perfavore??A migliorare questo codice??? Perfavore rispondete
P.S Uno screen di 1280,800 pixel