Forelayer not working(?)

Cableguy

Expert
Licensed User
Hi,

I was under the impron that forelayer alowed us to raw OVER any control on the form....
But it just won't....
Is this a bug???
 

Cableguy

Expert
Licensed User
Dound this bit of info on the web...

2. Remove the WS_CLIPCHILDREN style from the form so that the form is
allowed to draw over the controls on it. This can be done as follows:

const int WS_CLIPCHILDREN = 0x02000000;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Style &= ~WS_CLIPCHILDREN;
return cp;
}
}
is this doable width b4p?will it work on both the desktop and device?
 

Cableguy

Expert
Licensed User
Found a simpler way to be able to draw on top of an image...
I just added a Main.DrawImage(Clock.Image,Clock.Left,Clcok.Top,Clock.Width,Clock.Heigth)
line and made the image control Clock.Visible=False...
This way i have the exact same image in the exact same position as before, but merged to the background....
For my label, I'll use the DrawString instead....

A nice learning experience for me, anyway..

@EREL, sorry for the trouble, would you so kind to move this thread to the questions one?
 
Top