WebBrowser Problem if AllowsTransparency=True - c#

I'am using Smith Html Editor (https://github.com/adambarath/SmithHtmlEditor) in my program main window AllowsTransparency=True and web browser not showing, I can't do AllowsTransparency=False because I need this. I know this problem is related to win32. I searched the Internet and I can't find a solution. Is there any trick to fix this?
If I AllowsTransparency=False corners turn black.

Related

Webbrowser control stopped showing instagram

I have windows forms app which has a webrowser control. I am using it to login to instagram. Until today it worked just fine. Today it started to give the script error and stuck at the splash screen.
To see if it is because I unknowingly did something on the project, I even created a brand new solution with a web browser and only changed its url to instagram and it gave the same error.
So that made me think two possibilities.
1- As in lots of questions, it is browser version emulation thing, which is solved by reg update. I tried all didnt work. And my webbrowser works in latest version anyway, as you can see in textbox on top right corner. but somehow maybe I didnt apply the solution correctly.
2- Instagram itself somehow detected webbrowser access and blocks me.
If anybody can help, it will be highly ağpprecaited.

Add Button to Non Client Area in WPF

A follow up to my Previous Question on adding a button to the Window Chrome (also known as the Non Client Area) in Windows Forms, I have decided to switch to WPF to have a better chance of solving my issue. I need to add some buttons to the Non Client Area or Window Chrome similar to that of Firefox 4
From what I have heard it is easier to do this in WPF. I have no idea where to start. If possible could someone give me some guidance on how to do this?
You should modify the Window Control Template. See examples here.

AnimateWindow Winforms causing hyperlinks to disapear

I'm using AnimateWindow from C++ to show a toast notification in the bottom right of my monitor. This all works fine in terms of animation so there's not a functionality issue.
My Toasts are Forms styled to look "nice" using Form.Load, Form.Close to set the window position and show it via the animation.
My issue is as the form is animating I lose hyperlinks and images. These appear again when the form is stationary.
Has anyone come across a similar issue as this? At first, I assumed it was a parenting issue which I attempted to solve by setting the parent of the Hyperlink and Icons to this which didn't solve the issue and I'm stumped from here on.
This was an issue with parenting as suspected. I solved this by setting the parent of the icon on top of the control below to the below control.
foregroundImage.parent = backgroundImage;

WebBrowser Control not showing PDF anymore

Googled really much on this issue, but didnt find any related problems.
I wrote a Browser with WinForms and the webbrowser control and since a week ago the Browser is showing a little Icon on the top left corner with an "x" in it instead of PDF File on every Website.
Dont know why, cause it worked fine for a couple of months.
Also tried to change back to the IE9 Engine by setting the registry entries, cause i thought about some IE Updates. But didnt work.
Any suggestions?
Found the source of the problem. The trick is to build a x86 application. If you set any cpu or x64 platform in your build settings, this little box with the "x" will show up when you try to view PDFs.
But really dont know why this happens and why he can find addons from IE in the webbrowser control, cause i didnt use any one of them in my code and im also not using any dlls for this. And why IE is showing PDFs without Addons activated.
But its working again now.

Disable other software besides Chrome

I need to write a program that forces Google Chrome to be in the front and disable all other actions like opening another program etc... I just need to have Google Chrome in front of the screen and that's all. I can't allow other programs to pop up.
Any ideas how it can be done?
Thank you!
Im pretty sure as far as you can get is a popup window that has no scrollbar or top bar, and can't be resized, but JS wont let you manipulate stuff outside the current window, just like you cant auto-click links inside an iframe
I highly doubt this is possible in Windows, and if it is it won't be ethical if used on home PCs. Will this be a kiosk style app?
You can control what appears in the browser to some extent, such as scrollbar-less windows but much more than that is impossible.
Definitely not ethical at all but applications such as Fortress 101 can do this. I have done similar things in the past using C and the Win32 API. I won't write the code for you but I basically did the following:
Find the desktop and hide it
Find and hide the taskbar
Find and destroy the start button
Capture special keypresses and prevent them from working as expected
You would also need to poll a process list because even doing all of that doesn't prevent the user from downloading a file and executing it. Thus if you found a new application in the process list, you could destroy it.
You could do this using user32.dll with C# but such an application would better be left to commercial software packages.

Categories

Resources