Jump to content
jordanrenault

Browse a Intenet Webpage in a hidden mode

Recommended Posts

jordanrenault

 

hi how i can hide this program gui ? i have tried adding  GUISetState(@SW_HIDE) but does not work

 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
 GUISetState(@SW_HIDE) ; will display an empty dialog box

Opt('MustDeclareVars', 1)

iEVIEW()

; iEVIEW: Embedding an Internet Explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Func iEVIEW()
    Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
    Local $GUI_Button_Home, $GUI_Button_Stop, $msg
    
    $oIE = ObjCreate("Shell.Explorer.2")

   ; Create a simple GUI for our output
    GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    GUISetState(@SW_HIDE)
    $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("http://www.google.com")

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

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $GUI_Button_Home
                $oIE.navigate("http://www.google.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()
EndFunc  ;==>iEVIEW

 

Share this post


Link to post
Share on other sites
jordanrenault

someone can help me ?

Share this post


Link to post
Share on other sites
jordanrenault

i need help please

Share this post


Link to post
Share on other sites
Earthshine

have some patience. I am no gui expert, but there are many here who make guis all the time. I am sure they will help when they see it.

so, this appears to be working, but you want to make the gui disappear and just show an embedded IE browser? I think if you make the gui go away then the embedded control does too.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
jordanrenault

i want that everything must be invisible

Share this post


Link to post
Share on other sites
Earthshine

rather strange requirement. why make a gui if nobody can see it?


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Jos
30 minutes ago, jordanrenault said:

i want that everything must be invisible

Firstly, You seem to be pretty impatient looking at the initial number of bump posts. Please don't!

So, tell us what it is you like to do and why so we can understand and think with you, as this is the second thread you post about hiding windows, and didn't care to respond anymore to the first thread: 

 

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jordanrenault
30 minutes ago, Earthshine said:

rather strange requirement. why make a gui if nobody can see it?

I want to do this only for testing purposes

Share this post


Link to post
Share on other sites
Earthshine

but I am sure there is use case for it, otherwise you would not be testing.


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
BrewManNH
40 minutes ago, jordanrenault said:

for testing purposes

That doesn't answer the question you quoted. Why make a GUI that you never show? If it doesn't show, you don't need a GUI, just the code in the background.

Also, if everything is hidden, why are there controls created on the GUI that no one will ever see?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Jos

Guys ....PLEASE ....  I asked some questions I want some answers to, so don't need these extra posts to pollute the discussion. It is obvious there either is a language barrier or the OP didn't care to answer my questions so do us a favor and let the OP answer now first.

@jordanrenault, Please read and respond to my post... thanks.

1 hour ago, Jos said:

Firstly, You seem to be pretty impatient looking at the initial number of bump posts. Please don't!

So, tell us what it is you like to do and why so we can understand and think with you, as this is the second thread you post about hiding windows, and didn't care to respond anymore to the first thread: 

Jos

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jordanrenault

I solved by myself 

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

×