Solved

VBb.Net   Handle Form Events in a Partial Class

Posted on 2011-02-15
4
237 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
Comment Utility
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
Comment Utility
Another idea would be to compile those forms into a DLL and then inherit from those forms.
0
 

Author Comment

by:MRS
Comment Utility
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
Comment Utility
sorry for the delay on the points.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

13 Experts available now in Live!

Get 1:1 Help Now