Vindicator209 Posted October 8, 2006 Share Posted October 8, 2006 (edited) #include <GUIConstants.au3> $Form1 = GUICreate("", 803, 502, 198, 104) $Pic1 = GUICtrlCreatePic("PDXMP.BMP", 0, 0, 800, 500, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor($Pic1,3) GUICtrlCreateInput("", 184, 240, 305, 21) $Play = GUICtrlCreateButton("Play", 184, 264, 33, 17, 0) $Stop = GUICtrlCreateButton("Stop", 216, 264, 33, 17, 0) $Mute = GUICtrlCreateButton("Mute", 248, 264, 33, 17, 0) $Slider1 = GUICtrlCreateSlider(280, 264, 209, 17) GUISetState(@SW_SHOW) WinSetTrans("","",60) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Play Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Ok, so I have the above, an winsettrans isint working for me, the picture is already supposed to be transparent because it has no background(I erased the opacity on Photoshop) but it appears white now how would I fix that? ALSO, due to the image in the place, I cannot click or use any of the controls? ALSO, how would I go about taking away the border and the title bar?, so that it is only the tranparent image and the controls? PS, i know im not done with the script Edited October 8, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Valuater Posted October 8, 2006 Share Posted October 8, 2006 per helpTo have a transparent picture it is needed to use a .gif image with the transparency color set and to create the window with WS_EX_LAYERED extended style. See example 2.also to use the buttons you will nedd to set the state of the pic as disableGUICtrlSetState( $Pic1, $GUI_DISABLE ).... also you will need to remove thisGUICtrlSetCursor($Pic1,3) AFAIK8) Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 8, 2006 Author Share Posted October 8, 2006 thx! [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 8, 2006 Author Share Posted October 8, 2006 (edited) hmm, still wont work: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Kyle\My Documents\Player.kxf $gui= GUICreate("PLAYER", 850, 570, 198, 104) $pic=GUICreate("", 800, 500, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic("PDX1.gif",0,0, 0,0) GUICtrlSetState( $pic, $GUI_DISABLE ) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) GUICtrlCreateInput("", 184, 240, 305, 21) $Play = GUICtrlCreateButton("Play", 184, 264, 33, 17, 0) $Stop = GUICtrlCreateButton("Stop", 216, 264, 33, 17, 0) $Mute = GUICtrlCreateButton("Mute", 248, 264, 33, 17, 0) $Slider1 = GUICtrlCreateSlider(280, 264, 177, 17) $Exit = GUICtrlCreateButton("Exit", 456, 264, 33, 17, 0) GUISetState(@SW_SHOW) GUICtrlSetBkColor($pic, $GUI_BKCOLOR_TRANSPARENT) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 8, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Valuater Posted October 8, 2006 Share Posted October 8, 2006 (edited) thats not what i suggested gui= GUICreate("PLAYER", 850, 570, 198, 104) $pic=GUICreate("", 800, 500, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic("PDX1.gif",0,0, 0,0) GUICtrlSetState( $pic, $GUI_DISABLE ) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) 2 seperate guis... and set to show before you add the rest of the controls???? you are making more of a mess 8 Edited October 8, 2006 by Valuater Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 8, 2006 Author Share Posted October 8, 2006 (edited) well, i looked at the help file and gor frustrated so i just copied it straight from there EDIT: Ok, i think your annoyed now, but even with that I cant get it to..well yea: #include <GUIConstants.au3> $gui= GUICreate("", 850, 570, 198, 104,$WS_BORDER) $pic=GUICreate("", 800, 500, 10, 10,BitOR($WS_POPUP,$WS_BORDER),BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic("PDX1.gif",0,0, 0,0) GUICtrlSetState( $pic, $GUI_DISABLE ) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) GUICtrlCreateInput("", 184, 240, 305, 21) $Play = GUICtrlCreateButton("Play", 184, 264, 33, 17, 0) $Stop = GUICtrlCreateButton("Stop", 216, 264, 33, 17, 0) $Mute = GUICtrlCreateButton("Mute", 248, 264, 33, 17, 0) $Slider1 = GUICtrlCreateSlider(280, 264, 177, 17) $Exit = GUICtrlCreateButton("Exit", 456, 264, 33, 17, 0) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 8, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 8, 2006 Share Posted October 8, 2006 HI, I think there still enough to learn. Try this: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Kyle\My Documents\Player.kxf $gui= GUICreate("PLAYER", 850, 570, 198, 104, $WS_EX_TRANSPARENT ) $pic=GUICreate("", 800, 500, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic("PDX1.gif",0,0, 0,0) GUICtrlSetState( -1, $GUI_DISABLE ) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) GUICtrlCreateInput("", 184, 240, 305, 21) $Play = GUICtrlCreateButton("Play", 184, 264, 33, 17, 0) $Stop = GUICtrlCreateButton("Stop", 216, 264, 33, 17, 0) $Mute = GUICtrlCreateButton("Mute", 248, 264, 33, 17, 0) $Slider1 = GUICtrlCreateSlider(280, 264, 177, 17) $Exit = GUICtrlCreateButton("Exit", 456, 264, 33, 17, 0) GUISetState(@SW_SHOW) GUICtrlSetBkColor($pic, $GUI_BKCOLOR_TRANSPARENT) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Play MsgBox(0,"","play") EndSwitch WEnd So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Valuater Posted October 8, 2006 Share Posted October 8, 2006 meger....??? GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) .... GUISetState(@SW_SHOW) 8) Link to comment Share on other sites More sharing options...
Vindicator209 Posted October 8, 2006 Author Share Posted October 8, 2006 (edited) hmm...the controls still wont show up..i dont know exactly what you guys are really gettin at, but i was thinking:http://img374.imageshack.us/my.php?image=screenedxf1.pngbut i thank you all for all you help, that is(of course, that image was an edit though, thats not the real deal) Edited October 8, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
Paulie Posted October 8, 2006 Share Posted October 8, 2006 hmm...the controls still wont show up..i dont know exactly what you guys are really gettin at, but i was thinking:http://img374.imageshack.us/my.php?image=screenedxf1.pngbut i thank you all for all you help, that is(of course, that image was an edit though, thats not the real deal)Look at some of larry's UDFs (I think larry made it, 98% sure)One called 'CreateTextRgn' lets you make text without a background window, i used it for my mousetail maker Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 9, 2006 Moderators Share Posted October 9, 2006 Actually... If you read the help file, you'll see your issue is more than likely you are trying to use a .png file rather than a .bmp, .jpg, or .gif. 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...
Vindicator209 Posted October 9, 2006 Author Share Posted October 9, 2006 no, im converted it into BMP. [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] 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