# Re: 按钮...

Posted by wei on November 19, 1998 at 17:34:10:

In Reply to: 按钮... posted by wingue on November 18, 1998 at 19:38:12:

: 想必大家都用过IE4.0或OFFICES97吧!
: 但大家有没有想过在工具列上的按钮
: 程式码是怎么写出来的呢??
: 按钮的特色是:
: 当滑鼠的游标移到上面时,按扭会浮起
: 来,按下去时会有凹陷下去...(当然,
: 按下去时能够触发事件...)
: 请热心人士告诉小弟,
: 感激不尽....

My solution: when mouse moveover an object (e.g,
Label, PictureBox, ...), draw a rectanglar with 3-D
effects, with the same size(little bigger) and position
as the obj.
You need to use MouseMove, up, down events to detect when to draw,
when undraw, and border color, and so on.
To draw a 3-D rectanglar is easy if you know how
ro draw a line.
I don't know if there is any better method to do such things.
I used above method in my code, which seems to work the same way.

Follow Ups: