Guy's![]()
I made this code
Code:Private Sub Form_Click() ' // Example: Capture Text area and save to BMP file // Dim TxtArea As RECT Dim MyDC As Long MyDC = GetDC(0) If MyDC Then Picture1.AutoRedraw = True Picture1.BorderStyle = 0 Picture1.Height = frmGetMACadr.Height Picture1.Width = frmGetMACadr.Width GetWindowRect frmGetMACadr.hWnd, TxtArea ' copy text box area to pic box. BitBlt Picture1.hdc, 0, 0, TxtArea.Right - TxtArea.Left, _ TxtArea.Bottom - TxtArea.Top, MyDC, TxtArea.Left, TxtArea.Top, vbSrcCopy ' Save as BMP file. SavePicture Picture1.Image, "D:\TEST.BMP" ReleaseDC 0, MyDC End If Dim ChangeWP Dim Source As String Source = "D:\TEST.BMP" ChangeWP = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, Source, 0) Unload Me End Sub
it'll get print screen from the FORM and will make it as background for the desktop
my question is
I want to save the image in my documents but I don't know what's the path name of the existing user I want to save the image to my documents path of the existing user
I want from the code to save the image in my documents of the existing user and make it as desktop


Reply With Quote
What do you mean?
