|
-
Aug 11th, 2005, 07:07 AM
#1
Thread Starter
Fanatic Member
.NET component in VB6
dear all,
as many here, i am new to .NET though i am an experienced VB programmer.
for integration purposes with an existing software engine, i need to provide this engine with hooking abilities to the RichTextBox component of .NET.
since i have a very complicated project in VB6, i do not want to upgrade all this project to .NET (i have no other need to than this requisite). the idea is then to find a way to use the RichTextBox .NET component in VB6.
to do so, i am trying to build a Windows Control Library with a graphical interface which will have the RichTextBox .NET component in it, and then use this control in my VB application.
i am totally able to register a .NET Windows Control Library as COM, so that i can see it in my 'References' Tab of my VB6 development environment.
the question is: how would i go to actually use a 'visible' component? references are computation routines, i need the graphical aspect of it. should i add a reference to my NET component and then create them in VB6 dynamically with something like:
VB Code:
.Controls.Add("MyNETcontrol", "ctlName")
any suggestions MORE than welcomed...
thank you in advance,
wc.
Last edited by wildcat_2000; Aug 11th, 2005 at 07:18 AM.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Aug 11th, 2005, 07:25 AM
#2
Thread Starter
Fanatic Member
Re: .NET component in VB6
mendak, this what i tried.
i created and successfully registered a ASP.NET component.
i included it in the references of my VB project, and tried creating it dynamically:
VB Code:
Dim newObject As ARTEC.ARTEC
Set newObject = Form1.Controls.Add("ARTEC.ARTEC", "TESTCTL")
With newObject
.Visible = True
.Width = 1000
.Height = 1000
.BackColor = &H0
End With
weird enough, i get a 'Type mismatch' error 13 on the Set instruction...
no typos though, this works perfectly if i use Labels for instance. furthermore, it DID recognize the ARTEC.ARTEC class, as if i change that i get a 'could not find reference...'.
...hummm...
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Aug 11th, 2005, 07:41 AM
#3
Thread Starter
Fanatic Member
Re: .NET component in VB6
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Aug 11th, 2005, 07:51 AM
#4
Re: .NET component in VB6
 Originally Posted by wildcat_2000
Your second post in this thread looks good. Did you find a way to add it to the components toolbar though?
I have been through both of Scott Swigart's links, but nowhere could I find him trying to do what you did... he's been adding to references both times.
-
Aug 11th, 2005, 07:59 AM
#5
Thread Starter
Fanatic Member
Re: .NET component in VB6
yep exactly, that is the whole point.
even though he does reference to .NET components, in the end when he needs to avtually 'display' something he is then using standard VB objects.
damn.
what is it you actually need? a generic .NET component or you need a richedit20.dll wrapper for VB6?
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
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
|