VB 6 ActiveX Control in Windos Form, can't access any custom properties 
Author Message
 VB 6 ActiveX Control in Windos Form, can't access any custom properties

Hi,

I using windowed VB 6  AX control in .NET
I'm adding it through Customize Toolbox and place it on windows form.
It places fine and displays correctly with no errors or smth, but...
I can't access any custom properties nor methods in it to make it work.
'some property' is not member of 'component.class'

Anyone knows the solution?

Arnas



Fri, 28 Jan 2005 21:05:35 GMT  
 VB 6 ActiveX Control in Windos Form, can't access any custom properties
Hi,

I tested with the following simple VB ActiveX Control and it works well.

VB ActiveX Control:
1.      Create a new VB ActiveX Control and put a Label named Label1 on it.
2.      Put the following code in the control and build it.
Public Property Get MyText() As String
   MyText = Label1.Caption
End Property

Public Property Let MyText(ByVal NewValue As String)
   Label1.Caption = NewValue
End Property

VB.NET Application:
1.      Create a new VB.NET winform application.
2.      Add the simple VB ActiveX Control through Customize Toolbox.
3.      The following code works well. (Suppose the control is named AxVB6Ctl11.)
       AxVB6Ctl11.MyText = "Hello"

You may test the simple scenario as above before you go ahead to
troubleshoot the problem. If the simple scenario works, the problem may be
related to your specific VB ActiveX control so that you can focus on it.

Regards,
Elan Zhou
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net?  http://www.gotdotnet.com



Sun, 30 Jan 2005 10:52:37 GMT  
 VB 6 ActiveX Control in Windos Form, can't access any custom properties
Hi,

I've done just the same, the problem was with property of type
ADODB.Connection. I've changed obejct to connection string and it works
fine.

Arnas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 30 Jan 2005 17:47:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. My ActiveX Control loses its member property when attached to a custom Outlook Contact Form

2. 'Canned' data in VB program

3. Custom ActiveX Control Doesn't Show in Other Computer's Browsers

4. Newbie: Custom Property of ActiveX control not working properly

5. Q: ActiveX custom control - property window problem

6. Property Sheet of custom ActiveX Controls

7. Q: ActiveX custom control - property window problem

8. How to access a DB's form's control from w/i VB module

9. Q: ActiveX custom control - property window problem

10. Accessing Custom Properties in Forms -- Parent and Child ?

11. HELP- VB5 : Can't see custom control properties

12. Custom Property changes in Custom Outlook Form

 

 
Powered by phpBB® Forum Software