Guest CBOB Posted September 9, 2005 Posted September 9, 2005 Hi,I use bitmaps to display this on buttons, like the follwoing code:$backID = GUICtrlCreateButton ("Back", 0, 692, 142, 57, $BS_BITMAP)GUICtrlSetImage (-1, "arrow-left.bmp")After compiling the *.au3 to *.exe I must have the bitmap-File available on the client PC. Is there a possibility to compile / save / include the bitmap-File into the *.exe, that I have only one executable file to transfer to the destination system?TanksCBOB
mocro Posted September 9, 2005 Posted September 9, 2005 I think the FileInstall function is what your looking for. Regards
LxP Posted September 10, 2005 Posted September 10, 2005 mocro is correct. To go into a little more detail, the best way you can implement this is to FileInstall() the image into the user's Temp folder and use it from there, deleting it when you exit your script:fileInstall("myBitmap.bmp", @tempDir & "\myBitmap.bmp") guiCtrlCreatePic(@tempDir & "\myBitmap.bmp", 12, 12) ยทยทยท fileDelete(@tempDir & "\myBitmap.bmp")Actually, if you only place the picture on your window once then you can get away with deleting the file immediately after the GUICtrlCreatePic(). The image will remain visible in your window until you delete the control or the window.
JoshDB Posted September 10, 2005 Posted September 10, 2005 (edited) Another way to use it: $1 = _TempFile() FileInstall("test.jpg", $1) ... $gui = GUICreate("Test", 500, 500, -1, -1,) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") ... $test = GUICtrlCreatePic($1, 25, 206, 169, 23) ... Func Close() FileDelete($1) EndFunc Edited September 10, 2005 by JoshDB Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Guest CBOB Posted September 12, 2005 Posted September 12, 2005 THANK YOU! The function FileInstall() ist the solution. Now I can rollout only one compiled file. Bye CBOB
Amen Posted September 16, 2005 Posted September 16, 2005 I didn't noticed that command! go for reprogramming... he Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/-
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now