• Want to help us with this year's BoS Trials?
    Let us know before 30 June. See this thread for details
  • Looking for HSC notes and resources?
    Check out our Notes & Resources page

Screenshot + Send File Code (1 Viewer)

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
This is the last part of my program that i cant seem to get work. I've attached a prototype project that I'm trying to get working. What the aim of this prototype is this:

1) Take a screenshot of the server computer.
2) the server computer then saves the screenshot into a file called "scr.dat" in the folder where the server is located.
3) This file is then transferred back to the control program on another computer and saved there.
4) Another form is used to display the screenshot in the control program.

As of the moment, steps 1 and 2 work fine, but it is step 3 i am having trouble with. If anyone can help me then that would be great. Btw, the code for the file transfer is from another program I got off someone elses code. I've tried to trim it down and convert it so it runs with my one. However, i don't really know what half the code does so if anyone can help me then again that would be great.
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
And the original file transfer program is as follows:

Again, any help is greatly appreciated. This is the last hurdle I need to jump over in my major project which is due pretty soon (Next friday). If anyone can help or even come up with a different way to work around this problem then I would be very grateful. Thanks in advance.
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
errrr im in exam period still, if you can wait a week then i'll be glad to help, sorry.
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
Yay!!! I got it working! ^^ But there is one tiny problem. You have to do it three times to work.....when you run it once, it creates the scr.dat file, when you run the command a second time it show up a msgbox which is part of another command and then when you run it a third time it finally works. I think i can work around it but if anyone can help me debug it so that it works properly then that would be extremely helpful. This is a secondary thing, i don't really plan on doing it until i finish the other parts of the program.
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
I think I know what the problem is now. Does anyone know how to create a blank file when a form unloads? I'm using this current code here:

Private Sub Form_Unload(Cancel As Integer)
Clipboard.Clear
Picture = Clipboard.GetData()
SavePicture Picture, App.Path & "/scr.bmp"
End Sub

Except it doesnt work =S.....anyone know how to create a file when the form unloads itself?

Hmm on second thoughts, this doesnt seem to be the problem...the problem is that it doenst' transfer all of its data. Sometimes it does but other times it doesnt. I've chunked the large BMP file into 3kb sizes. It works sometimes but then doesnt other times. Any help would be appreciated.
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
lol it's strange why are you clearing the Clipboard first and then taking the contents from it?> :S
 

dakz0rz

New Member
Joined
Mar 17, 2004
Messages
14
He has a point there... why are you clearing the clipboard before you are getting the data?

I have already created my major..
Its a parity simulation in turbo pascal where you have to use Procedures
go me
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Heh sorry to say dude it was pretty flawed some parts of your application, for example locking the comp? perhaps disabling any keyboard combinations would of been good, becoz it was pretty easy to by pass, furthermore, the UI isn't too good, not as friendly, nor make much sense to an average user... however it's not a bad idea... good work non the less.
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
Winston said:
Heh sorry to say dude it was pretty flawed some parts of your application, for example locking the comp? perhaps disabling any keyboard combinations would of been good, becoz it was pretty easy to by pass, furthermore, the UI isn't too good, not as friendly, nor make much sense to an average user... however it's not a bad idea... good work non the less.

I know, i sorta left the UI till the very last minute :S. I suppose disabling the keyboard as well as locking form would have been better....i ddint think of that. Ah well too late now. Thanks ^^.
 

J0n

N/A
Joined
Aug 28, 2003
Messages
410
Gender
Male
HSC
2004
:angry: Why did you make that for your major project? An ex-student made one of them and sold it to our school. Now the teachers us it to spy on us. The good thing though, is that he made it in VB, so it is easy to reverse engineer :D
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
Me and my friend actually have another version we made in class. I made it so that i coud mask what we were really doing. Me and my friends version is now on all the school comps. Its fun to see the peoples faces when a matrix message comes up on the screen saying "Knock Knock (Insert student name here)" ^^
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
My school had this program but like it was a professional program on trial but it doesn't just take screenshots, it allows the teacher to take control of the users comp as well as doing anything they desire...
 

Merforga

Member
Joined
Mar 11, 2004
Messages
384
Location
A small rabbit hole....
We have that too. (The professional version i mean) But the program we made also has that. I didn't include it in my program because we developed that bit of the program too late. Plus my major was only a MONITOR.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top