Re: Drawing in UserControls
Hi
This is not easy. Windows sends a message to each control whenever it need's repainting (ie. whenever you've painted on top of one of the controls/moved a form in front of them/whatever).
What exactly are you trying to draw ? There may be an easier solution for you.
Regards
Chris Eastwood
Software Engineer
ACNielsen Ltd
CodeGuru - the website for developers
http://www.codeguru.com/vb
Re: Drawing in UserControls
Thanks for your response Chris,
What I have is like a DTP layout page type affair with various types of elements in it. I want to allow the user to select these with a standard selection marquee ie. mousedown, drag, mouseup and then any elements within that marquee are selected. To do this I need to draw the marquee while it is being dragged.
Rupert
Re: Drawing in UserControls
Hi
I can't be of much use I'm afraid. I know of some samples in the VB Knowledge Base (article Q 71488 and Q71489 - look them up at http://msdn.microsoft.com ) which demonstrate how to draw the Rubber-Band selection boxes, but if my memory serves me correctly, it won't draw on-top of the controls.
I may have some code to help you with the moving of the contained items though.
Hope it helps
Regards
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb