Sign in to follow this  
Followers 0
mattfaust

$bs_bitmap ?

5 posts in this topic

can someone please show me how to use $bs_bitmap in a GUICtrlCreateButton command.

Ive read the help file but I cant get it to work.

basically i want a bitmap for my gui background, with bitmap buttons.

thanks for any help

Share this post


Link to post
Share on other sites



GUICtrlSetImage()

Post your code ...

well I really dont know I keep trying and deleting different approaches, what ive got now is

#include <GUIConstants.au3>

GUICreate("My GUI") ; will create a dialog box that when displayed is centered

GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON)

GUICtrlSetImage (, "BTN1.BMP",)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Share this post


Link to post
Share on other sites

well I really dont know I keep trying and deleting different approaches, what ive got now is

#include <GUIConstants.au3>

GUICreate("My GUI") ; will create a dialog box that when displayed is centered

GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON)

GUICtrlSetImage (, "BTN1.BMP",)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

#include <GUIConstants.au3>

GUICreate("My GUI"); will create a dialog box that when displayed is centered

$button1 = GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_ICON)
GUICtrlSetImage ($button1,"BTN1.BMP")

GUISetState ()

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

[u]You can download my projects at:[/u] Pulsar Software

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

*Edit: magleod beat me to it. I really need to refresh the page before I post a reply.

*Edit2: Although he forgot to change $BS_ICON to $BS_BITMAP, so. :)

Try this:

$button = GUICtrlCreateButton ("BTN1", 10,20,40,40, $BS_BITMAP)
GUICtrlSetImage ($button, "BTN1.BMP")
Edited by Saunders

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