Solved

VBb.Net   Handle Form Events in a Partial Class

Posted on 2011-02-15
4
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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