Jump to content
Sign in to follow this  
incepator

GUICtrlCreatePic bmp problem

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.
  :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...