|
-
Oct 3rd, 2002, 10:21 PM
#1
How can I get screen shot from an app?
well, I dont want a screenshot of my own app, I want to be able to take a screenshot of a Process. I believe that I have to make it on top first. But how can I make it on top and how can I get a screenshot? I have no clue
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 4th, 2002, 01:18 AM
#2
Fanatic Member
Here's a sample cut/pasted from AllAPI that looks like it does what you want, but it's in VB6... not sure if it will work the same in .NET. Hope it helps.
Code:
Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Form_Load()
'KPD-Team 2001
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim mWnd As Long
'launch notepad
Shell "notepad.exe", vbNormalNoFocus
DoEvents
'set the graphics mode to persistent
Me.AutoRedraw = True
'search the handle of the notepad window
mWnd = FindWindow("Notepad", vbNullString)
If mWnd = 0 Then
Me.Print "NotePad window not found!"
Else
'draw the image of the notepad window on our form
PrintWindow mWnd, Me.hDC, 0
End If
End Sub
-
Oct 4th, 2002, 03:47 PM
#3
tnx Slow_Learner
for some reason I cant make it to work in VB.NET...it works fine in vb6
I checked the return value of the function in VB.NET, it doesnt return any error codes, so I'm assuming that it should work, but it doesnt
I have a picturebox and I'm passing the handle.toint64 of the form and the picturebox to the function, doenst work
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 4th, 2002, 07:40 PM
#4
Fanatic Member
Dunno, I haven't messed with graphics at all except for your windowshade thingy (which I didn't get to work heh).
-
Oct 5th, 2002, 09:01 PM
#5
Hyperactive Member
Make sure you have converted that api function correct for vb.net - i.e. a long in vb6 is an integer now in vb.net etc.
-
Oct 5th, 2002, 09:04 PM
#6
yeah I've done that already, aint working
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|