Jump to content

Another Batch of questions


Recommended Posts

#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 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

per help

To 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 disable

GUICtrlSetState( $Pic1, $GUI_DISABLE )

.... also you will need to remove this

GUICtrlSetCursor($Pic1,3) AFAIK

8)

NEWHeader1.png

Link to comment
Share on other sites

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

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 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

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 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

HI,

I think there still enough to learn. :lmao:

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

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.png

but i thank you all for all you help, that is

(of course, that image was an edit though, thats not the real deal)

Edited 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

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.png

but 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

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...