Didonet Posted November 13, 2007 Share Posted November 13, 2007 How to put an image into the gui? Not like a button, just like a label. But an image. And... how to get the name of the resource of the image when I add it with the command #AutoIt3Wrapper_res_File_Add=menu.jpg Link to comment Share on other sites More sharing options...
searchresult Posted November 13, 2007 Share Posted November 13, 2007 $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg", 72, 104, 100, 100) Link to comment Share on other sites More sharing options...
Valuater Posted November 13, 2007 Share Posted November 13, 2007 FileInstall() Example.... $Sample_pic = @TempDir & "\Sample.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Sample-GUI.jpg", $Sample_pic) 8) Link to comment Share on other sites More sharing options...
Didonet Posted November 13, 2007 Author Share Posted November 13, 2007 how to get it from the exe's resource? 0.o Link to comment Share on other sites More sharing options...
Valuater Posted November 13, 2007 Share Posted November 13, 2007 This works exactly as written #include <GuiConstants.au3> $Sample_pic = @TempDir & "\Sample.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Sample-GUI.jpg", $Sample_pic) $GUI = GUICreate("Picture GUI") $Image_4 = GUICtrlCreatePic($Sample_pic, 20, 35, 284, 302) GUISetState() While GUIGetMsg() <> -3 WEnd 8) Link to comment Share on other sites More sharing options...
Didonet Posted November 13, 2007 Author Share Posted November 13, 2007 I don't have "sample.jpg" or other kind of picture file. I have put the picture in the exe's resources and from there i must get the resource...how? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 13, 2007 Moderators Share Posted November 13, 2007 Don't bump so close to each other, look in the example forum for Zedna's post on resources. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Didonet Posted November 13, 2007 Author Share Posted November 13, 2007 uhh.. sorry for the fast dumb, but i don't have any patience... i want to finish the program faster (lol) Ok, I look Zedna's post... but, i don't want so many options. I need only to insert a image on the gui from the exe's resources. Or to set it like a background. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 13, 2007 Moderators Share Posted November 13, 2007 uhh.. sorry for the fast dumb, but i don't have any patience... i want to finish the program faster (lol)Ok, I look Zedna's post... but, i don't want so many options. I need only to insert a image on the gui from the exe's resources. Or to set it like a background. 1st, it doesn't matter what you want... we are not an On-Demand IT Support forum, we answer when we are ready to answer, and if and or when we find your post and feel like answering we will.2nd, the functions you need are in there, again, it doesn't matter what you want, it matters if it works... if you can customize them to be less code then feel free. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Didonet Posted November 13, 2007 Author Share Posted November 13, 2007 errm... sorry... I read the Zedna's codes and i edit the codes and i create what i want. But... can i put the image behind the text? Link to comment Share on other sites More sharing options...
Zedna Posted November 14, 2007 Share Posted November 14, 2007 errm... sorry... I read the Zedna's codes and i edit the codes and i create what i want. But... can i put the image behind the text? #AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1 #include <GUIConstants.au3> #include "resources.au3" $gui = GUICreate("Data from resources example",820,500) $pic1 = GUICtrlCreatePic("",0,0,400,300) GUICtrlSetState(-1,$GUI_DISABLE) _ResourceSetImageToCtrl($pic1, "TEST_BMP_1", $RT_BITMAP) GUICtrlCreateLabel("TEST",20,20,400,300) GUICtrlSetFont (-1,14, 800, 2, "Comic Sans MS") GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Didonet Posted November 14, 2007 Author Share Posted November 14, 2007 thanks! Link to comment Share on other sites More sharing options...
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