UTA Posted February 3, 2006 Posted February 3, 2006 (edited) It's me again Now that I found a solution to my other problem (ListviewItem-Problem) by using the beta instead of the release-version I have a problem with the beta: The following code is working fine with the release-version: #include <GUIConstants.au3> ; Erzeuge Hauptformular $MainFormHandle = GUICreate("Test2", 320, 250, -1, -1, -1, $WS_EX_TOPMOST) $tab=GUICtrlCreateTab (10,10, 300, 230) $tab0=GUICtrlCreateTabitem ("Heute") $Logo_1 = GUICtrlCreatePic("logo_r2_c1.jpg",20, 147, 0, 0) $Logo_2 = GUICtrlCreatePic("logo_r1_c2.jpg",215, 37, 0, 0) GUICtrlCreateTabitem (""); end tabitem definition ; Hauptprozedur GUISetState (@SW_SHOW, $MainFormHandle) While 1 $msg = GUIGetMsg() ; ======================================== ; ======================================== If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Exit BUT it is NOT with the beta: The two Logos (or JPGs; displace them by any other jpgs) are not displayed. Is this also a bug (this time in the beta) or did I do something wrong? (I thought typically the beta is getting MORE functions than less ) UTA Edited February 3, 2006 by UTA
jpm Posted February 3, 2006 Posted February 3, 2006 certainly your picture are not accessible when the script run. test with the doc example ;----- example 1 ---- #include <GUIConstants.au3> GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend GUISetState () ; resize the control $n=GUICtrlSetPos($n,50,50,200,100) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend
UTA Posted February 3, 2006 Author Posted February 3, 2006 First the important thing: I found the error! But now the confusing thing: 1. I replaced my lines of code... $Logo_1 = GUICtrlCreatePic("logo_r2_c1.jpg",20, 147, 0, 0) $Logo_2 = GUICtrlCreatePic("logo_r1_c2.jpg",215, 37, 0, 0) ...with this line: $n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50) It worked! 2. I copied my logos into the directory above (@Systemdir & "\oobe\images\") and replaced the new line with one of my old lines and adjusted the directory (to the same as above) to look in: $Logo_1 = GUICtrlCreatePic(@Systemdir & "\oobe\images\logo_r2_c1.jpg",20, 147, 0, 0) It didn't work! 3. Not really understanding the differences between the two lines I stumbled across the last two parameters in my lines: ....es\logo_r2_c1.jpg",20, 147, 0, 0) After a short look into the helpfile I discovered that there was a reason, why I decided to set them to zero: If you want to have a picture having the same size as the file content just use width=height=0.Although I did that and it works fine with the release-version it do not work anymore with the beta. 4. After setting the width and height manually to the values of the picture, it was shown correctly. I suppose that either the helpfile or the beta-release should be corrected. UTA
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