Home All Groups Group Topic Archive Search About

VB Controls In VB2005

Author
9 Nov 2006 6:04 PM
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

Author
9 Nov 2006 6:21 PM
rowe_newsgroups
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:
Show quoteHide quote
> 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
Author
9 Nov 2006 9:10 PM
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?



Show quoteHide quote
"rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message
news:1163096492.038256.148360@i42g2000cwa.googlegroups.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
>
Author
9 Nov 2006 6:27 PM
Tim Patrick
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

Show quoteHide quote
> 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
>
Author
9 Nov 2006 9:08 PM
bz
Thanks!!!

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


Show quoteHide quote
"Tim Patrick" <inva***@invalid.com.invalid> wrote in message
news:e3b469761b898c8d200c0dfbd5c@newsgroups.comcast.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
>>
>
>
Author
9 Nov 2006 9:32 PM
Tim Patrick
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

Show quoteHide quote
> Thanks!!!
>
> Oh crap!  That control is a container... now all my buttons are gone!!
> aaaahahaha! huhhhooo... <G>
>
Author
9 Nov 2006 9:37 PM
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.




Show quoteHide quote
"Tim Patrick" <inva***@invalid.com.invalid> wrote in message
news:e3b469761ba68c8d21aa14882b6@newsgroups.comcast.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>
>>
>
>
Author
9 Nov 2006 10:26 PM
Tim Patrick
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

Show quoteHide quote
> 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" <inva***@invalid.com.invalid> wrote in message
> news:e3b469761ba68c8d21aa14882b6@newsgroups.comcast.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>
>>>
Author
9 Nov 2006 10:28 PM
bz
I am trying this out with the free VB2005 Express Edition.
So, it may be different from the paid version... I guess.



Show quoteHide quote
"Tim Patrick" <inva***@invalid.com.invalid> wrote in message
news:e3b469761bb38c8d2222776dbf5@newsgroups.comcast.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" <inva***@invalid.com.invalid> wrote in message
>> news:e3b469761ba68c8d21aa14882b6@newsgroups.comcast.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>
>>>>
>
>
Author
10 Nov 2006 1:58 AM
Tim Patrick
No, in this area Express and the other editions are the same.

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

Show quoteHide quote
> I am trying this out with the free VB2005 Express Edition. So, it may
> be different from the paid version... I guess.
>
> "Tim Patrick" <inva***@invalid.com.invalid> wrote in message
> news:e3b469761bb38c8d2222776dbf5@newsgroups.comcast.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" <inva***@invalid.com.invalid> wrote in message
>>> news:e3b469761ba68c8d21aa14882b6@newsgroups.comcast.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>
>>>>>