Solved

VBb.Net   Handle Form Events in a Partial Class

Posted on 2011-02-15
4
252 Views
Last Modified: 2012-06-25
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
Comment
Question by:MRS
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 34903196
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34906168
Another idea would be to compile those forms into a DLL and then inherit from those forms.
0
 

Author Comment

by:MRS
ID: 34907228
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
 

Author Closing Comment

by:MRS
ID: 38121550
sorry for the delay on the points.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question