Solved

VBb.Net   Handle Form Events in a Partial Class

Posted on 2011-02-15
4
246 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now