Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing a form, after it has been scrolled

Status
Not open for further replies.

mondi

Programmer
Sep 10, 2003
169
AL
Hello everybody!
In a base class that inherits from the Windows.Forms.Form, I have set the property AutoScroll to true. But, when the form is scrolled (or during the process of scrolling), I need to refresh the form, because it has to paint itself again. But I didn't find any event handlers so to get the moment when the grid was scrolled. In a dataGrid for instance you have the GridHScrolled or GridVScrolled that listen for the scroll events, but in the form, I didn't find something useful for my problem. Can anyone give me a hand on this?
Thanks for any answers

Country of eagles
 
You could add a vScrollBar and/or an hScrollBar control to the form (docked accordingly) and redraw the form based on the scrollbar(s) position(s)


Hope this helps.

[vampire][bat]
 
Yes I am performing my own paint event, I am changing the color of the Form to be 3 dimensional (something like office 2003 style). But when scrolling the form, I have some problem with a label that appears in the top of the form which is supposed to be a status label, which is also 3 dimensional. As about adding two scroll controls, I thought about it, but I am afraid, it will have a lot of work to do it, and I am also afraid it will affect in the performance of the form.
Greetings!

Country of eagles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top