Jump to content

Why isn't this code working???


Recommended Posts

Hi. I have this code:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()

$oIE = _IECreateEmbedded()

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 923, 877, 206, 31)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 939, 892)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

_IENavigate($oIE, "http://www.cellsolid.com/files/template.png")

But, it's not working, it's just showing a blank screen, yet the URL is correct. What's wrong?

I'm trying to embed a .png into a GUI, because GUICtrlCreatePic doesn't support PNG, and I need the image to be as clear as possible.

Thanks alot.

Link to comment
Share on other sites

Quicktime is probably your default *.png viewer.

-I have to assume that it is having problems because of the png ending. I tried .com, .net, and .htm and all worked fine.

Edit:

Did you get it working?

I have been playin around with it and couldn't get it to work until I added the debugger for line 12...

for some reason that made it work:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

_IEErrorHandlerRegister()

$oIE = _IECreateEmbedded()

$Form1 = GUICreate("Form1", 923, 877, 206, 31)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 939, 892)
_IENavigate($oIE, "[url="http://www.cellsolid.com/files/template.png"]http://www.cellsolid.com/files/template.png[/url]")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : _IENavigate($oIE, "[url="http://www.cellsolid.com/files/template.png"]http://www.cellsolid.com/files/template.png[/url]") = ' & _IENavigate($oIE, "[url="http://www.cellsolid.com/files/template.png"]http://www.cellsolid.com/files/template.png[/url]") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
GUISetState()


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    EndSwitch
WEnd
Edited by billo
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...