hi all, newbie wanna ask again...

i have build gui with VB6, my gui that i designed has a big size, fullscreen when i run, so in normal mode (not running) if i want to see the form i have to scroll it, if i want to save the design to an image, full of form, how can i make it? if i use PrtSc on keyboard, it just print image on screen, not full form image, any help for me, please? thanks

You can use PrtScrn when the form is running. Paint is capable of loading the pic from the clipboard, and if necessary resizing it.

Edited 3 Years Ago by tinstaafl

i think using only PrtScrn isn't sufficient as there is problem regarding scrolling also so it can capture the entire form (capture only presently visible part) so try the following

first increase screen resolution , then probably you will be able to see the entire form and then use PrtScrn .

thanks for reply,

@ tinstaafl : i want to all the component include on the image, so, if i printsreen it when it's running, the component won't be appear.

@ rishif2 : i can't increase screen resolution, in my computer the resolution is in the max value, any another idea?

The most you can do, probably, is to switch to an SDI interface in the options. This will allow the design window to be full screen.

There is no easy way out of this. Try using PrintForm. A way to do it is to print in a loop: scroll to top and print, scroll one page and print, repeat until the bottom is reached.

Use something like this -

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const VK_MENU As Byte = &H12
Private Const VK_SNAPSHOT As Byte = &H2C
Private Const KEYEVENTF_KEYUP = &H2

Private Sub PrintTheForm()
Dim lWidth As Long, lHeight As Long
    Clipboard.Clear
    Call keybd_event(VK_MENU, 0, 0, 0)
    Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
    DoEvents
    Call keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0)
    Call keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0)
    Printer.Print
    If Width > Printer.ScaleWidth Then
        lWidth = Printer.ScaleWidth
        lHeight = (Printer.ScaleWidth / Width) * Height
    Else
        lWidth = Width
        lHeight = Height
    End If
    Printer.PaintPicture Clipboard.GetData, 0, 0, lWidth, lHeight
    Printer.EndDoc
End Sub

thanks for reply....

@ tinstaafl : yes, this works! i can change my design to full screen s i can use printscreen to make the image of my gui.

@ AndreRet : how i use your code? make a new project and run it or i have to insert it to my project?

thanx for the reply...

as a newbie... i think tinstaafl's trick is the easiest way tho take the screenshot, so i prefer to use this trick...

thanx by the way ... :)

This question has already been answered. Start a new discussion instead.