From: Matthew Arkin on 15 May 2010 17:07 First: I'm not the best developer so please excuse any noobiness. I have a friend that a CS teacher and he want to let his students use an IDE during their exam. To minimize cheating I recommened that he set up a server with RemoteApp and install the IDE (Greenfoot). Then I was able to make a little app that will launch it. I want the app to be on top of the taskbar but I can't do that unless I set TopMost to true, but then they can't view the RDP session and if I kill explorer then RDP won't connect. So the real question is a) can I have an application sit on top of the taskbar with out killing explorer and using TopMost? B) is there a way to embed RDP into the app (I can use WPF or WinForm) or C) any other suggestions? Thanks! Matthew Arkin Windows Desktop Experience MVP
From: Jackie on 16 May 2010 03:58 On 5/15/2010 23:07, Matthew Arkin wrote: > First: I'm not the best developer so please excuse any noobiness. > > I have a friend that a CS teacher and he want to let his students use an > IDE during their exam. To minimize cheating I recommened that he set up > a server with RemoteApp and install the IDE (Greenfoot). Then I was able > to make a little app that will launch it. > > I want the app to be on top of the taskbar but I can't do that unless I > set TopMost to true, but then they can't view the RDP session and if I > kill explorer then RDP won't connect. > > So the real question is a) can I have an application sit on top of the > taskbar with out killing explorer and using TopMost? B) is there a way > to embed RDP into the app (I can use WPF or WinForm) or C) any other > suggestions? > > > Thanks! > > Matthew Arkin > Windows Desktop Experience MVP It appears like you would be willing to terminate the shell process if it allowed RDP to work properly. Taking that into consideration, how about simply hiding the taskbar?
From: Jackie on 16 May 2010 05:11 On 5/16/2010 09:58, Jackie wrote: > It appears like you would be willing to terminate the shell process if > it allowed RDP to work properly. Taking that into consideration, how > about simply hiding the taskbar? I don't currently have a chance to test anything in C# but at at least the following WinAPIs can be used: GetDesktopWindow FindWindowEx - "Shell_TrayWnd" class ShowWindow - hide/show If I recall correctly, it may show itself again some time. Using this method, you would need to make sure to hide it again. It would look a little amateurish having it show up and then disappear again, so there may be better ways. You can also of course disable or hide the desktop using this method as well.
From: Matthew Arkin on 16 May 2010 14:10 On 5/16/2010 5:11 AM, Jackie wrote: > On 5/16/2010 09:58, Jackie wrote: >> It appears like you would be willing to terminate the shell process if >> it allowed RDP to work properly. Taking that into consideration, how >> about simply hiding the taskbar? > > I don't currently have a chance to test anything in C# but at at least > the following WinAPIs can be used: > GetDesktopWindow > FindWindowEx - "Shell_TrayWnd" class > ShowWindow - hide/show > > If I recall correctly, it may show itself again some time. Using this > method, you would need to make sure to hide it again. It would look a > little amateurish having it show up and then disappear again, so there > may be better ways. > You can also of course disable or hide the desktop using this method as > well. Thanks, Would it be possible to just make the remote desktop window topmost? (It also launches a seperate credentials window)? If so, would that be easier?
From: Jackie on 16 May 2010 15:45 On 5/16/2010 20:10, Matthew Arkin wrote: > On 5/16/2010 5:11 AM, Jackie wrote: >> On 5/16/2010 09:58, Jackie wrote: >>> It appears like you would be willing to terminate the shell process if >>> it allowed RDP to work properly. Taking that into consideration, how >>> about simply hiding the taskbar? >> >> I don't currently have a chance to test anything in C# but at at least >> the following WinAPIs can be used: >> GetDesktopWindow >> FindWindowEx - "Shell_TrayWnd" class >> ShowWindow - hide/show >> >> If I recall correctly, it may show itself again some time. Using this >> method, you would need to make sure to hide it again. It would look a >> little amateurish having it show up and then disappear again, so there >> may be better ways. >> You can also of course disable or hide the desktop using this method as >> well. > Thanks, Would it be possible to just make the remote desktop window > topmost? (It also launches a seperate credentials window)? If so, would > that be easier? It does not appear to be a way to do this with only managed code. I am thinking about something like this... EnumWindows - enumerates all top-level windows GetWindowThreadProcessId - get the ID of the process thread that created the window OpenProcess and GetModuleFileNameEx - get the file name of the process and check if it's RDP By now, you know that this window is owned by RDP at least and you can do some additional checks, maybe. After finding the right window(s)... SetWindowPos - HWND_TOPMOST Phew.. PInvoke is a good site to see how to use each API into C#: http://www.pinvoke.net/
|
Next
|
Last
Pages: 1 2 3 Prev: ListView Horizontal Scrollbar Next: Create dynamic code by using Reflection |