Jump to content
Sign in to follow this  
Wb-FreeKill

Od looking picture in GUI

Recommended Posts

Wb-FreeKill

How can i solve this od problem?

Picture

#include <GUIConstants.au3>

GUICreate("Msgbox setup",415,470)
GUISetBkColor (0x87509C)
$Funnybtn = GUICtrlCreatePic("C:\script filer\msgbox.jpg",0,0,0,0)
GUICtrlSetState($Funnybtn, $GUI_DISABLE) 
GUICtrlSetPos($Funnybtn,140,10,220,120)

$msgTitle = GUICtrlCreateInput("Title",15,150,120,20)
$msgText = GUICtrlCreateInput("Text",150,150,250,20)

GUICtrlCreateGroup("Icons",15,180,190,180)
$msgb1 = GUICtrlCreateRadio("No icon",20,200,100,20)
GUICtrlsetstate(-1,$GUI_Checked)
GUIctrlCreateLabel("(No Icon)",143,200,50,20)
$msgb2 = GUICtrlCreateRadio("Stop-sign icon",20,225,130,20)
$msgb3 = GUICtrlCreateRadio("Question-mark icon",20,257,130,20)
$msgb4 = GUICtrlCreateRadio("Exclamation-point icon",20,292,130,20)
$msgb5 = GUICtrlCreateRadio("Information icon",20,327,130,20)

GUICtrlCreateGroup("Buttons",210,180,190,180)
$msgc1 = GUICtrlCreateRadio("OK button",230,200,150,20)
GUICtrlsetstate(-1,$GUI_Checked)
$msgc2 = GUICtrlCreateRadio("OK and Cancel",230,225,145,20)
$msgc3 = GUICtrlCreateRadio("Abort, Retry and Ignore",230,250,150,20)
$msgc4 = GUICtrlCreateRadio("Yes, No, and Cancel",230,275,150,20)
$msgc5 = GUICtrlCreateRadio("Yes and No",230,300,150,20)
$msgc6 = GUICtrlCreateRadio("Retry and Cancel",230,325,150,20)

GUICtrlCreateGroup("Timeout",15,365,385,100)
GUIctrlCreateLabel("Timeout before the msgbox closes",100,380,230,20)
GUICtrlsetfont(-1,9,600)
$Timeout = GUICtrlCreateCheckbox("Enable timeout",40,400,150,20)
$Timeoutinput = GUICtrlCreateInput("5",40,425,30,20)
GUICtrlsetstate(-1,$GUI_DISABLE)
GUIctrlCreateLabel("Seconds",80,427,50,20)

$Msg1=GUICtrlCreatePic("C:\script filer\stopico.jpg",50,50, 200,50)
GUICtrlSetState($Msg1, $GUI_DISABLE) 
$Msg1=GUICtrlSetPos($Msg1,150,220,30,30)
$Msg2=GUICtrlCreatePic("C:\script filer\quesico.jpg",50,50, 200,50)
GUICtrlSetState($Msg2, $GUI_DISABLE) 
$Msg2=GUICtrlSetPos($Msg2,150,255,30,30)
$Msg3=GUICtrlCreatePic("C:\script filer\exclico.jpg",50,50, 200,50)
GUICtrlSetState($Msg3, $GUI_DISABLE) 
$Msg3=GUICtrlSetPos($Msg3,150,290,30,30)
$Msg4=GUICtrlCreatePic("C:\script filer\infoico.jpg",50,50, 200,50)
GUICtrlSetState($Msg4, $GUI_DISABLE) 
$Msg4=GUICtrlSetPos($Msg4,150,325,30,30)
GUISetState()

While 1
    
 $msg = GUIGetMsg()    
 
 If $msg = $GUI_Event_CLOSE Then Exit
 
WEnd
Edited by Wb-FreeKill

Share this post


Link to post
Share on other sites
SlimShady

What do you expect to see?

Do you want this image shown: "C:\script filer\msgbox.jpg"

Share this post


Link to post
Share on other sites
Wb-FreeKill

The bg color was just for showing my problem.. can't you see that the BG color is in the msgbox? why is that...

Share this post


Link to post
Share on other sites
SlimShady

The messagebox with the purple in it, is an image which you created an added in your script.

Share this post


Link to post
Share on other sites
Wb-FreeKill

yes? but why is the bacbground color showing in the middle of the picture?

Share this post


Link to post
Share on other sites
Wb-FreeKill

The original picture DON'T have that purple color in it, it only shown when i change the bg color...

it can't be that difficult to understand?

Edited by Wb-FreeKill

Share this post


Link to post
Share on other sites
Helge

Isn't this the same problem that someone other here had ?

I think I remember someone posting something about this some days ago..

Maybe he managed to fix it ?

Share this post


Link to post
Share on other sites
Wb-FreeKill

maybe, but do anyone have the solutions then?

btw, i answered your letter Helge

Share this post


Link to post
Share on other sites
CyberSlug

The original picture DON'T have that purple color in it, it only shown when i change the bg color...

it can't be that difficult to understand?

<{POST_SNAPBACK}>

Oh, well why didn't you say so (or attach msgbox.jpg so we could test the script ourselves).

You might try saving the image as a bitmap instead of a jpg as a workaround (in case there is a problem with transparency).


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
Wb-FreeKill

Oh, well why didn't you say so (or attach msgbox.jpg so we could test the script ourselves).

You might  try saving the image as a bitmap instead of a jpg as a workaround (in case there is a problem with transparency).

<{POST_SNAPBACK}>

that wont help either

Share this post


Link to post
Share on other sites
zcoacoaz

well we can't help you much if we don't have the image


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites
Wb-FreeKill

Okay ive added the picture in the first post!

Share this post


Link to post
Share on other sites
SlimShady

It works "normal" here. I don't see the purple in the message box image, here.

Share this post


Link to post
Share on other sites
zcoacoaz

its because you have the royale theme and that has a different background color than normal luna. i think that for some reason windows treats the default window color as transparent


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites
SlimShady

True, I just discovered.

I resaved the image without transparency in IrfanView, did not help.

I resaved the image in MS Paint, did also not work.

Share this post


Link to post
Share on other sites
Wb-FreeKill

True, I just discovered.

I resaved the image without transparency in IrfanView, did not help.

I resaved the image in MS Paint, did also not work.

<{POST_SNAPBACK}>

hmm, thats the problem... cuz i didn't have this proglem before i reinstalled windows, and had another theme ar that time..

Can this problem be solved? :)

Share this post


Link to post
Share on other sites
Kerberuz

hmm, thats the problem... cuz i didn't have this proglem before i reinstalled windows, and had another theme ar that time..

Can this problem be solved? :)

<{POST_SNAPBACK}>

Try this new graphic.

I modified the color a little. It would seem that the color being used is the same as the button face which is the color being used as the transparent color in your theme.

Is there a reason you are hard coding the graphic file location? I would advise using macros to make your code more portable.

Here is an example:

$Funnybtn = GUICtrlCreatePic(@ScriptDir & "\msgbox.jpg",0,0,0,0)

Edited by Kerberuz

Kerby

Share this post


Link to post
Share on other sites
Wb-FreeKill

Is there a reason you are hard coding the graphic file location?

This was only an example :D

The edidted picure actually works :) THX man!

So could you do the same thing with this one?

Would be Great!

Share this post


Link to post
Share on other sites
Kerberuz

This was only an example  :D

The edidted picure actually works :D  THX man!

So could you do the same thing with this one?

Would be Great!

<{POST_SNAPBACK}>

Yep, you can use almost any graphic editor to do the same.

This post made me a member not a newbie, sweet! I have graduated :)

Edited by Kerberuz

Kerby

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.