Jump to content
Sign in to follow this  
decadence

_IECreateEmbedded() Trasparency problem?

Recommended Posts

decadence

Hello guys; I've got a small problem with _IECreateEmbedded(). I decided now that I will create my GUI's with HTML/CSS instead of going through AlphaGUI and all that GDIPlus for Transparency and so on. I've made codes that took literally 500 lines of code only for the GUI. They're hard to resize/minimize, some flickering and so on. I know that with _IECreateEmbedded and _IEGetObjById I can use a "HTML" as my GUI Front end. 

But I've noticed a small problem, I searched google and the forums a lot and I couldn't really find the answer.

I am kinda new to Objects and so on but at least I am trying.

Here is the problem:

 

This is how the website looks on my Browser (Opera/Firefox/Chrome/Maxthon)

2zgwy6o.png

 

This is how it looks with the embedded Web control

2hga1bc.png

 

This is just a sample website, what happens is that the transparency just don't work at all! I tried using the 

ObjCreate("Mozilla.Browser.1") and I got the same problem. It has to do with the Version of the browser, how can I use IE9 (embedded) ? What are the workarounds? any idea? 

I could attach everything if I knew how to :D.

Anyway thanks guys!

 

Share this post


Link to post
Share on other sites
JohnOne

IE Browser control uses IE7, most likely your problem.

I'd be interested to see your code which has the same problem using ObjCreate("Mozilla.Browser.1")

I could attach everything if I knew how to :D.

copy and paste for code.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
decadence

Grab the files with the HTML here

Please open the file ss_2.au3

Try to also open the index.html on your "Real browser". and if you've got IE7, try to open it there as well.

I am using >THIS method. And you'll need to have the Mozilla ActiveX thing installed in order to have it working with Mozilla. If you swap the second line: $oIE = ObjCreate("Mozilla.Browser.1") with $oIE = _IECreateEmbedded() You'll see no difference. But I've tried to open the www.whatismybrowser.com from my Embedded browser and it gives the correct information (If I am Using  $oIE = ObjCreate("Mozilla.Browser.1")  it shows Mozilla as my browser) and if I am using $oIE = _IECreateEmbedded() it shows IE as my browser. 

 

The Mozilla version though from this ActiveX Link (the only one I could find) is pretty old though...

#include <GUIConstants.au3>
$oIE = ObjCreate("Mozilla.Browser.1")

; Create a simple GUI for our output
GUICreate ( "Embedded Web control Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2)
$GUIActiveX = GUICtrlCreateObj ( $oIE, 10, 40 , 600 , 360 )
$GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30)

GUISetState () ;Show GUI


$oIE.navigate(@Scriptdir&"\index.html")

; Waiting for user to close the window
While 1
$msg = GUIGetMsg()

Select
Case $msg = $GUI_EVENT_CLOSE
$oIE = 0
ExitLoop
Case $msg = $GUI_Button_Home
$oIE.navigate("http://www.autoitscript.com")
Case $msg = $GUI_Button_Back
$oIE.GoBack
Case $msg = $GUI_Button_Forward
$oIE.GoForward
Case $msg = $GUI_Button_Stop
$oIE.Stop
EndSelect

Wend

GUIDelete ()

Exit

Thanks John!

Edited by decadence

Share this post


Link to post
Share on other sites
JohnOne

Ah! I see, that old mozilla control.

There is a >FireFox UDF which I think supports latest FireFox, but also needs third party tools Mozrep (linked in thread)

I also seen someone post a UDF which I think forced the IE embedded browser control to use rendering from later IE8 or IE9, not sure where though I'm afraid.

If I find it before you I'll link it here.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
decadence

Thank you for your time, I will test them now. :D

Share this post


Link to post
Share on other sites
decadence

>This solution works, but I had to install IE9 (which took me about 15 minutes because it also managed to update half of my Windows 7). Which is OK but if I want to distribute this to a friend he will also have to install IE9 - and from what I just learned, there is no (easy way) to do so. There is no offline installer and it will also force a windows update upon your computer... Apart from that I noticed that the website takes a lot to load (even though it is LOCALHOST). But it also takes a lot to load using IE9 normally. Which is weird because it is a lot faster with Firefox/Maxthon/Opera/Chrome... Well thats the reason no one uses IE anymore I guess haha.

 

So I will try now  the  title="">FireFox UDF, I am still struggling to get it working the way I want, couldn't really find examples. Do you think it is possible to know the events that is going with Firefox similar to "$oIEEvents1 = ObjEvent(_IEGetObjById($oIE, "Menus"), "_MyLink_")" ?

 

Thank you so much for your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×