Sign in to follow this  
Followers 0
SparkSoft

Image as GUI

6 posts in this topic

How can do i use an image as a gui easily

Im trying to make a battery bar but without the window :x

Thanks


[center]First Ever Script/App[/center][center]Simple Battery Meter[/center]

Share this post


Link to post
Share on other sites



You need to make a window and then make a window within your window and add a picture in that. I recently did an app that did just that:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Local $Button1, $b1label, $height, $width, $hPosition, $vPosition
$height = 100
$width = 100
$hPosition = $width
$vPosition = 1
GUICreate("MAC Hovering Button", $width, $height, @DesktopWidth - $hPosition, $vPosition, $WS_POPUP, $WS_EX_TOPMOST)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$Button1 = GUICtrlCreatePic("c:\Program Files\AutoIt3\Examples\GUI\MACFinal200x188.jpg", -1, -1) ;<- Picture Name
GUICtrlSetState(-1, $GUI_DISABLE)
Opt("GUICoordMode", 2)
$b1label = GUICtrlCreateLabel("", 1, 1, $width, $height, 0x201)
GUICtrlSetBkColor($b1label, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetOnEvent($b1label, "Change")
GUISetState()

Believe me it was the easiest way to do it. Please play with the settings on this an post if you have questions.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

Thanks for the quick reply

Im going to try it out

ill post if i have any questions


[center]First Ever Script/App[/center][center]Simple Battery Meter[/center]

Share this post


Link to post
Share on other sites

That didnt work for me

any other ideas :x

Heres what im trying to do (see picture)

and i need to use a progress bar with it aswell

post-60466-0-98201400-1294753357_thumb.j


[center]First Ever Script/App[/center][center]Simple Battery Meter[/center]

Share this post


Link to post
Share on other sites

Do you have multiple battery status pictures? Is the link to your Simple Battery Meter in your signature the most up to date code or have you made any changes?


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

Im making it from scratch but based on the one in my sig

I have a bit more experience in autoit now and thought id have another go

my hp mini doesnt show battery time remaining so im trying to make a battery bar my self.

is there any other simple way of making one :x

thanks


[center]First Ever Script/App[/center][center]Simple Battery Meter[/center]

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