By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,327 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,327 IT Pros & Developers. It's quick & easy.

VB Controls In VB2005

P: n/a
bz
the vb.upgrade group is dead. I think I will post this here instead.

Hi,

I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express
Edition.
I got 140 errors and 170 warnings.

One of the error was that it wouldn't load a VB6 control.

(In VB6, if it can't load a control, VB6 will replace it with a PictureBox.)

But VB2005 didn't do that. It wouldn't even let me display the form at all
for me to delete that control.

Any idea how to display the design view to replace that control?

Thanks!


--
There is no answer.
There has not been an answer.
There will not be an answer.
That IS the answer!
And I am screwed.
Deadline was due yesterday.

There is no point to life.
THAT IS THE POINT.
And we are screwed.
We will run out of oil soon.
http://spaces.msn.com/bzDaCat
Nov 9 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
You could find the InitializeComponent sub for the form (the one marked
"do not edit this with the code editor") and delete all references to
that control. Then when design view refreshes the control should be
gone.

Thanks,

Seth Rowe
bz wrote:
the vb.upgrade group is dead. I think I will post this here instead.

Hi,

I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express
Edition.
I got 140 errors and 170 warnings.

One of the error was that it wouldn't load a VB6 control.

(In VB6, if it can't load a control, VB6 will replace it with a PictureBox.)

But VB2005 didn't do that. It wouldn't even let me display the form at all
for me to delete that control.

Any idea how to display the design view to replace that control?

Thanks!


--
There is no answer.
There has not been an answer.
There will not be an answer.
That IS the answer!
And I am screwed.
Deadline was due yesterday.

There is no point to life.
THAT IS THE POINT.
And we are screwed.
We will run out of oil soon.

http://spaces.msn.com/bzDaCat
Nov 9 '06 #2

P: n/a
I had a similar problem with a third party control that wouldn't convert
over. The Upgrade Wizard semi-converted the code to the point where the designer
wouldn't load. My solution (assuming the form was named "Form1") was to open
the Form1.Designer.vb file, and hand-edit the code to remove the control
in question. Then I was able to open the designer and add in the substitute
control visually.

To view the designer file, click on the "Show All Files" toolbar button that
appears at the top of the Solution Explorer panel. Then expand the "plus
sign" next to the form you are having trouble with. You should see the Designer
and the RESX files for that form. Double-click on the Designer file to edit
it; it's just a normal VB class file. Locate any lines that have to do with
your control and delete those lines (although you may want to take notes
on the property values before you delete them all).

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
the vb.upgrade group is dead. I think I will post this here instead.

Hi,

I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express
Edition.
I got 140 errors and 170 warnings.
One of the error was that it wouldn't load a VB6 control.

(In VB6, if it can't load a control, VB6 will replace it with a
PictureBox.)

But VB2005 didn't do that. It wouldn't even let me display the form
at all for me to delete that control.

Any idea how to display the design view to replace that control?

Thanks!

http://spaces.msn.com/bzDaCat

Nov 9 '06 #3

P: n/a
bz
Thanks!!!

Oh crap! That control is a container... now all my buttons are gone!!
aaaahahaha! huhhhooo... <G>
"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
>I had a similar problem with a third party control that wouldn't convert
over. The Upgrade Wizard semi-converted the code to the point where the
designer wouldn't load. My solution (assuming the form was named "Form1")
was to open the Form1.Designer.vb file, and hand-edit the code to remove
the control in question. Then I was able to open the designer and add in
the substitute control visually.

To view the designer file, click on the "Show All Files" toolbar button
that appears at the top of the Solution Explorer panel. Then expand the
"plus sign" next to the form you are having trouble with. You should see
the Designer and the RESX files for that form. Double-click on the
Designer file to edit it; it's just a normal VB class file. Locate any
lines that have to do with your control and delete those lines (although
you may want to take notes on the property values before you delete them
all).

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>the vb.upgrade group is dead. I think I will post this here instead.

Hi,

I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express
Edition.
I got 140 errors and 170 warnings.
One of the error was that it wouldn't load a VB6 control.

(In VB6, if it can't load a control, VB6 will replace it with a
PictureBox.)

But VB2005 didn't do that. It wouldn't even let me display the form
at all for me to delete that control.

Any idea how to display the design view to replace that control?

Thanks!

http://spaces.msn.com/bzDaCat


Nov 9 '06 #4

P: n/a
bz
Thanks!

I changed the codes but it still didn't want to load. I clicked "refresh"
but nothing happened.

So, I saved and restarted the IDE.

Do I have to do this everytime I change the codes in the Designer?

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
You could find the InitializeComponent sub for the form (the one marked
"do not edit this with the code editor") and delete all references to
that control. Then when design view refreshes the control should be
gone.

Thanks,

Seth Rowe
bz wrote:
>the vb.upgrade group is dead. I think I will post this here instead.

Hi,

I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express
Edition.
I got 140 errors and 170 warnings.

One of the error was that it wouldn't load a VB6 control.

(In VB6, if it can't load a control, VB6 will replace it with a
PictureBox.)

But VB2005 didn't do that. It wouldn't even let me display the form at
all
for me to delete that control.

Any idea how to display the design view to replace that control?

Thanks!


--
There is no answer.
There has not been an answer.
There will not be an answer.
That IS the answer!
And I am screwed.
Deadline was due yesterday.

There is no point to life.
THAT IS THE POINT.
And we are screwed.
We will run out of oil soon.

http://spaces.msn.com/bzDaCat

Nov 9 '06 #5

P: n/a
You can get the buttons back by adding them directly to the form instead
of to the deleted control. You probably had lines in the Designer file that
looked like this.

Me.TheBadControl.Controls.Add(Me.SomeButtonControl )

Just change this to:

Me.Controls.Add(Me.SomeButtonControl)

That will glue the button directly to the form.

As for your other message about the form still not displaying, please post
the error message that appears. And I wasn't sure what you meant by clicking
"refresh" in Visual Studio.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
Thanks!!!

Oh crap! That control is a container... now all my buttons are gone!!
aaaahahaha! huhhhooo... <G>

Nov 9 '06 #6

P: n/a
bz
Yes, I figured it out how to add the controls... I was a Java guy before...
This VB.NET thing kinda mimic the Java thing from Sun.

Ok... (so please excuse me... I am new...) I changed the codes in the
Form1.Designer.vb file to "comment" out all the reference to that bad
control. I then double clicked the Form1.vb file to display the form. It
didn't work. It didn't refresh/parse the new codes (I guess). There was a
little button under the "Solution Explorer" that said "Refresh". I clicked
that and then double clicked the Form1.vb file again. Nothing. It still
said I had a bad control on the form. So, I saved and restarted the IDE.
Now it re-parse/refreshed the form.


"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
You can get the buttons back by adding them directly to the form instead
of to the deleted control. You probably had lines in the Designer file
that looked like this.

Me.TheBadControl.Controls.Add(Me.SomeButtonControl )

Just change this to:

Me.Controls.Add(Me.SomeButtonControl)

That will glue the button directly to the form.

As for your other message about the form still not displaying, please post
the error message that appears. And I wasn't sure what you meant by
clicking "refresh" in Visual Studio.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>Thanks!!!

Oh crap! That control is a container... now all my buttons are gone!!
aaaahahaha! huhhhooo... <G>


Nov 9 '06 #7

P: n/a
I'm not sure, then. I do the type of change that you are doing all the time.
After I change the Designer file, I always do a "File / Save" command to
make sure Visual Studio knows I am serious. Then I re-open the visual designer,
and all my changes are there.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
Yes, I figured it out how to add the controls... I was a Java guy
before... This VB.NET thing kinda mimic the Java thing from Sun.

Ok... (so please excuse me... I am new...) I changed the codes in the
Form1.Designer.vb file to "comment" out all the reference to that bad
control. I then double clicked the Form1.vb file to display the form.
It didn't work. It didn't refresh/parse the new codes (I guess).
There was a little button under the "Solution Explorer" that said
"Refresh". I clicked that and then double clicked the Form1.vb file
again. Nothing. It still said I had a bad control on the form. So,
I saved and restarted the IDE. Now it re-parse/refreshed the form.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
>You can get the buttons back by adding them directly to the form
instead of to the deleted control. You probably had lines in the
Designer file that looked like this.

Me.TheBadControl.Controls.Add(Me.SomeButtonContro l)

Just change this to:

Me.Controls.Add(Me.SomeButtonControl)

That will glue the button directly to the form.

As for your other message about the form still not displaying, please
post the error message that appears. And I wasn't sure what you meant
by clicking "refresh" in Visual Studio.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>>Thanks!!!

Oh crap! That control is a container... now all my buttons are
gone!! aaaahahaha! huhhhooo... <G>

Nov 9 '06 #8

P: n/a
bz
I am trying this out with the free VB2005 Express Edition.
So, it may be different from the paid version... I guess.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
I'm not sure, then. I do the type of change that you are doing all the
time. After I change the Designer file, I always do a "File / Save"
command to make sure Visual Studio knows I am serious. Then I re-open the
visual designer, and all my changes are there.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>Yes, I figured it out how to add the controls... I was a Java guy
before... This VB.NET thing kinda mimic the Java thing from Sun.

Ok... (so please excuse me... I am new...) I changed the codes in the
Form1.Designer.vb file to "comment" out all the reference to that bad
control. I then double clicked the Form1.vb file to display the form.
It didn't work. It didn't refresh/parse the new codes (I guess).
There was a little button under the "Solution Explorer" that said
"Refresh". I clicked that and then double clicked the Form1.vb file
again. Nothing. It still said I had a bad control on the form. So,
I saved and restarted the IDE. Now it re-parse/refreshed the form.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comca st.net...
>>You can get the buttons back by adding them directly to the form
instead of to the deleted control. You probably had lines in the
Designer file that looked like this.

Me.TheBadControl.Controls.Add(Me.SomeButtonContr ol)

Just change this to:

Me.Controls.Add(Me.SomeButtonControl)

That will glue the button directly to the form.

As for your other message about the form still not displaying, please
post the error message that appears. And I wasn't sure what you meant
by clicking "refresh" in Visual Studio.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
Thanks!!!

Oh crap! That control is a container... now all my buttons are
gone!! aaaahahaha! huhhhooo... <G>


Nov 9 '06 #9

P: n/a
No, in this area Express and the other editions are the same.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
I am trying this out with the free VB2005 Express Edition. So, it may
be different from the paid version... I guess.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
>I'm not sure, then. I do the type of change that you are doing all
the time. After I change the Designer file, I always do a "File /
Save" command to make sure Visual Studio knows I am serious. Then I
re-open the visual designer, and all my changes are there.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>>Yes, I figured it out how to add the controls... I was a Java guy
before... This VB.NET thing kinda mimic the Java thing from Sun.

Ok... (so please excuse me... I am new...) I changed the codes in
the Form1.Designer.vb file to "comment" out all the reference to
that bad control. I then double clicked the Form1.vb file to
display the form. It didn't work. It didn't refresh/parse the new
codes (I guess). There was a little button under the "Solution
Explorer" that said "Refresh". I clicked that and then double
clicked the Form1.vb file again. Nothing. It still said I had a
bad control on the form. So, I saved and restarted the IDE. Now it
re-parse/refreshed the form.

"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comc ast.net...

You can get the buttons back by adding them directly to the form
instead of to the deleted control. You probably had lines in the
Designer file that looked like this.

Me.TheBadControl.Controls.Add(Me.SomeButtonCont rol)

Just change this to:

Me.Controls.Add(Me.SomeButtonControl)

That will glue the button directly to the form.

As for your other message about the form still not displaying,
please post the error message that appears. And I wasn't sure what
you meant by clicking "refresh" in Visual Studio.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
Thanks!!!
>
Oh crap! That control is a container... now all my buttons are
gone!! aaaahahaha! huhhhooo... <G>
>

Nov 10 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.