Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have nearly 100 forms in my projects and now i want to write some thing in my form paint event..

I have already called a FormSettings class in every forms Load event and now i want to add a function in my formSettings class which will modify the paint function of every form...

Like...

I cant go and change the coding for all 100 forms instead i will write function for paint event in FormSettings which has already been called in form load events...

What i want to do is to make my form round cornered...

VB
Public Class FormSettings
Sub New(ByRef Form As Form)
Form.Paint += Deligate to call form paint event...........
End Sub
End Class
Posted

1 solution

Use AddHandler
VB
AddHandler Form.Paint, AddressOf Form_Paint


http://msdn.microsoft.com/en-us/library/7taxzxka(v=vs.80).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900