Re: How to test if RemoteDesktop still connected from c# Options
On 31 Jul, 09:56, lawrence.barw...@googlemail.com wrote:
> On 31 Jul, 09:23, lawrence.barw...@googlemail.com wrote:
>
>
>
>
>
> > On 30 Jul, 19:26, "TP" <tperson.knowsp...@mailandnews.com> wrote:
>
> > > Lawrence,
>
> > > Here are some steps to get you started:
>
> > > 1. Start a new c# windows project
> > > 2. Tools-->Choose Toolbox Items-->COM components tab,
> > > check Microsoft RDP Client Control (or similar), click OK
> > > 3. Drag the RDP control from the toolbox and drop it on your form
> > > 4. Drag a button from the toolbox and drop it on your form
> > > 5. Type the code for the button's click event, use my sample
> > > code from earlier as a guideline, making changes/additions
> > > where necessary
>
> > > Once you get the above working fine you can start adding
> > > features to suit your tastes--perhaps you want one form for
> > > all of the connection settings and a separate form to hold the RDP
> > > control.
>
> > > -TP
>
> > > lawrence.barw...@googlemail.com wrote:
> > > > TP,
>
> > > > You have been a great help!
>
> > > > I am able to run following code without errors, but, no RDP window
> > > > appears. I looked for a .visable property, but there does not seem to
> > > > be one. Is there something I am missing? Sorry, to ask again, but you
> > > > have been very accommodating...
>
> > > > Lawrence
>
> > > > IMsRdpClient RDP = new MsRdpClient();
> > > > RDP.Server = "156.4x.xx.xx";
> > > > RDP.UserName = "xxxx";
> > > > RDP.FullScreen = true;
> > > > RDP.DesktopHeight = 300;
> > > > RDP.DesktopWidth = 300;
> > > > RDP.Connect();- Hide quoted text -
>
> > > - Show quoted text -
>
> > TP,
>
> > Great - got that working.
>
> > Could you tell me how to put an ondisconnected handler in?
>
> > Do I create a method with that name?
>
> > I find there is no sample code on MSDN at all - otherwise I would not
> > continue to bother you.
>
> > Many thanks,
>
> > Lawrence- Hide quoted text -
>
> > - Show quoted text -
>
> Actually found some code at last!
>
> Thanks TP got that all working now.
>
> But I have another question please: How can I connect as 'console'
> please. i.e. when I am connecting to Srver where more than one session
> can be established?
>
> normally I run 'mstsc /console' is there a way I could specify that?
>
> Lawrence- Hide quoted text -
>
> - Show quoted text -
TP,
I worked that out too. Making some progress here!
I have an issue I can't resolve - when I connect I go to fullscreen
mode then if I minmize window it collapses to taskbar, but I can't
maximise it again - all options are greyed out except 'close'...
Lawrence