[VB/C#] Overrides with form loading

Joined
Sep 25, 2009
Messages
1
Reaction score
0
Well I am basically trying to create a function that overrides form load. In the function it just adds skinning support (so color change). I can sort of get it to override the load on the form where with the code located, but the problem is i also want it to work with the next form created without having to copy the code in there.

It doesn't matter which language the code is in, i haven't even decided which one for the final program.

some random vb test;
PHP:
Public Class Form1

    Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
        MyBase.BackColor = Color.Blue //Testing color change 
        MyBase.OnLoad(e)
    End Sub

End Class

Ive tried tons of different things but that is the only one that showed some results. I cant copy that into every form tho, i just need it to work thought my whole program.

About my main program;
Its basically a Skinning program that I can add to any of my projects and it will add skinning support. I would like it if I didnt have to paste all that code into every form i wanted it to load.
 
Back