Sign in to follow this  
Followers 0
Cloudsx

GUICtrlCreateIcon and/or GUICtrlCreatePic

6 posts in this topic

#1 ·  Posted (edited)

i want to place some pcitures or icon in the guicreat but i cant see the pic or icon how is that posible

#include <GUIConstants.au3>

GUICreate("game",350,400); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW); will display an empty dialog 

GUICtrlCreateIcon("Cash.jpg",-1,200,150,20,20)
GUICtrlCreateIcon("iron.jpg",-1,250,150,20,20)
GUICtrlCreateIcon("ederuim.jpg",-1,300,150,20,20)
GUICtrlCreateIcon("electricity.jpg",-1,330,150,20,20)


$label = GUICtrlCreateLabel("onder constructie",50,50)

Opt("GUICoordMode",4)
$gebouwen = GUICtrlCreateButton("gebouwen",290,100,60)
$militair = GUICtrlCreateButton("militair",290,125,60)
$voertuigen = GUICtrlCreateButton("voertuigen",290,150,60)
$onderzoek = GUICtrlCreateButton("onderzoek",290,175,60)
$verdediging = GUICtrlCreateButton("verdediging",290,200,61)
$overzicht = GUICtrlCreateButton("overzicht",290,225,60)

GUISetState ();this wil create a button

Dim $2, $3, $4, $5, $6, $7

While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then
If WinActive("game") then Exit
If WinActive("gebouwen") then GUIDelete( $2)
If WinActive("militair") then GUIDelete( $3)
if WinActive("voertuigen") then GUIDelete( $4)
If WinActive("onderzoek") then GUIDelete( $5)
If WinActive("verdediging") then GUIDelete( $6)
If WinActive("overzicht") then GUIDelete($7)
EndIf
if $msg = $gebouwen Then GUI2Create()
If $msg = $militair then Gui3create()
if $msg = $voertuigen then Gui4create()
If $msg = $onderzoek then Gui5create()
If $msg = $verdediging then gui6create()
If $msg = $overzicht then Gui7create()

Wend

Func GUI2Create()
If WinExists("gebouwen") then Return
    GUICtrlSetData($label, "Like this")
$2 = GUICreate("gebouwen",350,350)
GUISetState (@SW_SHOW)
EndFunc

Func Gui3create()
If WinExists("militair") then Return
$3 = GUICreate("militair",350,350)
GUISetState (@SW_SHOW)
EndFunc

Func Gui4create()
If WinExists("voertuigen") then Return
$4 = GUICreate("voertuigen",350,350)
GUISetState (@SW_SHOW)
EndFunc

Func gui5create()
If WinExists("onderzoek") then Return
$5 = GUICreate("onderzoek",350,350)
GUISetState (@SW_SHOW)
EndFunc

Func gui6create()
If WinExists("verdediging") then Return
$6 = GUICreate("verdediging",350,350)
GUISetState (@SW_SHOW)
EndFunc

Func gui7create()
If WinExists("overzicht") then Return
$7 = GUICreate("overzicht",350,350)
GUISetState (@SW_SHOW)
EndFunc

this better

Edited by Cloudsx

Share this post


Link to post
Share on other sites



i want to place some pcitures or icon in the guicreat but i cant see the pic or icon how is that posible

Hard to help with out some code to look at


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

i am sorry never think about you all get grazy from me i am very sorry

no worry i wil find out about how it must be

sorry for you time wasting

Share this post


Link to post
Share on other sites

i am sorry never think about you all get grazy from me i am very sorry

no worry i wil find out about how it must be

sorry for you time wasting

Not wasting our time, just hard to help sometimes if there is no code

try using GuiCtrlCreatePic, don't think GUICtrlCreateIcon can show jpgs


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

oke but its al over i did somehing wrong and now i have other problem with iniread so i am tryng to make screen shot off it and to show but dont know how :o i will try

Edited by Cloudsx

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