bear24rw
05-27-2004, 02:52 PM
yeah.... how would you take a picture of the screen (through code) like if you press the Prnt Scrn button on your key bord it will take a picture of your screen but how would you do that through code
Taking a picture.....bear24rw 05-27-2004, 02:52 PM yeah.... how would you take a picture of the screen (through code) like if you press the Prnt Scrn button on your key bord it will take a picture of your screen but how would you do that through code darkforcesjedi 05-27-2004, 02:58 PM I don't know much about .NET. In VB6 you'd use the GetDesktopWindow API and BitBlt. BitBlt's equivalent in .NET is System.Drawing.Graphics.DrawImage or so I'm told. bear24rw 05-27-2004, 03:00 PM could you give me an example of how to use that..... :p MikeJ 05-27-2004, 03:10 PM Why don't you look it up in MSDN? It will have a code example too! bear24rw 05-27-2004, 03:11 PM alright.... i just thought that asking it here would be easy and i would get a better response..... bear24rw 05-27-2004, 03:37 PM yeah... i couldnt find how to take a picture through code sgt_pinky 05-27-2004, 10:19 PM Well, it is pretty simple to find. You should never post in the forums because "it is easier". You should always look first. Check out the command: SendKeys.Send("{PRTSC}") ;) bear24rw 05-28-2004, 01:30 PM alright thats cool... so it save the picture to the clip board..... is there a way to just have the picture box display the picture that it took without saving it to a file first? bear24rw 05-28-2004, 01:32 PM oh yeah and how can you change it so i takes a picture of everything on the screen and not just the selected window..... bear24rw 05-28-2004, 01:56 PM i tried: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SendKeys.Send("{PRTSC}") PictureBox1.Image = Clipboard.GetDataObject End Sub but the picturebox1.image.... had an error bear24rw 05-28-2004, 02:25 PM ok i got it to work but you have to press the button (because the command: SendKeys.Send("{PRTSC}") only take a picture of the current window whihc i dont want (i want the whole screen)) but anyways i got it to save to a file.... so if you can help me take a picture of the WHOLE screen that would be much appresiated and also i need to get how big the bitmap picture is (length X width) bear24rw 05-28-2004, 02:38 PM nvm i figured it out :D |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum