Post Reply Home » Forums » Vanguard » VGExtreme General Discussion

MsgBox : VGExtreme General Discussion

Posted: March 29th, 2007
Total Posts:154 Joined:2006
Anyone know how to make a simple MsgBox stay on top of the Vanguard window?

If you add something like

Code: Select all

Dim MyVar
MyVar = MsgBox ("Hello World!", 65, "MsgBox Example")
It will default back to Exhume every time you call it.
Posted: March 29th, 2007
xaraph
I'm pretty sure you would have to inject the code directly into Vanguards process. Use the hook.injectlibrary Exhume function. There's probably an easier way, but none is coming to mind.
Posted: March 29th, 2007
User avatar
Premium
Total Posts:6718 Joined:2004
There is another way.. if you are using VGE.

Grab the demo scripts. (for XUM). One of those is a message box type of window you can create. Think making your own custom window using XUM that looks like a message box. Then you can add a simple FocusWindow call to it and it will show up on top.

_________________
Use Search first, ask questions later!
Posted: March 29th, 2007
Total Posts:154 Joined:2006
Got the custom window

Got the FocusWindow sending it to the top.

Made custom buttons.

Can not seem to figure out how to get which button is pressed.

Any help would be appreciated.

Code: Select all

Windows.FocusWindow wnd

set wnd = GUI.AddWindow(100,450,"test")

wnd.Settitle "Control"
wnd.setWidth  10
wnd.setheight  10
wnd.setLeft 50
wnd.SetOnDbClick  "dbclick"
wnd.setminx 170 
wnd.setminy 72

set btn1 = wnd.addcontrol("Button",3,10,"Pause")
btn1.Setheight 20
btn1.setwidth 45
btn1.SetRightAnchor  true
btn1.SetLeftAnchor  true
btn1.SetonPress  "1"

set btn2 = wnd.addcontrol("Button",50,10,"UnPause")
btn2.Setheight 20
btn2.setwidth 65
btn2.SetRightAnchor  true
btn2.SetLeftAnchor  true
btn2.SetonPress  "2"

set btn3 = wnd.addcontrol("Button",118,10,"Exit")
btn3.Setheight  20
btn3.setwidth 40
btn3.SetRightAnchor  true
btn3.SetLeftAnchor  true
btn3.SetonPress  "3"
Posted: March 29th, 2007
User avatar
Premium
Total Posts:6718 Joined:2004
Try this:

Code: Select all

       set wnd = GUI.AddWindow(100,450,"test") 
        Windows.FocusWindow wnd.GetHWND()
    
        wnd.Settitle "Control" 
        wnd.setWidth  10 
        wnd.setheight  10 
        wnd.setLeft 50 
        wnd.SetOnDbClick  "dbclick" 
        wnd.setminx 170 
        wnd.setminy 72 

        set btn1 = wnd.addcontrol("Button",3,10,"Pause") 
        btn1.Setheight 20 
        btn1.setwidth 45 
        btn1.SetRightAnchor  true 
        btn1.SetLeftAnchor  true 
        btn1.SetonPress  "onPause" 

        set btn2 = wnd.addcontrol("Button",50,10,"UnPause") 
        btn2.Setheight 20 
        btn2.setwidth 65 
        btn2.SetRightAnchor  true 
        btn2.SetLeftAnchor  true 
        btn2.SetonPress  "onUnPause" 

        set btn3 = wnd.addcontrol("Button",118,10,"Exit") 
        btn3.Setheight  20 
        btn3.setwidth 40 
        btn3.SetRightAnchor  true 
        btn3.SetLeftAnchor  true 
        btn3.SetonPress  "onExit"

    public sub onExit
        CloseWindow wnd.GetHWND()
    end sub

    public sub onPause
        bPaused = true
    end sub

    public sub onUnPause
        bPaused = false
    end sub


_________________
Use Search first, ask questions later!
Posted: March 30th, 2007
Total Posts:154 Joined:2006
Thanks that is going to work.
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 4 guests
Post Reply