Jump to content

Gui


Recommended Posts

I need help, with two things setting a pictures height and width, and making the background color of a picture transparent.

Opt("WinTitleMatchMode", 2)
$cool = WinSetTrans("", "", 170)

#include <GUIConstants.au3>
$gui = GUICreate("$cool",127,136,-1,-1,$WS_POPUP)
GUICtrlCreatePic(".\alien_device.bmp",0,0,127,136)

$a = DLLCall(".\BMP2RGN.dll","int","BMP2RGN", _
            "str",".\larry.bmp", _
            "int",0, _
            "int",0, _
            "int",0)

SetWindowRgn($gui, $a[0])

GUISetState()
Sleep(2000)

Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc
thats what I got so far

oo i c the problem, i read its default is to set it to match the BK color not the pic color so just make it so it doesnt do that and if its already transparent then its not going to matter

$ACS_NONTRANSPARENT

i just noticed something, U CANT HAVE TRANSPARENT AVIS AHHAHAHAHAHAHA

mines not AVIS, well not that I know of

I also tryed this

$pic = GUICtrlCreatePic(".\alien_device.bmp",0,0,127,136)

#include <GUIConstants.au3>
$gui = GUICreate("$cool",127,136,-1,-1,$WS_POPUP)
GUISetState(@SW_SHOW,$pic)
WinSetTrans($pic, "", 10)


GUICtrlCreatePic(".\alien_device.bmp",0,0,127,136)

$a = DLLCall(".\BMP2RGN.dll","int","BMP2RGN", _
            "str",".\larry.bmp", _
            "int",0, _
            "int",0, _
            "int",0)

SetWindowRgn($gui, $a[0])

GUISetState()
Sleep(2000)

Func SetWindowRgn($h_win, $rgn)
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc

and nothing?

[s]Autoit[/s]
Link to comment
Share on other sites

1

where did you get this idea

$cool = WinSetTrans("", "", 170)

$gui = GUICreate("$cool"

its... GUICreate("title"

2

where did you get this idea

$pic = GUICtrlCreatePic(".\alien_device.bmp",0,0,127,136)

#include <GUIConstants.au3>

$gui = GUICreate("$cool",127,136,-1,-1,$WS_POPUP)

GUISetState(@SW_SHOW,$pic)

not saying this will work... but it is proper order to the script ( and may work )

#include <GUIConstants.au3>

$gui = GUICreate("Title",127,136,-1,-1,$WS_POPUP)

$pic = GUICtrlCreatePic(".\alien_device.bmp",0,0,127,136)

GUISetState(@SW_SHOW)

wow... ideas from where????

8)

NEWHeader1.png

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