Jump to content

POPUP + CHILD + Clickable\movable


Recommended Posts

well.. its all about GUI styles.. ive searched for about 2 hours now... nothing what i need

i would like a popup window without a Taskbar item... OR a childwindow without a titlebar

is this possible? ive seen pics around these forums before but sadely cannot find them

i have this so far (its perfect except for the background GUI is visible on the taskbar

#include <GUICONSTANTS.AU3>
#include <WINDOWSCONSTANTS.AU3>
#include <STATICCONSTANTS.AU3>
#include <EDITCONSTANTS.AU3>
#include <MISC.AU3>
#Include <WinAPI.au3>
Opt ('GUIoneventmode', 1)
$Status = 0
$bGUI = GUICreate ('', 340, 340,-1, -1,BitOR ($WS_POPUP,$WS_VISIBLE))
GUISetBkColor (0x2E2E2E, $bGUI)
GUISetState ()
$lTitleBar = GUICtrlCreateLabel ('', 20, 0, 280, 20, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
$lb_Exit = GUICtrlCreateLabel ('', 0, 0, 20, 20)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetState (-1, $GUI_DISABLE)
$lExit = GUICtrlCreateLabel ('x', 1, 1, 18, 18, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
GUICtrlSetOnEvent (-1, '_Exit_')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit_', $bGUI)
GUISetOnEvent ($GUI_EVENT_PRIMARYDOWN, '_Win_Move_', $bGUI)
GUISetState ()
$GUI = GUICreate ('', 300, 300,-1,-1,BitOR ($WS_POPUP,$WS_VISIBLE))
GUISetBkColor (0x0, $GUI)
GUISetState ()
WinSetTrans ($bGUI, '', 100)
WinSetOnTop ($GUI, '', 1)
While 1
    $Ggci = GUIGetCursorInfo ($GUI)
    If $Ggci[4] = $lExit Then
        GUICtrlSetBkColor ($lb_Exit, 0xFFFFA2)
    Else
        GUICtrlSetBkColor ($lb_Exit, 0x2E2E2E)
    EndIf
    Sleep (100)
WEnd
Func _Win_Move_ ()
    $MouseXY = MouseGetPos ()
    $WinXY = WinGetPos ($GUI)
    $xOff = $MouseXY[0] - $WinXY[0]
    $yOFF = $MouseXY[1] - $WinXY[1]
    While _IsPressed ('01')
        WinMove ($GUI, '',MouseGetPos (0) - $xOff ,MouseGetPos (1) - $yOFF)
        WinMove ($bGUI, '',MouseGetPos (0) - $xOff - 20 ,MouseGetPos (1) - $yOFF - 20)
        Sleep (10)
    WEnd
EndFunc
Func _Exit_ ()
    Exit
EndFunc

any ideas?

Link to comment
Share on other sites

#include <GUICONSTANTS.AU3>
#include <WINDOWSCONSTANTS.AU3>
#include <STATICCONSTANTS.AU3>
#include <EDITCONSTANTS.AU3>
#include <MISC.AU3>
#Include <WinAPI.au3>
Opt ('GUIoneventmode', 1)
$Status = 0
$GUI = GUICreate ('', 300, 300,-1,-1,BitOR ($WS_POPUP,$WS_VISIBLE))
GUISetBkColor (0x0, $GUI)
GUISetState ()

$bGUI = GUICreate ('', 340, 340,-1, -1,BitOR ($WS_POPUP,$WS_VISIBLE),-1,$GUI)
GUISetBkColor (0x2E2E2E, $bGUI)
GUISetState ()
$lTitleBar = GUICtrlCreateLabel ('', 20, 0, 280, 20, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
$lb_Exit = GUICtrlCreateLabel ('', 0, 0, 20, 20)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetState (-1, $GUI_DISABLE)
$lExit = GUICtrlCreateLabel ('x', 1, 1, 18, 18, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
GUICtrlSetOnEvent (-1, '_Exit_')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit_', $bGUI)
GUISetOnEvent ($GUI_EVENT_PRIMARYDOWN, '_Win_Move_', $bGUI)
GUISetState ()
WinSetTrans ($bGUI, '', 100)
WinSetOnTop ($GUI, '', 1)
While 1
    $Ggci = GUIGetCursorInfo ($GUI)
    If $Ggci[4] = $lExit Then
        GUICtrlSetBkColor ($lb_Exit, 0xFFFFA2)
    Else
        GUICtrlSetBkColor ($lb_Exit, 0x2E2E2E)
    EndIf
    Sleep (100)
WEnd
Func _Win_Move_ ()
    $MouseXY = MouseGetPos ()
    $WinXY = WinGetPos ($GUI)
    $xOff = $MouseXY[0] - $WinXY[0]
    $yOFF = $MouseXY[1] - $WinXY[1]
    While _IsPressed ('01')
        WinMove ($GUI, '',MouseGetPos (0) - $xOff ,MouseGetPos (1) - $yOFF)
        WinMove ($bGUI, '',MouseGetPos (0) - $xOff - 20 ,MouseGetPos (1) - $yOFF - 20)
        Sleep (10)
    WEnd
EndFunc
Func _Exit_ ()
    Exit
EndFunc

any ideas?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I don't understand martins post??

Anyways...

#include <GUICONSTANTS.AU3>
#include <WINDOWSCONSTANTS.AU3>
#include <STATICCONSTANTS.AU3>
#include <EDITCONSTANTS.AU3>
#include <MISC.AU3>
#Include <WinAPI.au3>
Opt ('GUIoneventmode', 1)
$Status = 0

$bGUI = GUICreate ('', 340, 340,-1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW);BitOR ($WS_POPUP,$WS_VISIBLE))
GUISetBkColor (0x2E2E2E, $bGUI)
GUISetState ()
$lTitleBar = GUICtrlCreateLabel ('', 20, 0, 280, 20, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
$lb_Exit = GUICtrlCreateLabel ('', 0, 0, 20, 20)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetState (-1, $GUI_DISABLE)
$lExit = GUICtrlCreateLabel ('x', 1, 1, 18, 18, $SS_CENTER)
GUICtrlSetBkColor (-1, 0x2E2E2E)
GUICtrlSetFont (-1, 10, 400, '', 'Fixedsys')
GUICtrlSetColor (-1, 0xFFFFA2)
GUICtrlSetOnEvent (-1, '_Exit_')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit_', $bGUI)
GUISetOnEvent ($GUI_EVENT_PRIMARYDOWN, '_Win_Move_', $bGUI)
GUISetState ()
$GUI = GUICreate ('', 300, 300,-1,-1,BitOR ($WS_POPUP,$WS_VISIBLE), $WS_EX_TOOLWINDOW)
GUISetBkColor (0x0, $GUI)
GUISetState ()
WinSetTrans ($bGUI, '', 100)
WinSetOnTop ($GUI, '', 1)
While 1
    $Ggci = GUIGetCursorInfo ($GUI)
    If $Ggci[4] = $lExit Then
        GUICtrlSetBkColor ($lb_Exit, 0xFFFFA2)
    Else
        GUICtrlSetBkColor ($lb_Exit, 0x2E2E2E)
    EndIf
    Sleep (100)
WEnd
Func _Win_Move_ ()
    $MouseXY = MouseGetPos ()
    $WinXY = WinGetPos ($GUI)
    $xOff = $MouseXY[0] - $WinXY[0]
    $yOFF = $MouseXY[1] - $WinXY[1]
    While _IsPressed ('01')
        WinMove ($GUI, '',MouseGetPos (0) - $xOff ,MouseGetPos (1) - $yOFF)
        WinMove ($bGUI, '',MouseGetPos (0) - $xOff - 20 ,MouseGetPos (1) - $yOFF - 20)
        Sleep (10)
    WEnd
EndFunc
Func _Exit_ ()
    Exit
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

I don't understand martins post??

That's how I feel when I read my posts :D (I understand your code though. )

I thought CodyBarret wanted just one icon for the main gui on the task bar not two icons, so I set the background window to be a child of the main gui.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

That's how I feel when I read my posts :D (I understand your code though. )

I thought CodyBarret wanted just one icon for the main gui on the task bar not two icons, so I set the background window to be a child of the main gui.

Now I understand your code... and mine is wrong... :D

Oh well, he has choices now!! ;)

8)

NEWHeader1.png

Link to comment
Share on other sites

HA!it worked!

thank you guys :D

martin ill use yours but thanks Valuator for the option for NO taskbar icon :D

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