I think that if I use image it would be best:
I need that my control could be out of window as datetimepicker calendar. I am using panelKalendar = new PanelDoubleBuffer();
then in method: void panelKalendar_Paint(object sender, PaintEventArgs e)
I paint everything. But it´s painting to window and belov all other controls. How can I get "effect" that is use in DateTimePicker?
The drop-down list of a combo box (and also possibly the drop-down panel of a calendar control) is a child window of the desktop. That's what you also have to do: nest your control inside a borderless form, and give that form a null parent, so that it is a top-level window, not a child of your application window.
Since your form will be a top-level window, its location will need to be specified in screen coordinates, not in coordinates local to your form. You can get those coordinates using the
PointToScreen
method.I'm afraid you can't achieve what you want with the child control of your
form
(that is what you're doing actually), cause it will be truncated by the parent (form
) bounds.Imo, you can try to use a seprate
WidnowdForm
control, that appears exactly in the place where thepanel
appears now.Hope this helps.