Well, you can cover control by shapes to prevent events. But try to set focus to that control. You will see - sometimes control draws self over shape. This because Shape control is not really Windows window with its own HWND, so Windows does not make automatic cut off of parts that under the shape when control draws self in certain cases. Just try it, from my experiense shapes are not reliable here.
>> No, shapes cannot provide good covering of other controls. Only putting control into container does this well. This does not work, however, for some ActiveX controls, for example, TeeChart control will always be shown completely despite any effors to cut off it (it also shown always despite page in pageframe with such object is inactive).
>>
>
>What problems are you referring to?
>If you run this sample you can see that there are no any problems with the listbox covered with a shape.
>ActiveX controls is another story, they are always on top as they are separate windows.
>
>**************************************************
>DEFINE CLASS form1 AS form
>
>
> DoCreate = .T.
> Caption = "Form1"
> Name = "Form1"
>
>
> ADD OBJECT list1 AS listbox WITH ;
> RowSourceType = 1, ;
> RowSource = "one,two,three,four,five", ;
> Height = 181, ;
> Left = 96, ;
> Top = 48, ;
> Width = 157, ;
> Name = "List1"
>
>
> ADD OBJECT shape1 AS shape WITH ;
> Top = 36, ;
> Left = 235, ;
> Height = 205, ;
> Width = 37, ;
> BorderStyle = 0, ;
> Name = "Shape1"
>
>
>ENDDEFINE
>*
>*-- EndDefine: form1
>**************************************************
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.