I've developed a simple .net form application where I've embedded the RdpClient ActiveX.
To reproduce the application, you have to:
'Add Reference' and select COM
include 'Microsoft Terminal Services Control Type Library'
select the ToolBox, 'Choose Items...' and go to 'COM Components' tab
look for 'Microsoft RDP Client Control - version 6' (this is the version I've used)
Now you can drop this Control on the form.
Handle the form Shown event with this code
axMsRdpClient6.FullScreen = true;
axMsRdpClient6.Server = "yourserver";
axMsRdpClient6.Connect();
Then when the rdpclient window appear, click the minimize button on the top bar.
My question is: why the event AxMSTSCLib.AxMsRdpClient7.OnRequestContainerMinimize is not fired when minimize button is clicked?
I need to handle when the user minimize the client to take peculiar actions (write log files, activate other windows application and so on).
I've found the answer in MSDN
This method will only be called if the container-handled full-screen mode is enabled - see
IMsTscAdvancedSettings::put_ContainerHandledFullScreen for more information.
Related
I'm trying to programmaticly (from my own application) press a button that is located on another running windows (WPF) application.
Todo so, a handle to the button would be needed. There are plenty of posts about how to get such a handle.
However, it seem that WPF applications don't present handles for their graphical components:
https://www.experts-exchange.com/questions/25665615/Spy-or-Windows-Api-Functions-not-locating-controls-on-child-window.html
Any clues on how to achieve an automated press on a button in such an application?
I don't have control of the source code for the application with the button.
I believe you'll need to look into UI Automation https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview
With 'Calculator', I can click button by use FindWindowEx and SendMessage.
But some application can't use spy++ to get information of button.
For example 'Visual Studio'. How I can click buttons in this application?
In Windows Forms or Win32, UI elements like buttons are native OS window objects. However, I believe Visual Studio is written using WPF where buttons are not native OS window objects, so FindWindowEx will not work on them. You should try to using UI Automation to interact with user interfaces (e.g. to click buttons) and tools like Inspect.
I have a WPF application that runs in the system-tray & monitors HTTP activity.
When I right-click my system tray icon, I can launch a "Control Panel" from a context menu command.
However, when a user goes to StartMenu\Programs\MYAPPLICATION and clicks on menu item called "Control Panel" I would like to fire a method that displays the control panel (just a regular WPF Window),
How can I achieve this?
On application launch you could check if there is another instance running. Then via interprocess communication of your choice (e.g. WCF, named pipes, .NET remoting, a drop file, etc) you could instruct the original instance (via whatever means the chosen communication method provides) to show the required window.
Guys i have the awesomium webcontrol that was available in the toolbox and it doesnot display choose file or any dialog box for uploading files(e.g. uploading pic/video in facebook).pls give the complete procedure on how to enable it.i am using visual c# and it is a wpf application.
Some more info is needed.
Are you referring to the WinForms or the WPF WebControl?
Have you downloaded the latest RC? Download it here.
The WinForms WebControl provides all dialogs. The WPF WebControl provides all dialogs too, however, folder selection dialogs are only supported on Windows Vista and newer. If the dialogs do not appear, you may have to handle the SelectLocalFiles event. Make sure the event is fired. If it is but you still see no dialog, handle the event yourself and display your own modal dialog. Provide the result to FileDialogEventArgs.SelectedFile or FileDialogEventArgs.SelectedFiles and don't forget to set FileDialogEventArgs.Handled to true.
What version of Awesomium? You need probably 1.7RC2 which has modal dialog boxes.
i have application with one form, which i developed in c#. I would like to hide the form when a user clicks somewhere else then on the form or on the notification icon (in system tray). How could i do that?
I am not 100% sure you can do it with the standard event exposed by Visual Studio in the designer but if you could attach to the DeActivate event, or form lost focus, then you can call form.Hide