Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with a Print Screen function.

Status
Not open for further replies.

RotorTorque

Programmer
Apr 29, 2007
100
US
Hi all,
I have a VB.Net 2005 application that I need to add a Help Desk button to the toolbar.

The following should occur when the user clicks the button:
1.Take a snapshot of the screen (i.e. Print Screen), and save the snapshot as a .GIF or .JPG file. Another option will be to take a snapshot of the screen, paste the snapshot to Microsoft Word and save it as a .DOC.

2.Use Shell to open the Help Desk application which resides in a different server (DAF Server) and pass it the UserID, and Snap Shot variables.
How can I do this? Is this doable?

Thanks in advance,
RotorTorque :)
 
Don't know if this will satisfy all of your needs, but have a look at "PrintKey 2000". I use an older version at many of my clients. We use it all the time to make a copy of the screen. Great for error reporting and user instruction. My favorite feature is the get rectangular area which lets you use the mouse to define the area you want to capture. Other features: save to file, swap colors, black & white, landscape/portrait, print user info, print date & time, and more. Best of all it's free.

Auguy
Sylvania, Ohio
 
This is a simple solution. you can expand it as you required. It prints picture of current focused form.
Code:
Imports System.Windows.Forms
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sKeys As String = "{PRTSC}"
        SendKeys.SendWait(sKeys)
        Dim image As Image = CType(Clipboard.GetData(DataFormats.Bitmap), Image)
        image.Save("C:\myscreenshot.bmp")
    End Sub
End Class

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Hello, everyone.

I have briefly browsed this forum if anyone had same problem with me.

I will keep searching it. But I'm in hurry. I will appreciate for any help.

I'm developing windows application with vb.net. And I need to print screen which is the form. But when I print the form, the text is not clearly printed. There are many labels to display information. And when I print the form, text looks like printed as showing on 4 bit screen. It is totally worse than printing from the word document.

Can anyone give any suggestion, please?



Private Sub PrintForm1_QueryPageSettings(ByVal sender As Object, ByVal e As System.Drawing.Printing.QueryPageSettingsEventArgs) Handles PrintForm1.QueryPageSettings
e.PageSettings.PrinterResolution.X = 600
e.PageSettings.PrinterResolution.Y = 600
e.PageSettings.Margins.Bottom = 0
e.PageSettings.Margins.Top = 0
e.PageSettings.Margins.Left = 0
e.PageSettings.Margins.Right = 0
e.PageSettings.Landscape = True
End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Visible = False

PrintForm1.PrintAction = PrintAction.PrintToPrinter
PrintForm1.Print()
End sub

That was my code.

Thank you guys. I believe you guys will save my life, lol!!
 
This thread was for a Print Screen as in taking a picture of the current screen, not actually printing it out of a printer. Plus the thread is many months old. You'd probably have more success posting your own thread for this.
 
gutenjuni said:
I will keep searching it. But I'm in hurry. I will appreciate for any help.

So you are in a hurry. So what? We all have deadlines to meet and assist here when we can. If you have a problem and one or more members feel that they have the time to assist then they will.

In future, please don't use words like hurry or urgent.

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top