incepator Posted August 17, 2018 Share Posted August 17, 2018 Hello, I have a little problem if someone can help me solve this. I have the GUICtrlCreatePic function and one image (.bmp) The problem is that if I set the GUISetBkColor in my GUI, then the clarity of the picture disappears. I do not understand what to do. If you can help me wait for your opinions, thank you! Code: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 437, 192, 124) GUISetBkColor(0x8080FF) $Pic1 = GUICtrlCreatePic("asd.bmp", 16, 8, 351, 90) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Please download the image bellow. Thank you! asd.bmp Link to comment Share on other sites More sharing options...
incepator Posted August 18, 2018 Author Share Posted August 18, 2018 Hmmm... is there any solution? the picture is blurred. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 18, 2018 Developers Share Posted August 18, 2018 Looks like you have a BMP with the white color as transparent color, so when you display it on a White background all look good, but not so much with a purple background. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
incepator Posted August 18, 2018 Author Share Posted August 18, 2018 Yes Jos, Yes, I really need to use that background purple. I have a project I'm working on now, but this little problem has blocked me for 2 days, I really do not find a stable solution. I tried to put a label under that picture, but it still does not work. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 18, 2018 Developers Share Posted August 18, 2018 Something like this? #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 437, 192, 124) GUISetBkColor(0x8080FF) $lbl1 = GUICtrlCreatelabel("", 16, 8, 351, 90) GUICtrlSetBkColor(-1, 0xffffff) $Pic1 = GUICtrlCreatePic("asd.bmp", 16, 8, 351, 90) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
incepator Posted August 18, 2018 Author Share Posted August 18, 2018 little things make the difference GUICtrlSetBkColor(-1, 0xffffff) Thanks for helping! I appreciate! 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