Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

VBb.Net Handle Form Events in a Partial Class

Hey,

I am trying to create a template for other developers to use as a base for future application.   The template is basically a program with a lot of the UI work already done.  I was hoping to separate that “common” code out to a different file using a PARTIAL CLASS so the developers wouldn't have to deal with it unless they wanted too.  

I am running into an issue because a lot of the “common” code is handles base form and control events for the form.   All of the control events fire fine, but the form events aren’t being caught in the partial class.  Is that expected?
0
MRS
Asked:
MRS
  • 2
1 Solution
 
Bob LearnedCommented:
I don't quite see what you are talking about...do you have a little bit of code to highlight what you mean?  Partial classes are compiled as one unit, so the event should be working...
0
 
CodeCruiserCommented:
Another idea would be to compile those forms into a DLL and then inherit from those forms.
0
 
MRSAuthor Commented:
Not sure what I was doing wrong yesterday, but today when i came in and gave it all another try the me.load was handled properly.  

Thanks you Code & Learned for your input.  I am going to give credit to Learned just because his statement about Partial classes being compiled into one unit forced me to follow it through one time because it should have worked as expected.
0
 
MRSAuthor Commented:
sorry for the delay on the points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now