Opening desig window for a form in Visual Basic 2005 Express Edition

R

research

Hi,

I'm using Visual Basic 2005 Express Edition to develop small tools in
relation with our applications and I'm facing a problem using the
interface.

It sometimes happens that the design window of a form can no more be
viewed within the user interface.

Does anyone have an idea on how I can do to access it ?
 
R

rowe_newsgroups

Hi,

I'm using Visual Basic 2005 Express Edition to develop small tools in
relation with our applications and I'm facing a problem using the
interface.

It sometimes happens that the design window of a form can no more be
viewed within the user interface.

Does anyone have an idea on how I can do to access it ?

Is it giving an error message? Often if there is bad code that
prevents the rendering of the form, it will not open (as it can't draw
itself) until the error is fixed. IIRC when this happens it show a
white screen with a list of errors.

Thanks,

Seth Rowe
 
R

research

Is it giving an error message? Often if there is bad code that
prevents the rendering of the form, it will not open (as it can't draw
itself) until the error is fixed. IIRC when this happens it show a
white screen with a list of errors.

Thanks,

Seth Rowe

The build of the application gives no error. Starting the application
well shows the form !!
Normally, when in the "code" part of a form, the right click context
sensitive menu shows as first entry "View Designer"; and sometimes it
does no more and I feel like I have "lost the design" ?!?!

Thanks already for the very quick reply !!
Lio
 
J

Jack Jackson

Hi,

I'm using Visual Basic 2005 Express Edition to develop small tools in
relation with our applications and I'm facing a problem using the
interface.

It sometimes happens that the design window of a form can no more be
viewed within the user interface.

Does anyone have an idea on how I can do to access it ?

If the design window shows errors, I have found the following will
usually fix it. Not all steps are needed every time.

Close the design window.
Rebuild the project.
Close Visual Studio.
Open Visual Studio.
Open the project and the design window.

It appears to me that sometimes when a breaking change is made to a
class and a design window affected by that change is open, Visual
Studio remembers something about the class that it shouldn't and will
continue to show errors in the design window until the window is
closed and/or Visual Studio is closed.
 
R

research

If the design window shows errors, I have found the following will
usually fix it. Not all steps are needed every time.

Close the design window.
Rebuild the project.
Close Visual Studio.
Open Visual Studio.
Open the project and the design window.

It appears to me that sometimes when a breaking change is made to a
class and a design window affected by that change is open, Visual
Studio remembers something about the class that it shouldn't and will
continue to show errors in the design window until the window is
closed and/or Visual Studio is closed.

The project doesn't contain any error, nor warnings. In order to be
sure, I've tried your different steps but without success :-(

Thanks anyway for the tip,
Lio
 
R

rowe_newsgroups

Euh, yes, it's possible .... How should I do ?

Just post the code that will reproduce the problem. Or, if it's more
than just code, provide a step-by-step "how to" on what we need to do
to recreate the error.

Thanks,

Seth Rowe
 
J

Jack Jackson

The project doesn't contain any error, nor warnings. In order to be
sure, I've tried your different steps but without success :-(

Thanks anyway for the tip,
Lio

Then what is the problem? Is the Design window empty, or does nothing
happen when you open it?
 
R

research

Then what is the problem? Is the Design window empty, or does nothing
happen when you open it?

The Design feature is no more present in the "view menu" nor in the
context sensitive menu.
 
P

Phill W.

The Design feature is no more present in the "view menu" nor in the
context sensitive menu.

The IDE doesn't think your class /can/ be "designed".

(a) Make sure the class' inheritance is correct:

Class X
Inherits System.Windows.Forms.Form

(b) Failing that, the IDE will /only/ let you design the /first/ Class
declared in any source file so you can't design the Form below:

Class NotAForm
End Class

Class Form2
Inherits System.Windows.Forms.Form
End Class

HTH,
Phill W.
 
R

research

The IDE doesn't think your class /can/ be "designed".

(a) Make sure the class' inheritance is correct:

Class X
Inherits System.Windows.Forms.Form

(b) Failing that, the IDE will /only/ let you design the /first/ Class
declared in any source file so you can't design the Form below:

Class NotAForm
End Class

Class Form2
Inherits System.Windows.Forms.Form
End Class

HTH,
Phill W.

It looks what you explained is the right track.
But I don't really understand the point (b) .... If allow inheritance
on another class, the design is available. How can I choose on which
class I want to use the design ? May I not use the design on any
Form ?
 
P

Phill W.

But I don't really understand the point (b) .... If allow inheritance
on another class, the design is available. How can I choose on which
class I want to use the design ? May I not use the design on any
Form ?

It's not the Inheritance getting in the way, it's just that the Forms
Designer only looks as far through the physical source file as the first
Class statement. If that [first] class, whatever it is, isn't
"designable" then it gives up and tells you that you can't design
anything in that source file; the icon in the Solution Explorer changes
and the context [and other] menu no long show the "View Designer"
option.

Put the non-form Class below the Form one and - "magically" - everything
starts working again.

HTH,
Phill W.
 

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