Using a base window for all my windows.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

I have a base window I want to use to base all of my windows on (this has
some timer functionality I need.) So I created the window winWindowBase and
put the code in it. When I change the parent window to inherit from
winWindowBase I get an error message in the designer saying something to the
effect 'Could not be shown for this file because none of the classes within
it can be designed. The base class winWindowBase could not be loaded.

What am I doing wrong and how do I fix it?

TIA - Jeff.
 
UJ said:
I have a base window I want to use to base all of my windows on (this has
some timer functionality I need.) So I created the window winWindowBase and
put the code in it. When I change the parent window to inherit from
winWindowBase I get an error message in the designer saying something to the
effect 'Could not be shown for this file because none of the classes within
it can be designed. The base class winWindowBase could not be loaded.

What am I doing wrong and how do I fix it?

TIA - Jeff.

I've done this and it works fine. Can you show some code? Every time
you make a change to the base class you have to recompile before the
inherited form can be shown. Do you do anything in the Paint event or
overriding the onpaint method?

Chris
 
Here's the declaration of the class for the main window:

Public Class winMainScreen
'Inherits System.Windows.Forms.Form
Inherits winWindowBase

Well damn - I just tried changing the order and it worked fine. Apparently
it was that line that was commented out that it didn't like.

Thanks anyway.

Jeff.
 

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

Back
Top