Jump to content
Sign in to follow this  
Phantomasss

GUI = image & text

Recommended Posts

Phantomasss

Hello, how to create GUI as image? How to add text (not image, simple text) on this window & buttons (from images). Please, help...

Skin (example, 3 images):

Posted Image

Done:

Posted Image

Can you show example (code)? Sorry for my bad English, thanks...

I tried to add an image in GUI:

Posted Image

Text not transperent & not deleted standart window frame ^_^.

Share this post


Link to post
Share on other sites
youknowwho4eva

Sounds and looks like GDI+ would be a good way to do what you want.


Giggity

Share this post


Link to post
Share on other sites
Phantomasss

Thanks and sorry!

Share this post


Link to post
Share on other sites
Phantomasss

Hmm... how to move a window taking image? :|

Share this post


Link to post
Share on other sites
BrettF

I hope this explains it...

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

$GUI = GUICreate ("", 120, 120, Default, Default, $WS_POPUP)

$bckg = GUICtrlCreatePic (@ScriptDir & "\bkg.gif", 0, 0, 120, 120)
GUICtrlSetState ($bckg, $GUI_DISABLE)

$CLOSE = GUICtrlCreatePic (@ScriptDir & "\close.gif", 108, 3, 10, 10)
$MINI = GUICtrlCreatePic (@ScriptDir & "\mini.gif", 96, 3, 10, 10)

GUICtrlCreateLabel ("", 0, 0, 120, 15, Default, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

GUISetState (@SW_SHOW)

While 1
    $nMsg = GUIGetMsg ()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $CLOSE
            Exit
        Case $GUI_EVENT_MINIMIZE, $MINI
            GUISetState (@SW_MINIMIZE)
    EndSwitch
WEnd

I just cut the image posted to be CLOSE.gif (close button), MINI.gif (minimize button) and the background image.

Cheers,

Brett

Share this post


Link to post
Share on other sites
Phantomasss

Ok, $GUI_WS_EX_PARENTDRAG. Thanks!

Share this post


Link to post
Share on other sites
Phantomasss

How to change GUI background color to image?

GUICreate("My GUI", 120, 120)
GUICtrlCreatePic(@ScriptDir & "\image.gif", 0, 0, 120, 120)

It does not suit. If there will be an update of other elements then user can see background color.

Need: GUI background color = Image.

Thanks!

Share this post


Link to post
Share on other sites
BrettF

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  

×