Inheritance issue?

J

Jeff

Newbie question I'm sure. I have a compact framework app and have created a
form base class with some common functions and controls that all forms in
the app will inherit. The login form calls a user validation routine and on
successful validate I want to display the main menu form and close the login
form. Seems simple enough...unfortunately if I use Me.Close it kills the
app. I cannot simply hide the login form as I have a base class event to
manage a scanner, and any scanner trigger pulls will fire the code on the
login form. I want to control the scanner on each form. How can I get the
activeform and close only that? Is this an inheritance issue? Thanks for any
help.
 
T

tamberg

Maybe you can change your design. Managing multiple forms using Hide /
Show (instead of close )schould work. The Scanner might work better if
it get's it's own class rather than being integrated in the form's base
class. A scanner "Singleton" instance can then be shared between those
forms who really need it. A good design rule is "separation of
concerns" which leads to classes focused on a single task rather than
multiple different tasks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top