Sign in to follow this  
Followers 0
Rad

Picture as a window... sort of

5 posts in this topic

What I need.. is pretty hard to explain. I need a transparent window that I can put an image on (which is a GIF with transparency), but make the image not transparent (other than the transparent area)...

Not sure if it makes sense, but any ideas?

Share this post


Link to post
Share on other sites



What I need.. is pretty hard to explain. I need a transparent window that I can put an image on (which is a GIF with transparency), but make the image not transparent (other than the transparent area)...

Not sure if it makes sense, but any ideas?

I do not know if this will work

creat 2 gui windows one bigger than the other and make the biggest one transparent - make the little one follow it around and put your gif inside??


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Doesn't really make sense... Are you trying to do something like this....

#include <GUIConstants.au3>
;Creates two GUI's
$GUI = GUICreate("Test", 199, 74, -1, -1, BitOR($WS_POPUPWINDOW, $WS_BORDER))
$Pic = GUICtrlCreatePic(@SystemDir & "\Hook.gif", -1, -1, 200, 75)
;Set's the GUI's Background Color
GUISetBkColor(0x000000)
;Set's $pic's state to Disable, making the background transparent
GUICtrlSetState($Pic, $GUI_DISABLE)
;Create's the exit button
$Button_Exit = GUICtrlCreateLabel("X", 183, 0, 16, 17, $SS_CENTER, $WS_EX_STATICEDGE)
;Set's the exit button's options
GUICtrlSetColor($Button_Exit, 0xfffafa)
GUICtrlSetFont($Button_Exit, Default, 900)
;Create's the minimize button
$Button_Min = GUICtrlCreateLabel("-", 165, 0, 16, 17, $SS_CENTER, $WS_EX_STATICEDGE)
;Set's the minimize button's options
GUICtrlSetColor($Button_Min, 0xfffafa)
GUICtrlSetFont($Button_Min, 13.5, 400, 1)
;Label's and background color-set
$Label = GUICtrlCreateLabel("", 0, 0, 166, 17)
GUICtrlSetBkColor($Label, $GUI_BKCOLOR_TRANSPARENT)
$Label2 = GUICtrlCreateLabel("", 0, 17, 199, 57)
GUICtrlSetBkColor($Label2, $GUI_BKCOLOR_TRANSPARENT)
;Makes the final product appear
GUISetState()

;Sets' the cases for the GUI/Keeps the program open till it inject's the .dll

While 1
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $Button_Exit
            Exit
        Case $msg = $Button_Min
            GUISetState(@SW_MINIMIZE)
        Case $msg = $Label Or $msg = $Label2
            _Drag($GUI)
    EndSelect
WEnd

;Refreshes the GUI when it recieve's a mouse drag
Func _Drag($h_gui)
   DllCall("user32.dll", "int", "ReleaseCapture")
   DllCall("user32.dll", "int", "SendMessage", "hWnd", $h_gui, "int", 0xA1, "int", 2, "int", 0)
EndFunc
;---End of GUI Creation

What it did for me in my case, is make two gui's. One to display the picture. So I could place buttons over it, and letting the buttons actually be pressable.

I have no idea what you want, this was a complete shot i the dark, maybe if you could explain it in another way.


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I think he's talking about a window mask using a gif as the mask.

I think Lar or Jon made one a while back using the Alpha layer of a jpeg. or something wacky with a bmp.

Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Sardith, Not exactly... Its to get a "workspace" that you move a window around then right-click to drop it and then thats the only area my program will work in.

Right now I have it as a $WS_POPUP and put my .gif across the entire thing (My gif is just a simple transparent image with green marked corners, and an X in the middle etc to help line it up). I just made the window transparency 20% and that can work.. but it would be better if I could have the WINDOW 100% transparent, and the image not transparent at all...

You can see the green marks, but theres also a gray background which the "workspace" might cover it up (which isnt a very good thing...)

Share this post


Link to post
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
Sign in to follow this  
Followers 0