Sign in to follow this  
Followers 0
a6000000

pls help : GUI transparency menu image , -NO buttons

5 posts in this topic

#1 ·  Posted (edited)

pls help : GUI transparency menu image , -NO buttons

[EDIT] 2008-01-03: now it work s :) [/EDIT]

hallo ,

wanted: transparency GUI - menu - image , with link/functions-calls ; I want it DONT show any normal buttons ;

here is my example - x=180px width y=230px height :

Posted Image

I hope it is easy to understand , I want sam area in the menu-image to call Functions or Links.

like this:

[pre]
<pre>
if_single_left_mouse_click()
{
  actione_qqq = 0
  if_active_window_foreground(my_menu_image_qqq)
  {
    if_mouse_on_area_A_exe_qqq(){ actione_qqq = 1 }
    if_mouse_on_area_B_exe_qqq(){ actione_qqq = 2 }
    if_mouse_on_area_EXIT_qqq(){ actione_qqq = 6 }
  } ;// end if_active_window_foreground()
} ;// end if_single_left_mouse_click()
</pre>
[/pre]

------------------

PS:

I found sam scripts with GUI Functions , but I need please help , what I have to use

3030. EzSkin_1-2-3

http://www.autoitscript.com/forum/index.php?showtopic=41319" target="_blank"> http://www.autoitscript.com/forum/index.php?showtopic=41319 </a>

Posted Image ;

3031. but I dont want normal buttons to show

3040. floating toolbar

http://www.autoitscript.com/forum/index.ph...9&hl="" target="_blank"> http://www.autoitscript.com/forum/index.ph...c=41099&hl=</a>

Posted Image

3041. but I dont want normal buttons to show , and I dont know if it is possible in format x=180px width y=230px height

3050. AutoIt KODA FormDesigner

http://www.autoitscript.com/fileman/users/lookfar/images/koda_small.gif

http://www.autoitscript.com/fileman/users/...sign.html" target="_blank"> http://www.autoitscript.com/fileman/users/lookfar/formdesign.html</a>

3051. but I dont want normal buttons to show

3060. in AutoIt - HELP: GUICtrlCreatePic ;----- example 2

"

GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",0,0, 0,0)

"

Posted Image

Edited by a6000000

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Posted Image

Posted Image

.. here it is 50/50 OK , because:

.. without img: line45:

;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)

all works OK!

.. WITH img: line45:

$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)

it is no longer possible to move with the mouse :-(

.. any ideas , how to set the background - image?

[pre]
<pre>
;amen3060.au3
;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
; the BG-img in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
; add/remove BG img in line 45 with;comment;

#include <GUIConstants.au3>
HotKeySet("{ESC}", "_end")
HotKeySet(" ", "_end")

;~ http://www.autoit.de/index.php?page=Thread&postID=40266#post40266
;~ Hab ichs richtig verstanden?
;~ Du willst ein Hintergrundbild, auf dem 3 Buttons zu sehen sind. Diese sollen klickbar sein, aber nicht verdeckt werden.
;~ Du setzt also das Bild auf GUISetState($bild,$GUI_DISABLE)
;~ dann erstellst du Labels an den vorgesehenen Stellen. Diese werden als Buttons verwendet.
;~ Wenn du sie dann an der richtigen Stelle hast, fügst du nach jedem Label ein GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ein, damit sie durchsichtig werden.
;~ z.B. so: (Hier fehlt nur das Hintergrundbild :) Und die Ecken sind mit API-Calls abgerundet.

;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
$gui = GUICreate("GUI", 180, 215, -1, -1, $WS_POPUP)

GUISetBkColor(0x0000FF); sonst dialog-grey
; ??????
; AND HOW TO SET A BACKGROUND IMAGE INSTAED OF BACKGROUND-COLOR 
; ??????
;"AMMenuTrans3006.gif"
; NIX  GUISetState("AMMenuTrans3006.gif")

$labelbutt1 = GUICtrlCreateLabel("",105,20,40,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt2 = GUICtrlCreateLabel("",20,65,40,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt3 = GUICtrlCreateLabel("",65,155,40,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)

; folgendes loeschen, um Labels unsichtbar zu machen:
GUICtrlSetBkColor($labelbutt1,0xFFFFFF)
GUICtrlSetBkColor($labelbutt2,0xFFFFFF)
GUICtrlSetBkColor($labelbutt3,0xFFFFFF)
;Ende loeschen

;--- add2
;  :-(
; but with image it no longer move with mouse
;  :-(
$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
; the image in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
;$n=GUICtrlCreatePic("http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg",0,0, 180,215)
;/---add2

_GUICreateRoundRect($gui, 40,40)

;-----------------add1

; in die Gui erstellung
If Not Isdeclared("WM_LBUTTONDOWN") Then Global Const $WM_LBUTTONDOWN = 0x0201
GUIRegisterMsg($WM_LBUTTONDOWN, "_PrimeDown")
;/-----------------add1
GUISetState(); maybe here can add a background image ?????? 


#include <GUIConstants.au3>

#region - GUI SelectLoop
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $labelbutt1
            MsgBox(0, '', "Labelbutt1")
        Case $msg = $labelbutt2
            MsgBox(0, '', "Labelbutt2")
        Case $msg = $labelbutt3
         ;MsgBox(0, '', "Labelbutt3 - Exit")
            Exit
    EndSelect
WEnd
#endregion

Func _GUICreateRoundRect($hwnd, $radx=15,$rady=15)
    $pos = WinGetPos($hwnd)

    $1 = 0
    $2 = 0
    $3 = $pos[2]
    $4 = $pos[3]
    $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $1, "long", $2, "long", $3, "long", $4,"long",$radx,"long",$rady)


    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hwnd, "long", $ret[0], "int", 1)
EndFunc;==>_GUICreateRoundRect

Func _end()
    Exit(0)
EndFunc


;----add
;Ans Ende des Skripts:
Func _PrimeDown($hWnd, $Msg, $wParam, $lParam)
    Local $DifX, $DifY, $MouseData = GUIGetCursorInfo($hwnd)
    Local $WinPos = WinGetPos($hwnd)
    Local $MPos = MouseGetPos()

    $DifX = $MPos[0] - $WinPos[0]
    $DifY = $MPos[1] - $WinPos[1]

    While $MouseData[2]
        $MPos = MouseGetPos()
        $WinPos = WinGetPos($hwnd)

        If ($WinPos[0] <> ($MPos[0] - $DifX)) Or ($WinPos[1] <> ($MPos[1] - $DifY)) Then
            WinMove($hwnd, '', $MPos[0] - $DifX, $MPos[1] - $DifY)
        EndIf

        Sleep(15)

        $MouseData = GUIGetCursorInfo($hwnd)
    WEnd
EndFunc
;/-------------add

; so fast super ABER:
; LINE 45::
; mit mein background image geht mouse - move nit und ohne background img geht mousemove , aber es sieht nit so aus :-( 
; wie sollte denn das img eingebunden werden?

;------
;~  .. here it is 50/50 OK , because:

;~  .. without img: line45:
;~;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ all works OK!

;~  .. WITH img: line45:
;~ $n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ it is no longer possible to move with the mouse :-(

;~  .. any ideas , how to set the background - image?
;------

</pre>
[/pre]
Edited by a6000000

Share this post


Link to post
Share on other sites

now OK

CLOSED!

it rocks

;amen3060.au3
;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
; the BG-img in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
;; now ok:; LINE 35 and LINE 36 // nu. add/remove BG img in line 45 with;comment;nu.

#include <GUIConstants.au3>
HotKeySet("{ESC}", "_end")
HotKeySet(" ", "_end")

;~ http://www.autoit.de/index.php?page=Thread&postID=40266#post40266
;~ Hab ichs richtig verstanden?
;~ Du willst ein Hintergrundbild, auf dem 3 Buttons zu sehen sind. Diese sollen klickbar sein, aber nicht verdeckt werden.
;~ Du setzt also das Bild auf GUISetState($bild,$GUI_DISABLE)
;~ dann erstellst du Labels an den vorgesehenen Stellen. Diese werden als Buttons verwendet.
;~ Wenn du sie dann an der richtigen Stelle hast, fügst du nach jedem Label ein GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ein, damit sie durchsichtig werden.
;~ z.B. so: (Hier fehlt nur das Hintergrundbild :) Und die Ecken sind mit API-Calls abgerundet.


;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
$gui = GUICreate("GUI", 180, 215, -1, -1, $WS_POPUP)
GUISetBkColor(0x0000FF); sonst dialog-grey
; ??????
; AND HOW TO SET A BACKGROUND IMAGE INSTAED OF BACKGROUND-COLOR 
; ??????
;"AMMenuTrans3006.gif"
; NIX  GUISetState("AMMenuTrans3006.gif")
;~;-----------------forum Re
;~;Der Hintergrund muss auch als 1. GUI-Element erstellt werden, nicht als leztes.
;~;Wenn du es so machst, sollte es gehen:
;~ $gui = GUICreate("GUI", 180, 215, -1, -1, $WS_POPUP)
;~ GUISetBkColor(0x0000FF); sonst dialog-grey
;~ $n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ GUICtrlSetState(-1,$GUI_DISABLE)
;~;;/------------------forum re
$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
GUICtrlSetState(-1,$GUI_DISABLE)

$labelbutt1 = GUICtrlCreateLabel("",105,20,60,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt2 = GUICtrlCreateLabel("",20,65,40,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt3 = GUICtrlCreateLabel("",65,155,60,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)

;~; folgendes loeschen, um Labels unsichtbar zu machen:
;~ GUICtrlSetBkColor($labelbutt1,0xFFFFFF)
;~ GUICtrlSetBkColor($labelbutt2,0xFFFFFF)
;~ GUICtrlSetBkColor($labelbutt3,0xFFFFFF)
;~;Ende loeschen

;--- add2
;  :-(
; but with image it no longer move with mouse
;  :-(
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
; the image in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
;not used >> see FORUM RE TOP^^ ;;;$n=GUICtrlCreatePic("http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg",0,0, 180,215)
;/---add2

_GUICreateRoundRect($gui, 40,40)

;-----------------add1

; in die Gui erstellung
If Not Isdeclared("WM_LBUTTONDOWN") Then Global Const $WM_LBUTTONDOWN = 0x0201
GUIRegisterMsg($WM_LBUTTONDOWN, "_PrimeDown")
;/-----------------add1
GUISetState(); maybe here can add a background image ?????? 


#include <GUIConstants.au3>

#region - GUI SelectLoop
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $labelbutt1
            MsgBox(0, '', "Labelbutt1")
        Case $msg = $labelbutt2
            MsgBox(0, '', "Labelbutt2")
        Case $msg = $labelbutt3
           ;MsgBox(0, '', "Labelbutt3 - Exit")
            Exit
    EndSelect
WEnd
#endregion

Func _GUICreateRoundRect($hwnd, $radx=15,$rady=15)
    $pos = WinGetPos($hwnd)

    $1 = 0
    $2 = 0
    $3 = $pos[2]
    $4 = $pos[3]
    $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $1, "long", $2, "long", $3, "long", $4,"long",$radx,"long",$rady)


    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hwnd, "long", $ret[0], "int", 1)
EndFunc  ;==>_GUICreateRoundRect

Func _end()
    Exit(0)
EndFunc


;----add
;Ans Ende des Skripts:
Func _PrimeDown($hWnd, $Msg, $wParam, $lParam)
    Local $DifX, $DifY, $MouseData = GUIGetCursorInfo($hwnd)
    Local $WinPos = WinGetPos($hwnd)
    Local $MPos = MouseGetPos()

    $DifX = $MPos[0] - $WinPos[0]
    $DifY = $MPos[1] - $WinPos[1]

    While $MouseData[2]
        $MPos = MouseGetPos()
        $WinPos = WinGetPos($hwnd)

        If ($WinPos[0] <> ($MPos[0] - $DifX)) Or ($WinPos[1] <> ($MPos[1] - $DifY)) Then
            WinMove($hwnd, '', $MPos[0] - $DifX, $MPos[1] - $DifY)
        EndIf

        Sleep(15)

        $MouseData = GUIGetCursorInfo($hwnd)
    WEnd
EndFunc
;/-------------add

; so fast super ABER:
; LINE 45::
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
; mit mein background image geht mouse - move nit und ohne background img geht mousemove , aber es sieht nit so aus :-( 
; wie sollte denn das img eingebunden werden?

;------
;~  .. here it is 50/50 OK , because:

;~  .. without img: line45:
;~;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ all works OK!

;~  .. WITH img: line45:
;~ $n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ it is no longer possible to move with the mouse :-(

;~  .. any ideas , how to set the background - image?
;------

; now ok:; LINE 35 and LINE 36
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;GUICtrlSetState(-1,$GUI_DISABLE)

Share this post


Link to post
Share on other sites

now OK

CLOSED!

it rocks

[EDIT: LINE 16: must ;comment;[/EDIT] ;~ ein GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ein, damit sie durchsichtig werden.

;amen3060.au3
;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
; the BG-img in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
;; now ok:; LINE 35 and LINE 36 // nu. add/remove BG img in line 45 with;comment;nu.

#include <GUIConstants.au3>
HotKeySet("{ESC}", "_end")
HotKeySet(" ", "_end")

;~ http://www.autoit.de/index.php?page=Thread&postID=40266#post40266
;~ Hab ichs richtig verstanden?
;~ Du willst ein Hintergrundbild, auf dem 3 Buttons zu sehen sind. Diese sollen klickbar sein, aber nicht verdeckt werden.
;~ Du setzt also das Bild auf GUISetState($bild,$GUI_DISABLE)
;~ dann erstellst du Labels an den vorgesehenen Stellen. Diese werden als Buttons verwendet.
;~ Wenn du sie dann an der richtigen Stelle hast, fügst du nach jedem Label 
;~ [EDIT: must;comment;[/EDIT];~ ein GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ein, damit sie durchsichtig werden.
;~ z.B. so: (Hier fehlt nur das Hintergrundbild :) Und die Ecken sind mit API-Calls abgerundet.


;file:///I|/AutoIt/AM/AMMenuTrans3006.gif;// 180,215 
$gui = GUICreate("GUI", 180, 215, -1, -1, $WS_POPUP)
GUISetBkColor(0x0000FF); sonst dialog-grey
; ??????
; AND HOW TO SET A BACKGROUND IMAGE INSTAED OF BACKGROUND-COLOR 
; ??????
;"AMMenuTrans3006.gif"
; NIX  GUISetState("AMMenuTrans3006.gif")
;~;-----------------forum Re
;~;Der Hintergrund muss auch als 1. GUI-Element erstellt werden, nicht als leztes.
;~;Wenn du es so machst, sollte es gehen:
;~ $gui = GUICreate("GUI", 180, 215, -1, -1, $WS_POPUP)
;~ GUISetBkColor(0x0000FF); sonst dialog-grey
;~ $n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ GUICtrlSetState(-1,$GUI_DISABLE)
;~;;/------------------forum re
$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
GUICtrlSetState(-1,$GUI_DISABLE)

$labelbutt1 = GUICtrlCreateLabel("",105,20,60,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt2 = GUICtrlCreateLabel("",20,65,40,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$labelbutt3 = GUICtrlCreateLabel("",65,155,60,40)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)

;~; folgendes loeschen, um Labels unsichtbar zu machen:
;~ GUICtrlSetBkColor($labelbutt1,0xFFFFFF)
;~ GUICtrlSetBkColor($labelbutt2,0xFFFFFF)
;~ GUICtrlSetBkColor($labelbutt3,0xFFFFFF)
;~;Ende loeschen

;--- add2
;  :-(
; but with image it no longer move with mouse
;  :-(
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
; the image in web :: http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg
;not used >> see FORUM RE TOP^^;;;$n=GUICtrlCreatePic("http://a6000000.bplaced.net/AM/AMMenuTrans3003.jpg",0,0, 180,215)
;/---add2

_GUICreateRoundRect($gui, 40,40)

;-----------------add1

; in die Gui erstellung
If Not Isdeclared("WM_LBUTTONDOWN") Then Global Const $WM_LBUTTONDOWN = 0x0201
GUIRegisterMsg($WM_LBUTTONDOWN, "_PrimeDown")
;/-----------------add1
GUISetState(); maybe here can add a background image ?????? 


#include <GUIConstants.au3>

#region - GUI SelectLoop
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $labelbutt1
            MsgBox(0, '', "Labelbutt1")
        Case $msg = $labelbutt2
            MsgBox(0, '', "Labelbutt2")
        Case $msg = $labelbutt3
          ;MsgBox(0, '', "Labelbutt3 - Exit")
            Exit
    EndSelect
WEnd
#endregion

Func _GUICreateRoundRect($hwnd, $radx=15,$rady=15)
    $pos = WinGetPos($hwnd)

    $1 = 0
    $2 = 0
    $3 = $pos[2]
    $4 = $pos[3]
    $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $1, "long", $2, "long", $3, "long", $4,"long",$radx,"long",$rady)


    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hwnd, "long", $ret[0], "int", 1)
EndFunc ;==>_GUICreateRoundRect

Func _end()
    Exit(0)
EndFunc


;----add
;Ans Ende des Skripts:
Func _PrimeDown($hWnd, $Msg, $wParam, $lParam)
    Local $DifX, $DifY, $MouseData = GUIGetCursorInfo($hwnd)
    Local $WinPos = WinGetPos($hwnd)
    Local $MPos = MouseGetPos()

    $DifX = $MPos[0] - $WinPos[0]
    $DifY = $MPos[1] - $WinPos[1]

    While $MouseData[2]
        $MPos = MouseGetPos()
        $WinPos = WinGetPos($hwnd)

        If ($WinPos[0] <> ($MPos[0] - $DifX)) Or ($WinPos[1] <> ($MPos[1] - $DifY)) Then
            WinMove($hwnd, '', $MPos[0] - $DifX, $MPos[1] - $DifY)
        EndIf

        Sleep(15)

        $MouseData = GUIGetCursorInfo($hwnd)
    WEnd
EndFunc
;/-------------add

; so fast super ABER:
; LINE 45::
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
; mit mein background image geht mouse - move nit und ohne background img geht mousemove , aber es sieht nit so aus :-( 
; wie sollte denn das img eingebunden werden?

;------
;~  .. here it is 50/50 OK , because:

;~  .. without img: line45:
;~;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ all works OK!

;~  .. WITH img: line45:
;~ $n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;~ it is no longer possible to move with the mouse :-(

;~  .. any ideas , how to set the background - image?
;------

; now ok:; LINE 35 and LINE 36
;$n=GUICtrlCreatePic("AMMenuTrans3006.gif",0,0, 180,215)
;GUICtrlSetState(-1,$GUI_DISABLE)

Share this post


Link to post
Share on other sites

so I like it

Posted Image

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
Sign in to follow this  
Followers 0