Sign in to follow this  
Followers 0
eHrgo

Replace GuiCtrlCreateGraphic (because background picture)

10 posts in this topic

Hi, I've seen many post like :

http://www.autoitscript.com/forum/index.ph...ost&p=97355

http://www.autoitscript.com/forum/index.ph...rlCreateGraphic

Which explains :

"It is not possible to create a graphic control over a picture control"

So.. How can I replace that? I want to put a simple form Widht=40 height=10 and specify its color over by GuiCtrlCreateGraphic (with transparency/setted as background)..

How?

Thanks


Sorry for my Bad English.

Share this post


Link to post
Share on other sites



Hi, I've seen many post like :

http://www.autoitscript.com/forum/index.ph...ost&p=97355

http://www.autoitscript.com/forum/index.ph...rlCreateGraphic

Which explains :

"It is not possible to create a graphic control over a picture control"

So.. How can I replace that? I want to put a simple form Widht=40 height=10 and specify its color over by GuiCtrlCreateGraphic (with transparency/setted as background)..

How?

Thanks

It isn't correct.

A graphic can be placed over a picture, but I don't know about the transparency.

With the picture try setting the styles to BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)

and then the graphic will show.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

GUICreate("", 50, 50, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic(@ScriptDir&'/background.gif', 0,0,0,0,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)

GUICtrlCreateGraphic(20,20)
GUICtrlSetBkColor (-1, 0x00ff1e )

While 1
    GUISetState(@SW_SHOW)
    Sleep(10)
Wend

It doesn't seems to work...

Thanks


Sorry for my Bad English.

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

FileInstall ("@ScriptDir&'/background.gif")
$pic = "background.gif"
GUICreate("", 50, 50, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic("$pic", 0,0,0,0,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlCreateGraphic(20,20)
GUICtrlSetBkColor (-1, 0x00ff1e )

While 1
    GUISetState(@SW_SHOW)
    Sleep(10)
Wend

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

FileInstall ("@ScriptDir&'/background.gif")
$pic = "background.gif"
GUICreate("", 50, 50, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic("$pic", 0,0,0,0,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlCreateGraphic(20,20)
GUICtrlSetBkColor (-1, 0x00ff1e )

While 1
    GUISetState(@SW_SHOW)
    Sleep(10)
Wend

Use koda and make the gui with pic in that...

thats what i use...

Share this post


Link to post
Share on other sites

Hum....... SxGuy, your script is full of error and doesn't seems to be different as mine, except the file install which seems to be pretty useless here..

Ashley, what do you mean by "koda"?


Sorry for my Bad English.

Share this post


Link to post
Share on other sites

Hum....... SxGuy, your script is full of error and doesn't seems to be different as mine, except the file install which seems to be pretty useless here..

Ashley, what do you mean by "koda"?

Koda is a GUI form designer that comes with SciTE. Hit Alt-m in SciTE to run it.

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

PSalty, Koda might be a nice tool, but that does not address the Topic.

After some research i have found that the TOPIC of drawing a graphic over a picture is not possible in autoit with a transparent background.

Share this post


Link to post
Share on other sites

LeCarre,

So you ressurrect a 5 year old thread just to tell us? Please do not necro-post like this again. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

After some research i have found that the TOPIC of drawing a graphic over a picture is not possible in autoit with a transparent background.

Just use direct GDI drawing instead of native Graphic control. Then you don't have such limitation.

There are many examples on this forum, search for LineTo or MoveTo for example ...

EDIT:

Here is my old Radar project

There is drawn red Cros over image, see Func MalujKriz() there

Edited by Zedna

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