|
-
Jul 7th, 2001, 08:57 AM
#1
Thread Starter
New Member
Capturing Screen Display (Peer)
Anybody has an idea on how to capture the screen display of
Computer A to Computer B (vice versa) considering that these computers are connected through LAN?
Thankx...
Last edited by rmsrelay; Jul 7th, 2001 at 09:18 AM.
-
Jul 7th, 2001, 09:37 AM
#2
Code:
Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Integer, ByVal x As Integer, _
ByVal y As Integer, ByVal nWidth As Integer, _
ByVal nHeight As Integer, ByVal _
hSrcDC As Integer, ByVal xSrc As Integer, _
ByVal ySrc As Integer, ByVal dwRop As _
Long) As Integer
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetDC Lib "user32" _
(ByVal hwnd As Long) As Long
Sub Grabscreen(Dest As PictureBox)
Dim DeskhWnd As Long, DeskDC As Long
'Get the hWnd of the desktop
DeskhWnd = GetDesktopWindow()
'BitBlt needs the DC to copy the image. So, we
'need the GetDC API.
DeskDC = GetDC(DeskhWnd)
Dest.AutoRedraw = True
BitBlt Dest.hDC, 0, 0, _
Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, DeskDC, _
0, 0, vbSrcCopy
Dest.Refresh
End Sub
Use that to get the screen shot, then send the file via winsock...
-
Jul 7th, 2001, 10:25 PM
#3
Thread Starter
New Member
How will i send the file to another computer?
What file format will I used?
Does this work fast?
-
Jul 8th, 2001, 07:59 AM
#4
If you are on a LAN it wont take long, you will have to use winsock to transfer the file, do a search on it. You can always put the file to a shared location and pick it up from there.
-
Jul 9th, 2001, 06:10 PM
#5
Thread Starter
New Member
the reason why im so excited with this simply because, there was a time that i was invited by my friend at STI college. There, I really appreciate their computer facilities which they call it MBS.
They have 1 computer to be used by the Instructor and a lot of computers used by the students. They used the system for instruction. As the instructor click the general broadcast, all the display of student's computer will have to display what is on the Instructor's computer. Including mouse movement, clicking start menu etc. It is so very identical.
I was so inspired that i can do the same with VB by using the same as what what you've been given to me. but the problem is mouse pointer could not be captured.
But actually when i first saw their system, my concept is this, the video memory of student's computers was disabled and it gets from the Instructor's computer video memory.
Am i right with my idea?
Thank you very much for understanding me, im not so good in english, just try to understand my grammar, because im a filipino wanting to discover more about visual basic.
Is there a way to access the data of the physical memory?
-
Jul 10th, 2001, 04:24 AM
#6
Retired VBF Adm1nistrator
You dont need to mess with memory or whatever.
You could just make a picturebox the exact same size of the screen, and make sure its always on top.
Then when you receive the filedata via winsock, you would just stick the file into the picturebox.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 15th, 2001, 07:11 AM
#7
Thread Starter
New Member
Is it possible to display one's computer's screen to another unnoticeable by the observer that it is actually loading a received file? (i mean no delay capturing including mouse pointer)
for example; when i have to make a demo, when i click start button, the observers on other computer would also see what i've done with my computer, etc. as in very indentical.
do i have to save it first to a bmp file in order to send it to another computer via winsock?
please give light to my confusions and doubts.
thankx for your help...
-
Jul 17th, 2001, 04:52 AM
#8
Retired VBF Adm1nistrator
Well saving it first would be the easiest way of doing it.
But you dont have to do it that way.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 17th, 2001, 08:39 AM
#9
Thread Starter
New Member
then how will i do it...
oh... please, please help . . .
source code is more advantageous. . .
hello.... to somebody out there who is generous...
please naman ohhh. tabangi ko ninyo.....
Last edited by rmsrelay; Jul 29th, 2001 at 07:26 AM.
-
Jul 29th, 2001, 07:28 AM
#10
Thread Starter
New Member
then how will i do it...
oh... please, please help . . .
source code is more advantageous. . .
hello.... to somebody out there who is generous...
please naman ohhh. tabangi ko ninyo.....
-
Aug 3rd, 2001, 01:09 AM
#11
Hyperactive Member
Well, that sounds like a hell of an application. I doubt someone's just gonna code it for you. Get a good book on Visual Basic and good luck!
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
-
Aug 7th, 2001, 03:30 AM
#12
Thread Starter
New Member
do you have some to best recommend to me.
but if you have some friends out there who is very good in vb, can you solicit source code for me?
thanks....
-
Aug 7th, 2001, 03:35 AM
#13
Retired VBF Adm1nistrator
The source code for taking a screengrab is available on the net.
All you have to do is look for it.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 7th, 2001, 04:17 AM
#14
Lively Member
Camtasia
Try using this SDK. from Techsmith.
www.techsmith.com/products/camtasia/camtasia.asp
It claims to be able to do what you want but I haven't tried it so good luck.
-
Aug 7th, 2001, 04:27 AM
#15
Retired VBF Adm1nistrator
Might I mention that the code chenko posted works for taking a screenshot ...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 8th, 2001, 06:37 AM
#16
New Member
Code? I can!
Hi,
If you want code for captuing the desktop of any machine in a network and transfer that image to some other machine, contact me.
[email protected]
:-)
bye
Mohan
-
Aug 8th, 2001, 06:40 AM
#17
Retired VBF Adm1nistrator
Yeah well I want booze, drugs, strippers and pizza.
E-Mail me at [email protected]
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 9th, 2001, 09:29 AM
#18
Hyperactive Member
oohhh oohh
naman ohhh. tabangi ko ninyo
thank you mister for code!
ohh ohh thank you
someone please give me napkin I wet my pants
oh oh naman ohhh. tabangi ko ninyo
LOL
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
-
Aug 9th, 2001, 09:32 AM
#19
Hyperactive Member
what does naman ohhh. tabangi ko ninyo mean anyway?
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
-
Aug 13th, 2001, 01:20 AM
#20
Member
Originally posted by chenko
Code:
Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Integer, ByVal x As Integer, _
ByVal y As Integer, ByVal nWidth As Integer, _
ByVal nHeight As Integer, ByVal _
hSrcDC As Integer, ByVal xSrc As Integer, _
ByVal ySrc As Integer, ByVal dwRop As _
Long) As Integer
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetDC Lib "user32" _
(ByVal hwnd As Long) As Long
Sub Grabscreen(Dest As PictureBox)
Dim DeskhWnd As Long, DeskDC As Long
'Get the hWnd of the desktop
DeskhWnd = GetDesktopWindow()
'BitBlt needs the DC to copy the image. So, we
'need the GetDC API.
DeskDC = GetDC(DeskhWnd)
Dest.AutoRedraw = True
BitBlt Dest.hDC, 0, 0, _
Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, DeskDC, _
0, 0, vbSrcCopy
Dest.Refresh
End Sub
Chenko - as you see from my thread on this I'm trying to block capture through GetDC (which we think clevercontent.com does to stop screen capture). The best that I can think of is to have GetDC fired by a timer to keep it full but there must be a better way - can you help here?
-
Aug 13th, 2001, 01:36 AM
#21
Member
OK I've just tried GetDC in a timer and it doesn't stop PSP grabbing an individual window so we need someone who know what they are doing to help here
-
Dec 4th, 2001, 01:50 PM
#22
Fanatic Member
Originally posted by chenko
Code:
Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Integer, ByVal x As Integer, _
ByVal y As Integer, ByVal nWidth As Integer, _
ByVal nHeight As Integer, ByVal _
hSrcDC As Integer, ByVal xSrc As Integer, _
ByVal ySrc As Integer, ByVal dwRop As _
Long) As Integer
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetDC Lib "user32" _
(ByVal hwnd As Long) As Long
Sub Grabscreen(Dest As PictureBox)
Dim DeskhWnd As Long, DeskDC As Long
'Get the hWnd of the desktop
DeskhWnd = GetDesktopWindow()
'BitBlt needs the DC to copy the image. So, we
'need the GetDC API.
DeskDC = GetDC(DeskhWnd)
Dest.AutoRedraw = True
BitBlt Dest.hDC, 0, 0, _
Screen.Width / Screen.TwipsPerPixelX, Screen.Height / Screen.TwipsPerPixelY, DeskDC, _
0, 0, vbSrcCopy
Dest.Refresh
End Sub
Use that to get the screen shot, then send the file via winsock...
Wha is the correct way to call this?
Call Grabscreen(Picture1.Picture) and Call Grabscreen(Picture1.hDC) are wrong
 Looking for a friendly intelligent chat forum? Visit the white-hart.net 
-
Jan 23rd, 2002, 07:29 AM
#23
Originally posted by Kzin
Wha is the correct way to call this?
Call Grabscreen(Picture1.Picture) and Call Grabscreen(Picture1.hDC) are wrong
Call Grabscreen(Picture1)
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
|