Markus Posted February 27, 2006 Posted February 27, 2006 Hi! I have a little Icon problem. I have an Icon with a transparent Colour. But if the icon is over a picture in the GUI, i don't see the part of the picture that is beyond the transparent colour. I hope you can help me. "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
GaryFrost Posted February 27, 2006 Posted February 27, 2006 Hi!I have a little Icon problem. I have an Icon with a transparent Colour. But if the icon is over a picture in the GUI, i don't see the part of the picture that is beyond the transparent colour.I hope you can help me. would be a good idea to supply a script to duplicate this problem and the images SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Markus Posted February 27, 2006 Author Posted February 27, 2006 Right#include <GUIConstants.au3>GUICreate("",400,400)GUISetState()GUICtrlCreatePic(@ScriptDir & "\feld_schwarz.bmp",20,20,70,70 )GUICtrlCreatePic(@ScriptDir & "\feld_schwarz.bmp",200,200,100,100)$ico=GUICtrlCreateIcon(@ScriptDir & "\schachfigur_turm.ico",-1,220,220,70,70)$stop=GUICtrlCreateButton("stop",200,20,100,20)$weiter=GUICtrlCreateButton("go on",200,50,100,20)$neu=GUICtrlCreateButton("new",200,80,100,20)Sleep(1000)$ico=GUICtrlCreateIcon(@ScriptDir & "\schachfigur_turm.ico",-1,140,140,70,70)$x=140$y=140While 1GUICtrlSetPOs($ico,$x,$y)$x=$x-1$y=$y-1Sleep(10)$msg=GUIGetMsg()If $msg=$GUI_EVENT_CLOSE Then ExitIf $msg=$neu Then $x=140 $y=140EndIf If $msg=$stop Then While 1 $msg=GUIGetMsg() If $msg=$weiter Then ExitLoop If $msg=$GUI_EVENT_CLOSE Then ExitWEndEndIfWEndAnd the Pic/IconThe_Pics.zip "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
Markus Posted February 27, 2006 Author Posted February 27, 2006 I just noticed a little mistake in the code, the first $ico=GUICtrlCreateIcon(...) shouldnt have this id ($ico), just remove it plz. By the way it has no effect on the script. The problem still consists. The Icon is transparent (except the towerpart in the middle of course), so i should see what is behind, shouldn't i? "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
Markus Posted February 28, 2006 Author Posted February 28, 2006 Noone knows a solution? It's normal that transparent colours of icons dont work in autoit? I wanted to write a chess game, the field exists of black and white pics, but i dont see those pics, beyond the figure's transparent colour. Is there a chess game in this forum alrdy, that could help me? "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
GaryFrost Posted February 28, 2006 Posted February 28, 2006 Noone knows a solution? It's normal that transparent colours of icons dont work in autoit?I wanted to write a chess game, the field exists of black and white pics, but i dont see those pics, beyond the figure's transparent colour.Is there a chess game in this forum alrdy, that could help me? I did try to help you, but here's what I ended up finding out http://www.autoitscript.com/forum/index.ph...ndpost&p=154852 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
peter1234 Posted February 28, 2006 Posted February 28, 2006 (edited) Markus,I checked your script but have not looked at it in detail. I think you want to use a transparent region instead (do search).see: http://www.autoitscript.com/forum/index.ph...ndpost&p=134398 Edited February 28, 2006 by peter1234
Markus Posted February 28, 2006 Author Posted February 28, 2006 Thank you very much, peter and gafrost, i alrdy thought nobody would help me. @gafrost: i watched your test script (thank you), but whats that $GUI_BKCOLOR_TRANSPARENT. When i tried it, the variable caused a mistake. Don't i have the latest version?? Or was it just an idea of you for a new variable in the next update?? @peter: funny script^^ i think that could help, ill try to understand what the dll function is exactly doing, maybe ill have more questions tomorrow Would this dll funciton also work for a chessfigure picture, that moves over the field? And one more point, which editor would u prefer for reading *.dll, i have noone, that can read dlls, maybe u can say me one, otherwise ill search this rly great forum "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
Moderators SmOke_N Posted February 28, 2006 Moderators Posted February 28, 2006 Thank you very much, peter and gafrost, i alrdy thought nobody would help me.@gafrost: i watched your test script (thank you), but whats that $GUI_BKCOLOR_TRANSPARENT. When i tried it, the variable caused a mistake. Don't i have the latest version?? Or was it just an idea of you for a new variable in the next update??@peter: funny script^^ i think that could help, ill try to understand what the dll function is exactly doing, maybe ill have more questions tomorrow Would this dll funciton also work for a chessfigure picture, that moves over the field?And one more point, which editor would u prefer for reading *.dll, i have noone, that can read dlls, maybe u can say me one, otherwise ill search this rly great forum I have $GUI_BKCOLOR_TRANSPARENT in BetaFrom gafrost / Gary: APIViewer2004 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.
Markus Posted February 28, 2006 Author Posted February 28, 2006 (edited) Oh I havent had the latest version Now gafrosts test script worked. Thx for Api Viewer, Api Viewer is also for dlls? Edited February 28, 2006 by Markus "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
peter1234 Posted February 28, 2006 Posted February 28, 2006 (edited) Markus, The trasparent region should do exactly what you want. I have no idea how to read DLLs. Do not expect that there will be a lot of people just waiting to answer your questions when you post them. Most people have other more important things they should be doing. Edited February 28, 2006 by peter1234
Markus Posted February 28, 2006 Author Posted February 28, 2006 The trasparent region should do exactly what you want.Not rly, because i wanted a transparent region for a picture and if i understood the function it sets a transparent region for a window "SetWindowRgn" and not for a picture in a gui-window.I think you havent understood my problem.Do not expect that there will be a lot of people just waiting to answer your questions when you post them. Most people have other more important things they should be doing. sorry i just thought that i can ask in the "Support"-Forum you seem to be one of those people who have to do something more important, k thank you for your help so far, i'll think ill have to try it alone... "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
peter1234 Posted February 28, 2006 Posted February 28, 2006 (edited) Not rly, because i wanted a transparent region for a picture and if i understood the function it sets a transparent region for a window "SetWindowRgn" and not for a picture in a gui-window.I think you havent understood my problemPerhaps I did not understand. In which case I am sorry for wasting your time. Then again, perhaps you did not understand. In which case I will try to help you understand... Each transparent region is a small window that has an image in it with a transparent background. There can be many of these windows. The windows can be moved anywhere on top of a background image (or anyhing else, even other transparent regions) and the image in the window will be on top with the image under the window showing through the transpartnet part of the window. Thus each window is like an icon with a transparent background. Isn't that what you wanted? I am not an experienced programer. There may be a better way of doing what you want, but that is the only way I can think of. Sorry if it does not help. Edited March 1, 2006 by peter1234
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