• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 844
  • Last Modified:

Move VB 6 project with User Controls to VB 2005

I have a VB 6 project I want to convert to VB 2005. Problem is: There are some third party user controls and ocx that cause a gazillion error messages. Got any advice to offer? Thanks.
0
John Account
Asked:
John Account
  • 7
  • 6
1 Solution
 
inthedarkCommented:
Golden rule is never use third party controls......unless they they let you have the source.  Suggest you should call the supplier of the controls and ask their help.
0
 
Bob LearnedCommented:
What do the third party user controls provide?  Can these be done differently with native .NET code, or better .NET controls?

Bob
0
 
John AccountAuthor Commented:
The third party control is avphone, from http://www.banasoft.net/
They don't provide any support on subjects they say a visual studio programmer should know how to do these kinds of things. But it's been an excersice in futility for me, trying to convert this project.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Bob LearnedCommented:
Can they at least confirm that the control can be used in a .NET environment?  

Bob
0
 
John AccountAuthor Commented:
I know it can, Bob. I had paid someone at RAC to convert a very small app for me. It works very well, but I can't afford to pay for every little conversion. So if I can learn how to convert it myself, that would be great. Thanks.
0
 
Bob LearnedCommented:
So, what are some of the gazillion errors?

Bob
0
 
John AccountAuthor Commented:
Okay, here's some, from one attempt, in design view:
The designer cannot process the code at line 56: AudCodec1.OcxState = CType(resources.GetObject("AudCodec1.OcxState"), System.Windows.Forms.AxHost.State) The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.
Hide    Edit

at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.CreateQuoteExpression(XmlElementData xmlElement)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.XmlElementData.get_CodeDomElement()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.EndElement(String prefix, String name, String urn)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.Parse(XmlReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

Now on another attempt, from copying components from the design view of a form I paid a coder to create, I can almost get it working, except that I can't seem to build the project; hence getting this error rendered when an to run debug is made:
Visual Studio cannot start debugging because the debug target 'C:\Blah blah blah' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the ..." blah blah blah.
0
 
Bob LearnedCommented:
That looks like an error when you open the form.  Is this a compiler error?  If not, are there compiler errors?

Bob
0
 
John AccountAuthor Commented:
Those were two different examples, from two different projects. I don't know which one you're question is refering to. The first example illustrates what is displayed when I attemp to view the form in design view. The next example illustrates a popup error message that occurs when I attempt to debug that project.
0
 
Bob LearnedCommented:
If you don't open the form in design view, are there any compiler errors listed in the 'Error List' window?

bob
0
 
John AccountAuthor Commented:
Yes, in reference to the project where I can see nothing in the forms in design view except for all those errors previously mentioned, I can see all these errors below in the Error List window:

Error      1      Type 'AxAVPhone3.AxAudCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      22      33      Project1
Error      2      Type 'AxAVPhone3.AxUDPSocket' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      23      34      Project1
Error      3      Type 'AxAVPhone3.AxAudRnd' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      24      31      Project1
Error      4      Type 'AxAVPhone3.AxVidCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      25      33      Project1
Error      5      Type 'AxAVPhone3.AxAudCap' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      26      31      Project1
Error      6      Type 'AxAVPhone3.AxVidCap' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      27      31      Project1
Error      7      Type 'AxAVPhone3.AxAudCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      39      22      Project1
Error      8      Type 'AxAVPhone3.AxUDPSocket' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      40      23      Project1
Error      9      Type 'AxAVPhone3.AxAudRnd' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      41      20      Project1
Error      10      Type 'AxAVPhone3.AxVidCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      42      22      Project1
Error      11      Type 'AxAVPhone3.AxAudCap' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      43      20      Project1
Error      12      Type 'AxAVPhone3.AxVidCap' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.Designer.vb      44      20      Project1
Error      13      'Public Event Load(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      229      3      Project1
Error      14      Type 'AxAVPhone3.__UDPSocket_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      238      91      Project1
Error      15      Type 'AxAVPhone3.__VidCap_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      280      83      Project1
Error      16      Type 'AxAVPhone3.__VidCodec_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      287      90      Project1
Error      17      Type 'AxAVPhone3.__AudCap_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      318      83      Project1
Error      18      Type 'AxAVPhone3.__AudCodec_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      325      90      Project1
Warning      19      Variable 'lArr' is used before it has been assigned a value. A null reference exception could result at runtime.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form1.vb      388      15      Project1
Error      20      Type 'AxAVPhone3.AxAudCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      20      33      Project1
Error      21      Type 'AxAVPhone3.AxVidCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      21      33      Project1
Error      22      Type 'AxAVPhone3.AxVidRnd' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      22      31      Project1
Error      23      Type 'AxAVPhone3.AxAudCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      30      22      Project1
Error      24      Type 'AxAVPhone3.AxVidCodec' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      31      22      Project1
Error      25      Type 'AxAVPhone3.AxVidRnd' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.Designer.vb      32      20      Project1
Error      26      Type 'AxAVPhone3.__AudCodec_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.vb      189      90      Project1
Error      27      Type 'AxAVPhone3.__VidCodec_FrameEvent' is not defined.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\Form2.vb      212      90      Project1
Warning      28      Variable 's' is used before it has been assigned a value. A null reference exception could result at runtime.      C:\Program Files\Banasoft\AVPhone3\Samples\Applications\MultiConf\MultiConf.NET\modCommon.vb      36      11      Project1
Warning      29      Failed to create the wrapper assembly for type library "AxAVPhone3". Parameter 'info' of method 'StreamWrite' has a specified default value that is not of a type (System.Object) recognized by the ActiveX Importer.  Change the type of the parameter to a known OLE automation compatible type.      AxAVPhone3      Project1
Warning      30      The referenced component 'AxAVPhone3' could not be found. Failed to create the wrapper assembly for type library "AxAVPhone3". Parameter 'info' of method 'StreamWrite' has a specified default value that is not of a type (System.Object) recognized by the ActiveX Importer.  Change the type of the parameter to a known OLE automation compatible type.      
0
 
Bob LearnedCommented:
Try this to solve the designer problems:

1) Add the ActiveX control to the toolbox
    a) Right-click on the toolbox, and select Add Tab, and add a COM tab
    b) Make sure that the COM tab is active
    c) Right-click in the COM tab area, and select 'Choose Items'
    d) Switch to the COM tab, and find the ActiveX control in the list.

2) Create a temporary form in the project

3) Double-click on the control add to the ToolBox to add the control to the temporary form.

That should create the AxHost libraries for the control that requires a site.

Bob
0
 
John AccountAuthor Commented:
Okay, done that; however, as I'm using Visual Studio 2005, it was slightly different, but basically the same. Anyway...nothing's really changed. I've got the avphone controls in my toolbox, but I can't add 'em to either form--new or existing. And I think I have all the same errors, Bob. Moreover, when I try to add the control to the form, I get a popup error message that reads: "Failed to import the Activex Control. Please ensure it is properly registered."
0
 
John AccountAuthor Commented:
Sigh...anyways...I'll keep working on this, but I'm almost there. Thanks, Bob.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now