C#/WPF image overlay on browsers - c#

I am working on a wpf project and want to open browser (IE,Chrome,Firefox,Microsoft edge) on button click. After the browser opens I need to detect it's settings button on right corner and display an arrow image or a tooltip pointing to it.
I know how to open the browser using process.start but how to detect the settings area?

Get the browser's handle (HWND) after you open it (as shown in this answer), and read this answer on how to draw the arrow.
What you're trying to do is not easy, and has many points of possible failure, so I would avoid it, if some alternative was present.

Related

How to avoid size change when user drag window to top/right/left of screen

When I drag a window to the Top/Left/Right of screen, the window will be magnified or max automatically.
How to avoid system max or magnify this window when user drag it to specified area?
If you want to disable Snap, please follow this guide
To turn Snap on or off
Open the Make the keyboard easier to use page by clicking the Start
button Picture of the Start button, clicking Control Panel, clicking
Ease of Access, clicking Ease of Access Center, and then clicking Make
the keyboard easier to use.
Under Explore all settings, click Make the mouse easier to use.
Under Make it easier to manage windows, do one of the following:
To turn Snap off, select the Prevent windows from being automatically
arranged when moved to the edge of the screen check box.
To turn Snap on, clear the Prevent windows from being automatically
arranged when moved to the edge of the screen check box.
Click OK.
As I mentioned in the comment, please don't try to manipulate this through (application specific) code.
Thanks for everybody...
I make a trick in SizeChanged event.
When size is changed, application will re-size to original size...

Disable click on a 3rd party application

I'm writing an application that needs to record a click location on the screen, over the top of another window using the mouse. Is there anyway to disable the mouse click so that it doesn't affect the window that is being clicked over?
e.g. I want to set a point over the top of my browser, but I don't want to click anything within my browswer whilst setting it.
You have a couple options:
Write a plugin/extension for the browser you're talking about. Maybe the browser's interface allows you to record such information
Use windows hooks. Using SetWindowsHookEx and WH_MOUSE_LL, you can get all mouse activity on the computer fairly simply. You will just need to check if the mouse activity is happening in the browser, using WindowFromPoint.

How Do I Manipulate the Area of a Double-Click for Windows Surface (SUR40) Table

I can't seem to find the topic of manipulating the size of the double-click area anywhere. By this I mean that on the SUR40 and some programs I made, the double-click area is way to small for me and some others. While we try double-clicking on a file, folder, item, etc. if we double click by a hair's width off from the first touchdown, the second touch is registered as a drag. I was hoping if anyone would know how to manipulate this to enlarge the area of the click so we could double click without needing to have pin-point precision on both clicks.
I'm almost certain this could be coded in my programs (written in C#) but I haven't the faintest idea where/how to do this. My only guess would be to create a new doubleclick event or class, but apart from that; I'm in the dark as to how I would code it. I'm also hoping there is a way to manipulate this problem for the Windows 7 desktop as well.

How to get WPF window close button design?

I want to use the Close button as it shown in WPF windows application into my application.
Is it possible to get the design/image from the existing resources? Anyone points to me to get Pressed, Normal and Hover icons for close?. I could not get them all in one place to match each other..
I have attached close button image here..
That part of the window, termed the chrome, is not rendered by the WPF framework. You can create a chromeless window and render you own chrome. There are quite a few articles / blogposts that describe this. For example:
http://blogs.msdn.com/b/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx
If you just want the images, try a screen capture tool.

How do I create a Popup Dialog box in Silverlight?

I'd like to create a popup dialog box in silverlight in which i can manipulate controls, enter data, and return a value. I want it to be modal, so that when it is open, the page "Below" is inaccessible. I havent found an easy way to do this yet. Any suggestions?
I know the question asked for a Silverlight 2 solution but in Silverlight 3 (Beta now, RTW in July 2009) there is a built-in ChildWindow that can do everything you're looking for.
I haven't found a perfect solution either. The closest I have seen is this:
Using Popup to create a Dialog class
If it is ok to be non-modal, you can try this tip using HtmlPage.PopupWindow().
How to Popup a Browser Window
I'm new to the Sliverlight framework and am just starting to figure it out, but I have a similar need for a popup modal dialog box. I just tried an idea that looks promising:
I created a Rectangle (named "Shield") that covers my entire application area. It exists on top of everything in the main app. I set the fill-brush to White, and the opacity-brush to 81% so that the main app contents show through, but lightly (as in disabled). Then make sure the "Shield" is hit-testable. Now, when the "Shield" is visible, it will also, in effect, block all input to the controls below (at least from the mouse, haven't tried keyboard yet). When the app initializes, set the "Shield" visibility to Collapsed. In that state it won't block input to the main app.
The dialog box is then constructed on another canvas element that exists in the z-order on top of the shield. Normally the dialog box will be invisible, but when I need it, I just set the "Shield" to visible, and the dialog to visible. Since the dialog is on top of the "Shield" I get a very modal-like behavior. When the dialog box is closed, make both the dialog canvas and "Shield" canvas invisible again and the main app is again active.
I'm sure this the most brute-force way of doing it and that I will eventually zero in on a more elegant construct, but it works for now.
A more elegant solution is here:
http://community.devexpress.com/blogs/theonewith/archive/2008/08/06/custom-silverlight-controls-creating-a-reusable-messagebox-dialog-part-i.aspx
I had the same requirement and ScottGu's Building a Basic Modal Dialog Using a User Control was the best solution that fit my requirement.
Here's a free library that provides one: http://www.vectorlight.net/demos/popup_dialogs.aspx

Categories

Resources