Click here to Skip to main content
15,919,245 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Change my IP with New IP Pin
ivo759-Feb-09 6:51
ivo759-Feb-09 6:51 
Questionenhancement Pin
mjrose7-Feb-09 7:18
mjrose7-Feb-09 7:18 
AnswerRe: enhancement Pin
vaghelabhavesh7-Feb-09 12:03
vaghelabhavesh7-Feb-09 12:03 
Questionmenu Pin
mjrose7-Feb-09 7:06
mjrose7-Feb-09 7:06 
AnswerRe: menu Pin
vaghelabhavesh7-Feb-09 11:28
vaghelabhavesh7-Feb-09 11:28 
QuestionCombine two CRC32 results Pin
vigylant7-Feb-09 3:27
vigylant7-Feb-09 3:27 
AnswerRe: Combine two CRC32 results Pin
Dave Kreskowiak8-Feb-09 5:15
mveDave Kreskowiak8-Feb-09 5:15 
QuestionScreen capturing Pin
VeeKeyBee6-Feb-09 23:15
VeeKeyBee6-Feb-09 23:15 
I developed an application which is based on capturing the screen shots and save as the desired name given by the user.I used sendkeys method to avoid the usage of typing
printscreen key in my keyboard to copy the current screen to my clipboard.In my case I used a picturebox to hold the image and for saving.But if we are pressing the PrintScreen key the it works and without that it also works.The problem occurs during the second time,error occurs that the clipboard is empty or a null value exception is occured.


here is the code which I used.


Public Class main_frm
Dim sav As New SaveFileDialog
Dim i As Integer = 0
Dim abc, nam, path As String
Dim opd As New FolderBrowserDialog






Private Sub main_frm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
disp_pb.SizeMode = PictureBoxSizeMode.StretchImage
abc = "D:\vishnu\Screen\Shots\"

'path = InputBox("Enter the location of file", "Please Respond", i)


End Sub

Private Sub capall_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles capall_btn.Click
'Try
Me.WindowState = FormWindowState.Maximized
Me.Hide()
SendKeys.Send("({PRTSC})")
disp_pb.Image = Clipboard.GetDataObject.GetData("Bitmap", True)
'Dim path As String
'abc = "D:\vishnu\a.jpg"
'disp_pb.Image.Save("D:\vishnu\a.jpg")
'path = "D:\vishnu\Screen\Shots\"
' abc = InputBox("Enter the name of file", "Please Respond", i)
' path = path + nam + ".jpg"
opd.ShowDialog()
path = opd.SelectedPath
path += "\"
nam = InputBox("Enter the name of file", "Please Respond", i)
path = path + nam + ".jpg"
disp_pb.Image.Save(path)
Me.Show()
Me.WindowState = FormWindowState.Normal
Clipboard.Clear()
'Catch ex As Exception
' MsgBox(ex.ToString)


' End Try

End Sub

Private Sub actcap_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles actcap_btn.Click

End Sub
End Class
AnswerRe: Screen capturing Pin
the fossil7-Feb-09 5:02
the fossil7-Feb-09 5:02 
GeneralRe: Screen capturing Pin
Luc Pattyn7-Feb-09 5:55
sitebuilderLuc Pattyn7-Feb-09 5:55 
AnswerRe: Screen capturing Pin
Samir Ibrahim7-Feb-09 7:05
Samir Ibrahim7-Feb-09 7:05 
QuestionImage printing problem Pin
Sipder6-Feb-09 18:50
Sipder6-Feb-09 18:50 
AnswerRe: Image printing problem Pin
Dave Kreskowiak6-Feb-09 19:09
mveDave Kreskowiak6-Feb-09 19:09 
GeneralRe: Image printing problem Pin
Sipder6-Feb-09 19:34
Sipder6-Feb-09 19:34 
GeneralRe: Image printing problem Pin
Dave Kreskowiak6-Feb-09 22:48
mveDave Kreskowiak6-Feb-09 22:48 
GeneralRe: Image printing problem Pin
Duncan Edwards Jones9-Feb-09 4:56
professionalDuncan Edwards Jones9-Feb-09 4:56 
GeneralRe: Image printing problem Pin
Dave Kreskowiak9-Feb-09 12:01
mveDave Kreskowiak9-Feb-09 12:01 
GeneralRe: Image printing problem Pin
Duncan Edwards Jones9-Feb-09 5:02
professionalDuncan Edwards Jones9-Feb-09 5:02 
QuestionSetup wizard. Installting package in other system the bellow error showing plz help me. Pin
Nanda_MR6-Feb-09 18:29
Nanda_MR6-Feb-09 18:29 
AnswerRe: Setup wizard. Installting package in other system the bellow error showing plz help me. Pin
Dave Kreskowiak6-Feb-09 19:07
mveDave Kreskowiak6-Feb-09 19:07 
GeneralRe: Setup wizard. Installting package in other system the bellow error showing plz help me. Pin
Nanda_MR8-Feb-09 18:32
Nanda_MR8-Feb-09 18:32 
GeneralRe: Setup wizard. Installting package in other system the bellow error showing plz help me. Pin
Dave Kreskowiak9-Feb-09 1:46
mveDave Kreskowiak9-Feb-09 1:46 
GeneralRe: Setup wizard. Installting package in other system the bellow error showing plz help me. Pin
Nanda_MR9-Feb-09 18:53
Nanda_MR9-Feb-09 18:53 
QuestionNI Measurement Studio question Pin
Nick Alexeev6-Feb-09 17:52
professionalNick Alexeev6-Feb-09 17:52 
AnswerRe: NI Measurement Studio question Pin
Christian Graus6-Feb-09 18:18
protectorChristian Graus6-Feb-09 18:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.