Sign in to follow this  
Followers 0
Qual-IT London

images

7 posts in this topic

having a little pallette trouble :o

the graphics i use have the same background colour as the grey used by AutoIT

i've tried exporting out of photoshop as gif and 16Mil col BMP but still they have this effect

i've used this command in the .au3 file

GuiCtrlCreatePic("1.bmp",575,2, 60,53,$WS_EX_TRANSPARENT)

Transparent GIFS or PNG files dont work either

Share this post


Link to post
Share on other sites



having a little pallette trouble :o

the graphics i use have the same background colour as the grey used by AutoIT

i've tried exporting out of photoshop as gif and 16Mil col BMP but still they have this effect

i've used this command in the .au3 file

GuiCtrlCreatePic("1.bmp",575,2, 60,53,$WS_EX_TRANSPARENT)

Transparent GIFS or PNG files dont work either

PS this only happens on laptops or with Windows Terminal Server, not on my desktop PC or my mates desktop PC

Share this post


Link to post
Share on other sites

You could set the GUI's background color to something different by using GuiSetBkColor.

Share this post


Link to post
Share on other sites

this is what you need

guicreatepioc()

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT).

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

this is what you need

guicreatepioc()

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT).

8)

sorry cant see how that works at all!

appears to do nothing

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Nick

If you take Screen3 (for example) and use below code... You need to make sure the backgrounds of the Gif files are transparent.

The Gifs are loaded into there own child Gui's

#include <GUIConstants.au3>
#include <GuiList.au3>
#include <GuiListView.au3>
#include <Process.au3>
#include<Array.au3>
#include<File.au3>
;#NoTrayIcon

dim $folders
Dim $InArray
Dim $aret

$v = "2.00"
$bitstop=0

$smtp = IniRead ( "~options.qbw", "Report", "smtp", "" )
$noziplog = IniRead ( "~options.qbw", "Report", "noziplog", "" )
$mto = IniRead ( "~options.qbw", "Report", "mto", "you@yourplace.com,another@yourplace.com" )
$msrv = IniRead ( "~options.qbw", "Report", "msrv", "mail.yourdomain.com" )
$muser = IniRead ( "~options.qbw", "Report", "muser", "you" )
$smtpu = IniRead ( "~options.qbw", "Report", "smtpu", "" )
$smtpp = IniRead ( "~options.qbw", "Report", "smtpp", "" )

$main = GUICreate("Q-Backup" & " version " & $v & " Setup and Installation Wizard",640,480)



TrayTip("Q-Backup Step 3/7", "Step 3: Q-Backup needs to tell you what it is doing and the best way for it to do this is via e-mail. Please enter your e-mail settings, you may need to speak to your administrator or refer to the paperwork that came with your e-Mail package.", 5, 1)

$filemenu = GuiCtrlCreateMenu ("File")
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("Help!")
$webitem = GuiCtrlCreateMenuitem ("Q-Backup Website",$helpmenu)
$guideitem = GuiCtrlCreateMenuitem ("Setup Guide",$helpmenu)
$aboutitem = GuiCtrlCreateMenuitem ("About Q-Backup",$helpmenu)


GuiCtrlCreateLabel("Setup Wizard", 5, 35)
GuiCtrlCreateLabel("Version " & $v & " © 2006 Qual-IT", 5, 50)
GuiCtrlCreateLabel("A full report will be sent to you via e-Mail when the backup has completed. When you have entered your", 5, 80)
GuiCtrlCreateLabel("e-Mail details below (you may need to contact your e-Mail provider for these) you can press the Test", 5,93 )
GuiCtrlCreateLabel("button and Q-Backup will send a test message to verify these settings are correct.", 5, 106)
GuiCtrlCreateLabel("IMPORTANT! Please do not skip this part and do not move on until you have received your test message!", 5, 132)


$reporton = GUICtrlCreateCheckBox ("e-Mail report when finished", 55, 170)
$sendastext = GUICtrlCreateCheckBox ("Send e-Mail as plain text (not recommended)", 55, 190)

GuiCtrlCreateLabel("Send the backup report to:", 55,230)
$mailto = GuiCtrlCreateInput($mto, 55, 245, 170, 20)

GuiCtrlCreateLabel("Use this mail server:", 55,270)
$mailsrv = GuiCtrlCreateInput($msrv, 55, 285, 170, 20)

GuiCtrlCreateLabel("Use this mailbox:", 55,310)
$mailuser = GuiCtrlCreateInput($muser, 55, 325, 170, 20)

$smtpauth = GUICtrlCreateCheckBox ("My SMTP server requires authentication", 350, 170)
GuiCtrlCreateLabel("Some e-Mail servers require you to provide", 350,205)
GuiCtrlCreateLabel("a username and password to authenticate you", 350,218)
GuiCtrlCreateLabel("before they will allow Q-Backup to send email.", 350,231)

GuiCtrlCreateLabel("Auth username:", 350,270)
$smtpuser = GuiCtrlCreateInput($smtpu, 350, 285, 170, 20)

GuiCtrlCreateLabel("Auth password:", 350,310,)
$smtppass = GuiCtrlCreateInput($smtpp, 350, 325, 170, 20,$ES_PASSWORD)

$testsmtpbutton = GuiCtrlCreateButton ("Send test message",350,375,120,20)

$helpbutton = GuiCtrlCreateButton ("Help!",414,435,70,20)
$quitbutton = GuiCtrlCreateButton ("Quit",489,435,70,20)
$nextbutton = GuiCtrlCreateButton ("Next >>",564,435,70,20)
$backbutton = GuiCtrlCreateButton ("<< Back",5,435,70,20)

GUictrlsetstate($mailto,$GUI_DISABLE)
GUictrlsetstate($mailsrv,$GUI_DISABLE)
GUictrlsetstate($mailuser,$GUI_DISABLE)
GUictrlsetstate($smtppass,$GUI_DISABLE)
GUictrlsetstate($smtpuser,$GUI_DISABLE)
GUictrlsetstate($smtpauth,$GUI_DISABLE)

if $noziplog = 1 Then GUictrlsetstate($sendastext,$GUI_CHECKED)

if $smtp = 1 Then 
    GUictrlsetstate($reporton,$GUI_CHECKED)
    GUICtrlSetState($smtpauth, $GUI_ENABLE)
    GUICtrlSetState($mailto, $GUI_ENABLE + $ES_NOHIDESEL)
    GUICtrlSetState($mailsrv, $GUI_ENABLE)
    GUICtrlSetState($mailuser, $GUI_ENABLE)
EndIf

if $smtpu <> "" Then
    GUICtrlSetState($smtpauth, $GUI_CHECKED)    
    GUICtrlSetState($smtpuser, $GUI_ENABLE)
    GUICtrlSetState($smtppass, $GUI_ENABLE)
EndIf

GuiSetState(@SW_Show)

;this is where the PIC are added as new Gui's for transparent backgrounds
$pic1 = GUICreate("", 145, 30, 5, 20,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$main)
GuiCtrlCreatePic("wizlog.gif",1,2, 145,30,"",$WS_EX_TRANSPARENT)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$pic2 = GUICreate("", 68, 58, 570, 20,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$main)
GuiCtrlCreatePic("3.gif",1,2, 60,53,"",$WS_EX_TRANSPARENT)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW,$pic1)
GUISetState(@SW_SHOW,$pic2)


While 1

$msg = GUIGetMsg()

;If $msg = BitOR($sendastext, $GUI_CHECKED) Then MsgBox(262208, "Q-Backup - IMPORTANT INFORMATION!", "You have specified that this machine has a non Microsoft e-Mail system installed. You must manually select the folder that contains this e-Mail system's data (the mailboxes). Additionally you may need to add STOP and START commands for your mail system prior to backup (to shutdown this system for the duration of the backup). This is done in section 5 (before and after) of this Wizard. For more information please see the Setup and Installation Guide. This guide can be viewed from the Help! menu.")

          Select

        Case $msg = $reporton
                If BitAND(GUICtrlRead($reporton), $GUI_CHECKED) = $GUI_CHECKED Then
                    GUICtrlSetState($mailto, $GUI_ENABLE)
                    GUICtrlSetState($mailsrv, $GUI_ENABLE)
                    GUICtrlSetState($mailuser, $GUI_ENABLE)
            Guictrlsetstate($sendastext,$GUI_ENABLE)
            Guictrlsetstate($sendastext,$GUI_UNCHECKED)
            Guictrlsetstate($smtpauth,$GUI_ENABLE)
            
            Else
            Guictrlsetstate($smtpauth,$GUI_UNCHECKED)
            Guictrlsetstate($smtpauth,$GUI_DISABLE)
                GUICtrlSetState($reporton, $GUI_ENABLE)
                    GUictrlsetstate($mailto,$GUI_DISABLE)
            GUictrlsetstate($mailsrv,$GUI_DISABLE)
            GUictrlsetstate($mailuser,$GUI_DISABLE)
            Guictrlsetstate($sendastext,$GUI_UNCHECKED)
            Guictrlsetstate($sendastext,$GUI_DISABLE)
                    GUictrlsetstate($smtpuser,$GUI_DISABLE)
            GUictrlsetstate($smtppass,$GUI_DISABLE)
        EndIf

        Case $msg = $smtpauth
                If BitAND(GUICtrlRead($smtpauth), $GUI_CHECKED) = $GUI_CHECKED Then
                    GUICtrlSetState($smtpuser, $GUI_ENABLE)
                    GUICtrlSetState($smtppass, $GUI_ENABLE)
            Else
                    GUICtrlSetState($smtpauth, $GUI_ENABLE)
                    GUictrlsetstate($smtpuser,$GUI_DISABLE)
            GUictrlsetstate($smtppass,$GUI_DISABLE)
        EndIf

        Case $msg = $sendastext
              If BitAND(GUICtrlRead($sendastext), $GUI_CHECKED) = $GUI_CHECKED Then
            GUICtrlSetState($mailto, $GUI_ENABLE)
                    GUICtrlSetState($mailsrv, $GUI_ENABLE)
                    GUICtrlSetState($mailuser, $GUI_ENABLE)
                    GUICtrlSetState($reporton, $GUI_CHECKED)
                
        Else
;GUICtrlSetState($mailto, $GUI_DISABLE)
        ;GUICtrlSetState($mailsrv, $GUI_DISABLE)
        ;GUICtrlSetState($mailuser, $GUI_DISABLE)
        ;GUICtrlSetState($reporton, $GUI_UNCHECKED)
        EndIf
                    
        Case $msg = $GUI_EVENT_CLOSE
            $answer = MsgBox(262148, "Q-Backup", "You are about to quit without saving your changes. Press Next to complete the next step. Q-Backup will not operate correctly until you complete this Wizard. Are you sure?")
        If $answer = 6 Then
        exit
        EndIf

        Case $msg = $testsmtpbutton
        $result=FileExists("testsmtp.exe")
        for $i = 1 to 1
        if $result = 0 then
            msgbox (262160,"Q-Backup", "Q-Backup cannot send a test message because the installation is damaged. A required file TESTSMTP.EXE was not found. Please re-install Q-Backup.")
            exitloop
        EndIf
            MsgBox(262208, "Q-Backup", "Q-Backup will now attempt to send you a test e-Mail. A text report of the attempt will be displayed on the screen. If you do not receive the e-Mail Q-Backup has sent within a reasonable time please check your details again.")
        Run ("testsmtp.exe")
        Next 
    
        Case $msg = $quitbutton
            $answer = MsgBox(262148, "Q-Backup", "You are about to quit without saving your changes. Press Next to complete the next step. Q-Backup will not operate correctly until you complete this Wizard. Are you sure?")
        If $answer = 6 Then
        exit
        EndIf

        Case $msg = $helpbutton
              MsgBox(262208, "Q-Backup", "I fucking need help not you")

        Case $msg = $nextbutton

        If BitAND(GUICtrlRead($reporton), $GUI_UNCHECKED) = $GUI_UNCHECKED Then IniDelete("~options.qbw","Report","smtp")
        If BitAND(GUICtrlRead($sendastext), $GUI_UNCHECKED) = $GUI_UNCHECKED Then IniDelete("~options.qbw","Report","noziplog")

        If BitAND(GUICtrlRead($reporton), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("~options.qbw", "Report", "smtp", "1")
        If BitAND(GUICtrlRead($sendastext), $GUI_CHECKED) = $GUI_CHECKED Then IniWrite("~options.qbw", "Report", "noziplog", "1")
        $mto = GUICtrlRead ( $mailto )
        $muser = GUICtrlRead ( $mailuser )
        $msrv = GUICtrlRead ( $mailsrv )
        $smtpu = GUICtrlRead ( $smtpuser )
        $smtpp = GUICtrlRead ( $smtppass )
        
        IniWrite("~options.qbw", "Report", "mto", $mto)
        IniWrite("~options.qbw", "Report", "muser", $muser)
        IniWrite("~options.qbw", "Report", "msrv", $msrv)

        If BitAND(GUICtrlRead($smtpauth), $GUI_UNCHECKED) = $GUI_UNCHECKED Then 
        IniDelete("~options.qbw", "Report", "smtpu")
        Else
        INIWrite ("~options.qbw", "Report", "smtpu", $smtpu)
        EndIf
    
        If BitAND(GUICtrlRead($smtpauth), $GUI_UNCHECKED) = $GUI_UNCHECKED Then 
        IniDelete("~options.qbw", "Report", "smtpp")
        Else
        INIWrite ("~options.qbw", "Report", "smtpp", $smtpp)
        EndIf
                
        Case $msg = $aboutitem
            Msgbox(262208,"About Q-Backup " & "version " & $v,"Q-Backup Setup and Installation Wizard version " & $v & "." & @CR & "© 2006 Qual-IT. www.qualit-uk.com/backup" & @CR & "Code & Design by Qual-IT London." & @CR & @CR & "Use of this system is governed by our End User License Agreement." & @CR & "www.qualit-uk.com/backup/eula" & @CR & @CR & "Please read the accompanying Setup and Installation Guide before you use this Wizard.")

        Case $msg = $guideitem
            Msgbox(262208,"Guide", "This will display the full setup guide.")

        Case $msg = $webitem
            _RunDos("start /max http://www.qualit-uk.com/backup")
            
        
        Case $msg = $exititem
            ExitLoop

        Endselect
WEnd

GUIDelete()

Exit
Edited by ChrisL

Share this post


Link to post
Share on other sites

I don't know how related this is but I had a similar palette problem with Bitmaps. I found out that this was due to the bitmaps being 32-bit, when I opened them in paint and saved them as 24-bit they worked perfectly.

I know nothing about images so I don't know if this helps your problem, but it worked for me!

The code I use for the pic is without any style (could be a reflection of my programming):

$numb = GUICtrlCreatePic($image, 2, 2, 0, 0)

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  
Followers 0