Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15595

How to change a VB6 Control Type (Designer view) to another type.

$
0
0
Hi!

I'm new here and w/ VB :)

Today I am working on a legacy Annotation application used by
our engineers throughout my company.

I have successfully installed VB6 and all pre-reqs. I have registered all of my required DLLs. I am referencing the VB6 control library version 6.0 SP6 (MSCOMCTL.OCX). App doesn't run or compile on the 32-Bit Machine due to "Memory issues" (which I don't believe as the problem after research but.. keep reading)

This (MSCOMCTL) is the ActiveX control that holds the TreeView control yes?
When loading the application in VB6 in a Windows 32-bit machine, I was getting obnoxious and confusing "Out Of Memory" errors on a few large/major forms.

Name:  Ykgvgcr.png
Views: 11
Size:  8.9 KB

I tried just about every option google/the forums offered.
Slowly removing the references until noticing the "out of memory" error goes away.. didn't help. I moved all of the code (6000 lines are about 8 methods/funcs/routines/whatever) into one mod file.
This didn't help.


Here's my issue:



When I load the solution/project on a 32-Bit machine, I get "Out of Memory" errors that could be many things.

When I load this project on a 64-bit Dev Win 10 machine, I get "errors occurred during load" BUT, the darn thing loaded my .frx/designer views :)

I checkout out my GIT Repo with "Windows style line endings" and reloaded to resolve these errors by the way ^. The old editor seemingly can't handle UNIX endings.


Now - the only problem I am struggling to solve -

Name:  OW32yHQ.jpg
Views: 11
Size:  53.7 KB

The issue wasn't occuring on my 32-Bit Dev machine, the tvw2 object is properly/correctly a TreeView.

Name:  eqO8SvD.jpg
Views: 11
Size:  24.8 KB

When loading the project this morning, the SP6 control was not referenced into the VBP.

The VBP would need this for a TreeView I believe.
I've seen the following syntax examples:

Begin VB.TreeView tvw2
.Caption = "String Val"
.Width = 1200
.Height = 4000
End Begin

But I can't seem to find an easy way to change the actual type of the control within the .frx/VB6 designer.

In C#.Net WinForms, I'd just change the designer's code/object type. We're not in Kansas anymore are we.. :D

Best course of action here?
I am curious how/why VB thinks it's a picture box;
What if I first edit the .vbp from a fresh GIT Clone copy, and add (manually) a reference to both MSCOMTL2.OCX and MSCOMCTL.OCX?
I'll try that next.

Thank you!!
Attached Images
   

Viewing all articles
Browse latest Browse all 15595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>