monoceres Posted December 6, 2008 Share Posted December 6, 2008 I want the child guis created from the main one to be independent and i dont want them to have a window border around them. i changed this line: $GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]=GUICreate("Child number: "&Ubound($GUI_OBJECT),$w,$h,$x,$y,-1,-1,$parent) to: $GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]=GUICreate("Child number: "&Ubound($GUI_OBJECT),$w,$h,$x,$y,$WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED),$parent) but when i changed it no windows show up anymore? Tested without my code and it's still not showing up, so it's definitely how you're creating the child (how I don't know). Maybe start a new thread based on this code: #include <guiconstantsex.au3> #include <windowsconstants.au3> $parent=GUICreate("") GUISetState() $child=GUICreate("Child number: 1",400,300,10,10,$WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED),$parent) GUISetState() Sleep(10000) To get some help on creating the child Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
AustrianOak Posted December 7, 2008 Author Share Posted December 7, 2008 What do you mean when you say its how Im creating the child guis. It's all your code i only changed one line. im creating the child the same way you did i just want it without the window border and transparent Link to comment Share on other sites More sharing options...
monoceres Posted December 7, 2008 Share Posted December 7, 2008 What do you mean when you say its how Im creating the child guis. It's all your code i only changed one line. im creating the child the same way you did i just want it without the window border and transparentWhat I'm saying is that it's obvious that the styles you defined are the wrong thing here as you could see in my reproducer. Maybe childs cannot have the $WS_EX_LAYERED style or something. I seriously don't know. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
AustrianOak Posted December 7, 2008 Author Share Posted December 7, 2008 well when i took out the bitor and ws_ex_layered stuff and just had $ws_popup they would show up but it wasnt transparent. Link to comment Share on other sites More sharing options...
AustrianOak Posted December 10, 2008 Author Share Posted December 10, 2008 bump. i havent had any luck. Link to comment Share on other sites More sharing options...
AustrianOak Posted December 22, 2008 Author Share Posted December 22, 2008 (edited) Ok, heres the code: its simple and its just like i want it except i need to get rid of the window border and want everything but the green fish to be transparent. how? expandcollapse popup#include <GDIPlus.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #include <misc.au3> Global $GUI_OBJECT[1][5]; 0=hwnd, 1=width, 2=height, 3=graphics obj, 4 = img obj Opt("GUIOnEventMode",1) $hwnd=GUICreate("Parent",400,300) GUISetOnEvent($GUI_EVENT_CLOSE,"close") GUISetState() _GDIPlus_Startup() $GUI_OBJECT[0][0]=$hwnd $GUI_OBJECT[0][1]=26 $GUI_OBJECT[0][2]=26 $GUI_OBJECT[0][3]=_GDIPlus_GraphicsCreateFromHWND($hwnd) $GUI_OBJECT[0][4]=_GDIPlus_ImageLoadFromFile("background.png") _RePaint($GUI_OBJECT[0][0],0,0,0) GUIRegisterMsg($WM_PAINT,"_RePaint") Do Sleep(20) If _IsPressed("01") And WinActive($hwnd) Then _CreateChild($hwnd,Random(0,@DesktopWidth,1),Random(0,@DesktopHeight,1),26,26,"background.png") Do Sleep(10) Until Not _IsPressed("01") EndIf Until False Func _CreateChild($parent,$x,$y,$w,$h,$imagename) ReDim $GUI_OBJECT[Ubound($GUI_OBJECT)+1][5] $GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]=GUICreate("Child number: "&Ubound($GUI_OBJECT),$w,$h,$x,$y) GUISetState(@SW_SHOW,$GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]) $GUI_OBJECT[Ubound($GUI_OBJECT)-1][1]=$w $GUI_OBJECT[Ubound($GUI_OBJECT)-1][2]=$h $GUI_OBJECT[Ubound($GUI_OBJECT)-1][3]=_GDIPlus_GraphicsCreateFromHWND($GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]) $GUI_OBJECT[Ubound($GUI_OBJECT)-1][4]=_GDIPlus_ImageLoadFromFile($imagename) GUISetOnEvent($GUI_EVENT_CLOSE,"close",$GUI_OBJECT[Ubound($GUI_OBJECT)-1][0]) _RePaint($GUI_OBJECT[Ubound($GUI_OBJECT)-1][0],0,0,0) EndFunc Func _RePaint($hwndparam,$msg,$wparam,$lparam) For $i=0 To UBound($GUI_OBJECT)-1 If $hwndparam=$GUI_OBJECT[$i][0] Then _GDIPlus_GraphicsDrawImageRect($GUI_OBJECT[$i][3],$GUI_OBJECT[$i][4],0,0,$GUI_OBJECT[$i][1],$GUI_OBJECT[$i][2]) ExitLoop EndIf Next Return $GUI_RUNDEFMSG EndFunc Func close() If @GUI_WinHandle<>$hwnd THen For $i=0 To UBound($GUI_OBJECT)-1 If @GUI_WinHandle=$GUI_OBJECT[$i][0] Then _GDIPlus_GraphicsDispose($GUI_OBJECT[$i][3]) _GDIPlus_ImageDispose($GUI_OBJECT[$i][4]) GUIDelete($GUI_OBJECT[$i][0]) _ArrayDelete($GUI_OBJECT,$i) Return EndIf Next EndIf For $i=0 To UBound($GUI_OBJECT)-1 _GDIPlus_GraphicsDispose($GUI_OBJECT[$i][3]) _GDIPlus_ImageDispose($GUI_OBJECT[$i][4]) Next _GDIPlus_Shutdown() Exit EndFunc when i add these styles $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED) to the end of the gui creation part which should take care of my problems, now there are no little guis that show. Edited December 29, 2008 by AustrianOak Link to comment Share on other sites More sharing options...
AustrianOak Posted December 26, 2008 Author Share Posted December 26, 2008 bump Link to comment Share on other sites More sharing options...
komalo Posted December 26, 2008 Share Posted December 26, 2008 i don't know if someone posted this before but did you try _WinAPI_UpdateLayeredWindowyou will find a nice example in %SystemDrive%\Program Files\AutoIt3\Examples\GUI\Advanced\AlphaBlend.au3and there's lod3n's great example : http://www.autoitscript.com/forum/index.ph...=lod3n+launcher [font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font] Link to comment Share on other sites More sharing options...
AustrianOak Posted December 26, 2008 Author Share Posted December 26, 2008 dont post lod3ns example. ive reviewed it enough to know mine is very different than his and i have a very different goal. and yeah i tried _WinAPI_UpdateLayeredWindow and it didnt work. Link to comment Share on other sites More sharing options...
FireFox Posted December 26, 2008 Share Posted December 26, 2008 @AustrianOak _WinApi_SetLayeredWindowAttributes by ProgAndy Cheers,FireFox. Link to comment Share on other sites More sharing options...
AustrianOak Posted December 29, 2008 Author Share Posted December 29, 2008 keep in mind im using beta version 3.2.11.5 so i dont have that firefox. Link to comment Share on other sites More sharing options...
FireFox Posted December 29, 2008 Share Posted December 29, 2008 @AustrianOak Hahaha ... If function does not exists in scite its because its an udf ; so search little in example scripts Cheers, FireFox. Link to comment Share on other sites More sharing options...
AustrianOak Posted December 29, 2008 Author Share Posted December 29, 2008 (edited) I dont think this is what I was looking for. I need my window to be a toolwindow so it doesnt show up in taskmanager and needs to be a pop-up so it wont have a border and needs to be layered so the background of the gui will be transparent and only the picture can be seen. as in my code i posted above when i add the necessary styles to the gui creation part i think i mentioned that no little guis pop-up whatsoever.see this post: http://www.autoitscript.com/forum/index.ph...st&p=620087 Edited December 29, 2008 by AustrianOak Link to comment Share on other sites More sharing options...
FireFox Posted December 29, 2008 Share Posted December 29, 2008 @AustrianOak Its exactly what I said... Make gui with hidden state then create transparent child of hidden window an put your image on (image will be visible of course so use _WinApi_SetLayeredWindowAttributes ...) Cheers, FireFox. Link to comment Share on other sites More sharing options...
AustrianOak Posted December 29, 2008 Author Share Posted December 29, 2008 ok, but did u even try my code to really know what im talking about? try it like it is in the link i gave you and try it by adding those styles and i think u'll see my problem. even if what u say works, how will i make it a toolwindow? Link to comment Share on other sites More sharing options...
AustrianOak Posted December 29, 2008 Author Share Posted December 29, 2008 (edited) i just realized your method wont work becuz in my main code i need to see my main gui. itd be nice if someone could figure out why my child guis dissappear when i add those styles... Edited December 29, 2008 by AustrianOak Link to comment Share on other sites More sharing options...
AustrianOak Posted January 10, 2009 Author Share Posted January 10, 2009 bump Link to comment Share on other sites More sharing options...
FireFox Posted January 10, 2009 Share Posted January 10, 2009 @AustrianOak ...use simply jpg and youve resolved your problem Cheers, FireFox. Link to comment Share on other sites More sharing options...
AustrianOak Posted January 25, 2009 Author Share Posted January 25, 2009 a jpg isnt transparent though. come on ive already explained this. Link to comment Share on other sites More sharing options...
AustrianOak Posted February 7, 2009 Author Share Posted February 7, 2009 bump. someone please help im nearly finished with my script this is the only thing in my way. 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