Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: zorder ?

104| Mon, 03 Dec 2007 05:38:00 GMT| kevin_sauerwald| Comments (5)
I have a ton of command buttons and I want to put little shape
controls on top of some of them to indicate something, kinda flag them. I only want to shape at the top so you can see its flagged but still be able to click on it... problem is when I have the runtime code move the shape into place it does not show up.. I use the zorder 0 but to no avail... is Zorder jsut for forms ? how can I make the shape overlay the command button ?

help help..

or if you know a better way to flag a command button graphically, I guess I could go with the graphic command button but I would like to avoid that... anyway to change the font color.. ?

Keywords & Tags: zorder, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/560830/
 
«« Prev - Next »» 5 helpful answers below.
ZOrder is not only for forms but any control within the form that has a handle (hWnd property). All windowless controls (shapes, labels, etc) cannot overlay controls that have hWnd (they are actual windows).

rhinobull | Mon, 03 Dec 2007 19:11:00 GMT |

why

nareth | Mon, 03 Dec 2007 19:12:00 GMT |

nareth, its just the way windows works.

In response to the changing command button forecolor question:

http://www.vbforums.com/search.php?s=&action=showresults&searchid=1009230&sortby=lastpost&sortorder=

I've posted a solution once, and there are alot more here.

Phreak

chemicalnova | Mon, 03 Dec 2007 19:13:00 GMT |

Controls like the label, line, or shapes controls are lightweight
controls that are drawn on the background layer of the form only.
Other heavy controls like the command button are drawn on the
top layer. So no matter what the zorder is set to for a label or
shape control, it will never be drawn "on top" of a command
button.

HTH

robdog888 | Mon, 03 Dec 2007 19:14:00 GMT |

thanks for all the info everybody..

question closed...

I ended up changin all my command buttons to checkboxes.. then
I dont need an overlay since I can change the backcolor now..

kevin_sauerwald | Mon, 03 Dec 2007 19:15:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories