|
-
Jun 21st, 2006, 03:52 AM
#1
Thread Starter
Member
[RESOLVED] Merging controls and maintaining compability..possible?
Hi
I have now 9 activex controls in different project files. What I would like to do is to merge these into one controls, but im worried about compability. I cannot add these controls to my main application again, so is it possible to maintain compability after making one project out of 9
-
Jun 21st, 2006, 12:20 PM
#2
Re: Merging controls and maintaining compability..possible?
Why not? Start an ActiveX project and put your controls whereever you want them on the form. I have one control that has 13 controls (plus 11 labels) on it.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jun 21st, 2006, 05:03 PM
#3
Thread Starter
Member
Re: Merging controls and maintaining compability..possible?
Cuz my activex controls currently are seperate projects
-
Jun 22nd, 2006, 02:54 PM
#4
Re: Merging controls and maintaining compability..possible?
Open your combined project. Add your controls (Add/User Control) to the project (add the .ctl files.)
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jun 22nd, 2006, 03:35 PM
#5
Re: Merging controls and maintaining compability..possible?
The short answer is heck no.
The even shorter answer is no.
As soon as you move them the progid will change. You won't be able to keep compatibility with the app.
-tg
-
Jun 22nd, 2006, 04:37 PM
#6
Addicted Member
Re: Merging controls and maintaining compability..possible?
I'm a bit confused. Do you want to merge the controls and use them in the main project ? Or merge them and use in different projects ?
If it's the same project, then yes but it would take sometime. You can use it with the original project ,but you would have to re-write all properties, methods and functions calls from the original program to the one control. And also check for any duplicate names.
ex. 2 controls Fred and Barney.
Fred.value=1
Barney.value=1
As one control named Bedrock.
Bedrock.Fred_Value=1
Bedrock.Barney_Value=1
Keith_VB6
If you have any further questions, just ask.
If this solves things, then please mark the thread resolved.
[Thread Tools] --> [Mark Thread Resolved]
-
Jun 22nd, 2006, 10:56 PM
#7
Re: Merging controls and maintaining compability..possible?
No, no, no.... he currently has several projects, each with their own activeX control in them. What he wants to do is move them all into one project (they would still be their separate objects).... but NOT have to make any changes to the main application.
Can't be done. Once the object moves, the ClassID and PRogID would change....breaking compatibility.
-tg
-
Jun 22nd, 2006, 11:25 PM
#8
Addicted Member
Re: Merging controls and maintaining compability..possible?
I have now 9 activex controls in different project files. What I would like to do is to merge these into one controls
It sounds to me that he wants 1 control.
I don't know what the main problem is. If these controls are "compiled" into .ocx files then they can easily be placed in another usercontrol as easy as placing a default command button. But then instead of calling the individul controls, the program would call the new control which in turn would call the controls within it.
If he wants to merge all the projects into one, then yes. This would be more difficult. But if he left the old projects alone, he could copy the old controls into the new control project. Making sure to use unique control names that don't over-write the old ones.
He would only be creating a new control or controls(s), not re-writing the old controls. So, anything set to use the old controls would still function. But, if he wanted to use the new combo control, then the project would have to be re-coded.
As far as "breaking compatibility", wouldn't checking the "Upgrade ActiveX Controls" in the project properties, take care of any changes. Although, in this case, I'm not sure if that applies because he's creating a new control(s).
Madsun, I believe we need some more details. What are you trying to do. What type of controls do you want to combine.
Keith_VB6
If you have any further questions, just ask.
If this solves things, then please mark the thread resolved.
[Thread Tools] --> [Mark Thread Resolved]
-
Jul 14th, 2006, 12:50 PM
#9
Thread Starter
Member
Re: Merging controls and maintaining compability..possible?
Hi
Ive been on vacation, not able to reply so here it goes
As an experiment, I took all the controls and placed inserted them into one project. That gave me one ocx with several subprograms.
Now, as said here, the progid would change, that was not a problem. Since im interfacing just one application with these controls, I could manually change the progid's and thus maintaing compability!
Problem solved!
-
Jul 14th, 2006, 12:50 PM
#10
Thread Starter
Member
Re: [RESOLVED] Merging controls and maintaining compability..possible?
Can't be done. Once the object moves, the ClassID and PRogID would change....breaking compatibility.
Only the classID changed, dunno why
-
Jul 14th, 2006, 02:05 PM
#11
Re: [RESOLVED] Merging controls and maintaining compability..possible?
No, technically, you ProgID did change.... they are in a new project now... so instead of it being Project1.SomeOCXHEre it's now MyControls.SomeOCXHere....
Now, if in code all that was referenced was SomeOCXHere, once the swap out happened and the references were reset, it would be OK.
And if you haven't done so yet, read my tut on mantaining compatibility in my sig... it'll save you a lot of grief later down the road.
-tg
-
Aug 3rd, 2006, 01:42 PM
#12
Thread Starter
Member
Re: [RESOLVED] Merging controls and maintaining compability..possible?
Read your tutorial some time back, and today im really happy that i did. Saved me alot of trouble. My challenge now is terminate speed, another thread that is (yoda-ish)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|