martin Posted February 5, 2009 Share Posted February 5, 2009 martin,I have just come back to find you here - glad to have another brain to help!Do you get a transparent .gif when you display it? I could only think that there was an XP theme messing with the display - I use Vista, but as basic a display as I can get away with.I am afraid that my knowledge of graphic formats is not very deep. I understand .bmps quite well, and the differences between them, .jpg, .gif, .png, etc, but little about this kind of problem. Any help you can give would be much appreciated - I am always happy to learn :-)M23Hi Melba, Yes I get a transparent gif which is why I wandered if Jam00 could show the code he was using because I thought maybe he had saved the button you used as a bitmap or something. He got it working with an icon so I think it is possible he didn't have a transparent gif. My knowledge of graphics is very poor so anything I say in that area is to be treated with scepticism and you won't be able to learn much from me . In fact I find the whole area a bit of a mystery, so if you understand some of it maybe you could help me. I find the connection between images and bitmaps and graphic objects to be very confusing and when I have tried to look them up to undertsand them I have failed. I don't get what is actually happening when you create an image from a bitmap or a bitmap from an image, and why you can sometimes copy from an image to a bitmap but not from a bitmap to an image (or is it the other way round?) etc etc. If you, or anyone else, can you suggest a link or something that explains that area I would be very pleased. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Malkey Posted February 6, 2009 Share Posted February 6, 2009 (edited) Jam00Try this. This works on my XP. Whereas, the other examples posted did show the corners.This approach is from the help file.I tried this example with a png and a bmp image file and it did not work.'gif' image files work.#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Local $PicWidth = 21 Local $PicHeigth = 21 $gui = GUICreate("test transparentpic", 400, 300) GUISetBkColor(0x00FF00, $gui); <- Background colour of GUI GUISetState() ; 90, 90 is x,y position on the main GUI ($gui) $pic = GUICreate("", $PicWidth, $PicHeigth, 90, 90, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui); ;GUICtrlSetBkColor(-1, 0x000000); <-Background colour of image you want transparent (Appears not to be needed) ; Next Statement: 0,0 is x, y position on child GUI ($pic) $hPic = GUICtrlCreatePic("button.gif", 0, 0, $PicWidth, $PicHeigth) GUISetState(); While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit Case $hPic; The background, being transparent, is not clickable. MsgBox(0, "", "Hit") EndSwitch WEnd MartinI have read that the bitmap class is a subclass of the image class.The bitmap class has all the bell and whistles, more features.If you can do an operation on an image class object, you can carry out the same operation on a bitmap class object.However, if you can do an operation on a bitmap class object, you may not be able to carry out the same operation on an image class object.Malkey I await correction.Edit:11Feb2009Found a reference to image and bitmap classes at:-http://msdn.microsoft.com/en-us/library/ms534420(VS.85).aspx Edited February 10, 2009 by Malkey Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 6, 2009 Moderators Share Posted February 6, 2009 (edited) martin,Sorry to disappoint you - I should have said that I understand the structure of .bmps quite well. A long time ago I coded something that changed the colour of a .bmp "background" to match the GUI background - a sort of pseudo tranparency. The results were variable - some were definitely a bit iffy! Then the world moved on to more accommodating formats (.gif and .png) and all my hard work became redundant - 'twas ever thus.However, the programming aspects of image manipulation are a bit of a mystery - as I prove to myself on regular occasions!Malkey,I hate to tell you, but your code shows the .gif with the corners on my Vista machine - and I can click on them!M23 Edited February 6, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Jam00 Posted February 6, 2009 Author Share Posted February 6, 2009 (edited) Okay, thanks that's very good! You're really good! EDIT: Then as now I have another problem: I've got it now with icon, because I did not know yet how it goes with Gif, but since I have the problem that that pic because it is transparent where the background color shows, I need it but the pic shows what it is!Skin.rar Edited February 6, 2009 by Jam00 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 6, 2009 Moderators Share Posted February 6, 2009 Jam00, With your code I can see the background with your icon, but not with my .gif (see below). I will think about this some more - but I am afraid that I have very little idea of where to go next! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Jam00 Posted February 6, 2009 Author Share Posted February 6, 2009 Okay, I will try again a little bit, can you post the code? Link to comment Share on other sites More sharing options...
Jam00 Posted February 6, 2009 Author Share Posted February 6, 2009 (edited) I have now with GIF, but it still does not!Skin.rar Edited February 6, 2009 by Jam00 Link to comment Share on other sites More sharing options...
Jam00 Posted February 6, 2009 Author Share Posted February 6, 2009 Okay, I've done it now!Skin.rar Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 6, 2009 Moderators Share Posted February 6, 2009 Jam00, I still see the backgrounds on my machine - but if you are happy then I am very pleased. Good luck with the rest of your script - I hope it is easier than this part! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Jam00 Posted February 6, 2009 Author Share Posted February 6, 2009 However, this is difficult, there should be a TCP chat with Smylie and send files Link to comment Share on other sites More sharing options...
GHOSTSKIKDA Posted February 26, 2009 Share Posted February 26, 2009 Woow !! [center]I LOVE ALGERIA .... ;-)[/center] 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