-
Remote Desktop Application Example
Hello everyone..
Here,this is a remote desktop kind of software...It isnt veryy effective..but,I think its not bad for my 1st beginner program on this field in vb.net.
I have used the readymade classes for sending files and messages provided by UNolibs.Net
Using this program,the desktop can be viewed,mouse can be controlled...Keyboard keystrokes cannot be controlled as of now...will be implemented soon.
As for speed,it is not very efficient right now.
A very important Note:This program needs 2 computers to work..It cannot be tested on a single computer.A drawback with this program is that It will not work under different subnets.
Special Thanks to
UNolibs.Net
for their functions and classes to sendfiles and messages.This is included in the following attachment too
SCREENSHOT OF REMOTE DESKTOP CLIENT
http://www.vbforums.com/attachment.p...chmentid=40653
SCREENSHOT OF REMOTE DESKTOP SERVER
http://www.vbforums.com/attachment.p...chmentid=40652
-
Re: Remote Desktop Application Example
Maybe you could attach the files in .zip format as I think more members have winzip then winrar. ;)
I only have winzip. :(
-
Re: Remote Desktop Application Example
oh..
Ok,Ill do that soon..
Im just working on submitting another code in few minutes :) Ill change the rar into zip right after that Robby. :)
-
Re: Remote Desktop Application Example
I just looked at the link and it looks interesting. No sockets needed.
-
Re: Remote Desktop Application Example
yeah,Im a fan of his code...;) Its really great coding
-
Re: Remote Desktop Application Example
I changed it to Zip now.I hope no one has problems downloading and extracting it anymore :)
-
Re: Remote Desktop Application Example
hmmm...I guess not many people out here like a remote desktop :ehh:
-
Re: Remote Desktop Application Example
Heyyyy,THREE ppl have downloaded and seen so far...
Thank You guys :D soo happyyy :D
Please dont forget to post your comments too ...Be free to say anything bad or good...All for Good ;)
-
Re: Remote Desktop Application Example
Hey! great code u have here! very nice and cOOLLL!!!! : :) wave:
when will u release ur next version of this? especially the viewing of the screen seems slow but i think i little coding of your should do!!! im gonna wait for it!!!
-
Re: Remote Desktop Application Example
Thank you tovb...
You're really encouraging..
Yes I will do the next version very soon..I think I need to convert the picture into bytes and then convert it back..
If you have any ideas,you're welcomed..:)
And next version will also give you the power to send keyboard events...In this version,only mouse events are working :)
-
Re: Remote Desktop Application Example
wow, that would be great!!! im really looking forward to that new version of ur program. i can't wait!...ok! if i have any ideas, i'll post it in here!! i think creating this kind of program is kind of cool :cool: and say.. an achievement :thumb: as for my part..hehehe. gud luck! :wave:
-
Re: Remote Desktop Application Example
hi
i'm really exited from your project :eek2:
you are realy a professional programmer :thumb: ;
this program is final project of my university term;
can you help me, how do you write this code,
& what are your resources for writing this program? :wave:
& i'll be too glad , if i can see new version of your software soon.
good luck ;) :thumb: :wave:
-
Re: Remote Desktop Application Example
Hi Sba..
Thanks for all the encouraging stuff :) so happy..
I did get help from third party tools like unolibs.net too as mentioned on top..
Go through the code ...
If theres some specific thing you need help with,Ill be glad to help...its your turn to make an attempt on your project before asking help :) so that youll find the specific place where you need help.
Wish you success :)
-
Re: Remote Desktop Application Example
many thanks for this sample,
i was just asking if i can add a new form in the client side to view the server side, can you please help me :cry: :cry:
-
Re: Remote Desktop Application Example
Hi lightmoon...
Im not sure what you mean...
well,adding a new form causes no problem for me...
And I wonder why u need a new form? Theres already a new form to view the server side.
I dont understand what you mean ...can you tell me little more detailed and clearly if possible? :) Thanks for trying this out..contact me through this forum for any help:)
-
Re: Remote Desktop Application Example
hi there
maybe i didnt explain it so well, wish that this time i will.
your program has two sides, first one can control the second one, and i name the controlled side as client, and the side who do control and who can view the other by Server.
what im asking that how can i add new form on the client side" who is monitored by the other side" in which the client can view the server side also, i mean view its screen.
in simple word, i want both sides to have a form that they can view the other through it.
i was working on it, but really i couldnt make it better than this, i have many errors while trying to do it, so can you please post me a newer verson of it contain this, or to tell me how to do this??
many thanks bro :wave: :wave: :thumb:
-
Re: Remote Desktop Application Example
Hi lightmoon,
I will definitely help u in anyway I can...
I cant right now immediatly get a newer version...but I will after a while :)
but,I will do all necessary help so you can make it yourself ..You could post the better version too :)
ok,the main concept ive used to do this is that...I use the sendmessage function to send command to the other computer and i check that command there...
for example...i can send the message "viewscreen" and when the other computer recieves it,i set it to send a picture of the screen.
please tell me what errors you are facing...I will help you out :)
-
Re: Remote Desktop Application Example
many thanks for replay,
i got everything now ok, but the point is sometimes i got IOException on the side i add the new form on it to view the other side screen.
also if you remember that part, i got "error 5, use another file name" in message box.
wish that you will help me in this and many thanks for you.
waiting your answer
-
Re: Remote Desktop Application Example
the main error i have now, and i think it cause all the problems that in the client class, i have IOexception, which is "Unable to open file", i tried to comment the throw statment, but also i have null reference in the following line, i think you can remember it, its a part of Client class code
Dim buffer(PacketSize - 1) As Byte
wd = fileStream.Read(buffer, 0, PacketSize)
in this line i have the exception, can you please tell me, what is the reference may has null value??
another thing, the other side view almost of the time one or two screen shots of my side, and then this exception occures.
can you please help me in this??
-
Re: Remote Desktop Application Example
Hey..
Dont change anything in those server client class files...I didnt make them..I got them from unolibs...
http://www.codeproject.com/useritems/UnoLibsNet_V2.asp
And there is a small problem with the efficiency of my program...It is slow...and especially if you want it to work both sides at the same time,Its going to be more slow.
It captures the screen image and stores it on the c:\ on the other computer...
As soon as the file gets transferred,it requests for the next frame..
This happens continously...thats how this thing works :) So,if you use both sides at the same time,it would perform very badly I think
-
Re: Remote Desktop Application Example
I need to use serialization or something to make it work better I guess :) Ive used a childs method now.
-
Re: Remote Desktop Application Example
Quote:
i got everything now ok, but the point is sometimes i got IOException on the side i add the new form on it to view the other side screen.
Did you use the event handler which listens for the message? Did you declare a new instance of the class for listening??
-
Re: Remote Desktop Application Example
You'd have to check which byte has been changed, and only send the changed bytes. That's how W2K's Terminal Server is. It is super fast for most things.
-
Re: Remote Desktop Application Example
hi,
wish you help me in this part, cause i need your help here so hard.
what i was looking forward is to make server broadcast his screen for multi clients,i mean that server will display its screen on two clients monitor's or more, but at least im testing the applicatino on two clients.
i tried to send them the two files in same two messages,
clsc.SendMessage(arr(0).ToString, 1234, "readyforcap")
clsc.SendMessage(arr(1).ToString, 1234, "readyforcap")
clsc.SendFiles(arr(0).ToString, 1234, dw.FileNames)
clsc.SendFiles(arr(1).ToString, 1234, dw.FileNames)
the arr array contains the clients IP's which i will broadcast my screen to.
this caused many exceptions for me, the first one said "Stack Empty", and many other, most of them in the function " SendFilesTS()".
can you please help me in this, and tell me how can i solve this??
many thanks
-
Re: Remote Desktop Application Example
sendfilesTS???
Ill just reply u soon buddy...Im in my office right now...in a hurry..Ill get back soon
-
Re: Remote Desktop Application Example
this is great nice work i think this is extremely good for your first try. :thumb: :bigyello:
-
Re: Remote Desktop Application Example
-
Re: Remote Desktop Application Example
Hi,
It's really one the best Application i have seen................do you have any idea about how to go for Keylogger thing........
Regards,
Ritesh
-
Re: Remote Desktop Application Example
Hi,
Its very simple to make a keylogger if you use an API :)
-
Re: Remote Desktop Application Example
But I guess vbforums will not support u making such stuff :)
-
Re: Remote Desktop Application Example
I executed the application "remote desktop server " and now I have problems when I start the pc. :sick:
it shows me the window for debugger this application. it has installed something to me in the start??
ERROR:
Quote:
'svchost.exe': se cargó 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', no se pueden cargar símbolos.
'svchost.exe': se cargó 'C:\Archivos de programa\svchost.exe', no se pueden cargar símbolos.
'svchost.exe': se cargó 'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll' , no se pueden cargar símbolos.
'svchost.exe': se cargó 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', no se pueden cargar símbolos.
'svchost.exe': se cargó 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', no se pueden cargar símbolos.
'svchost.exe': se cargó 'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50a3a\microsoft.visualbasic.dl l', no se pueden cargar símbolos.
'svchost.exe': se cargó 'c:\windows\assembly\gac\mscorlib.resources\1.0.5000.0_es_b77a5c561934e089\mscorlib.resources.dll', no se pueden cargar símbolos.
Excepción no controlada del tipo 'System.TypeInitializationException' en svchost.exe
Información adicional: Se inició una excepción en el inicializador de tipo de "System.Net.Sockets.Socket"
Some help?
-
Re: Remote Desktop Application Example
You have problems when you start your pc?
I will check the code again Anna,please keep me updated if you still have some problem...
-
Re: Remote Desktop Application Example
Yes I still have problems.
I don't know if it has to see something, but since I tried this code appears this message "You're under attack" when start the pc also, and I cannot eliminate it.
regards,
Anna
-
Re: Remote Desktop Application Example
I have recompiled the server code also..If possible,contact me on any IM ..Ill help you online...
Btw,yes you're right...there was an executable called svchost.exe..I really dont know how it got in there...I've fully freshly recompiled the code and uploaded.
If you have more problems,try contacting me online.
Thanks
-
Re: Remote Desktop Application Example
I have solved the problem. Ultimately I found the copy of the file , what "svchost.exe" had create it. This one was the responsible of all the problems and the message: "You're under attack"
I deactivated this service and delete the file that it had created.
regards,
Anna
-
Re: Remote Desktop Application Example
-
Re: Remote Desktop Application Example
thx for this code I own U :D
-
Re: Remote Desktop Application Example
but I have this error and I cannot see any thing wrong with that line
VB Code:
wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
Error 42 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 192 22 WindowsApplication2
VB Code:
wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
Error 41 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 189 18 WindowsApplication2
VB Code:
client.Send(buffer, wd, Sockets.SocketFlags.None)
Error 3 Overload resolution failed because no accessible 'Send' can be called without a narrowing conversion:
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
'Public Function Send(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ClientClass.vb 79 13 WindowsApplication2
-
Re: Remote Desktop Application Example
Any way I don't need those functions thx :)
-
Re: Remote Desktop Application Example
Quote:
And next version will also give you the power to send keyboard events...In this version,only mouse events are working
You might try using this API:
VB Code:
Public Declare Function apiAttachThreadInput Lib "user32" Alias "AttachThreadInput" (ByVal idAttach As Integer, ByVal idAttachTo As Integer, ByVal fAttach As Integer) As Integer
To send keys to more than one window (x) at a time.
I'm not sure if you can use it in this situation.
Oh, and no more attacking PC's, someone might think you're a terrorist! lol :D
Quote:
I don't know if it has to see something, but since I tried this code appears this message "You're under attack" when start the pc also, and I cannot eliminate it.