Jump to content

Multiple IE screen in a GUI


bumitrue93
 Share

Recommended Posts

Hello all..

I have made a GUI that has two separate window..

i have been facing some problems..

1) When i enter something in the search menu (google) on both the windows and then when i click on window 1 and press backspace.. it doesn't deletes the text in it.. rather the text in window 2 gets deleted

2) when i load a page in any window.. the other page loads itself( that's what i think since both the page turns white)

3) i want to make a loading bar to know if its really loading or not.

4) you might notice that i made the window popup style as i don't want the user to move the window around... is there a way that i can do it.. using normal window style?

5) Also i want to add an address bar instead of those buttons.

#include <GUIConstantsEx.au3>
#include <IE.au3>
#Include <GuiButton.au3>
#include <WindowsConstants.au3>
Global $oIE1 =  _IECreateEmbedded()
Global $oIE2 =  _IECreateEmbedded()
Global $button_home, $button_exit, $button_enter_address1, $button_enter_address2
Global $url1 = "http://google.com"
Global $url2 = "http://google.com"

HotKeySet("!{F4}", "end")
start()
Func start()
GUICreate("Custom Client", @DesktopWidth, @DesktopHeight-30, 0, 0, $WS_POPUP)
Opt("GUIOnEventMode", 1)

$client_window_chat = GUICtrlCreateObj($oIE1,  10, 35, (@DesktopWidth/2) -10, 700)
$client_window_main = GUICtrlCreateObj($oIE2,  (@DesktopWidth/2) +10, 35, (@DesktopWidth/2)-20, 700)

$button_exit = GUICtrlCreateButton("Exit", @DesktopWidth- 70, 2, 70, 30)
$button_enter_address1 = GUICtrlCreateButton("Enter Address", 10, 2, 100, 30)
$button_enter_address2 = GUICtrlCreateButton("Enter Address", (@DesktopWidth/2) +10, 2, 100, 30)

$label_force_close = GUICtrlCreateLabel("Press Alt + F4 to Force Close.", @DesktopWidth - 250, 10)

$label_window1 = GUICtrlCreateLabel("window 1", (@DesktopWidth/2)/2, 10)
$label_window2 = GUICtrlCreateLabel("window 2", (@DesktopWidth/2)+(@DesktopWidth/2)/2, 10)

GUISetState(@SW_SHOW)
$oIE1.navigate($url1)
$oIE2.navigate($url2)

GUICtrlSetOnEvent($button_exit, "end")
GUICtrlSetOnEvent($button_home, "button_home")
GUICtrlSetOnEvent($button_enter_address1, "button_enter_address1")
GUICtrlSetOnEvent($button_enter_address2, "button_enter_address2")

While 1
WEnd
    GUIDelete()
EndFunc

Func button_home()
$oIE1.navigate("http://www.google.com")
EndFunc
Func button_enter_address1()
$url1  = InputBox ( "", "Enter The Address", "" , "" , 500, 200)
If Not $url1 = "" Then
  $oIE1.navigate($url1)
EndIf
EndFunc
Func button_enter_address2()
$url2  = InputBox ( "", "Enter The Address", "" , "" , 500, 200)
If Not $url2 = "" Then
  $oIE2.navigate($url2)
EndIf
EndFunc
Func end()
Exit
EndFunc
Edited by bumitrue93
Link to comment
Share on other sites

  • Moderators

bumitrue93,

I am afraid I cannot help with the IE questions - but I can with the "immoveable GUI" part. :oops:

You need to intercept the SC_MOVE message like this:

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

$hGui = GUICreate("")
GUISetState()
GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND")

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
    If BitAND($wParam, 0xFFF0) = 0xF010 Then Return False ; $SC_MOVE
    Return $GUI_RUNDEFMSG
EndFunc

If you are not too familar with GUIRegisterMsg I recommend the GUIRegisterMsg tutorial in the Wiki. :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

$hGui = GUICreate("")
GUISetState()
GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND")

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
    If BitAND($wParam, 0xFFF0) = 0xF010 Then Return False ; $SC_MOVE
    Return $GUI_RUNDEFMSG
EndFunc

If you are not too familar with GUIRegisterMsg I recommend the GUIRegisterMsg tutorial in the Wiki. :D

M23

Thanks u so much :oops: That really helped a lot ^^

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...