473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem calling defaults properties from VB6 (żbug?)



I have a problem calling .NET classes with default properties from VB6.

The class has a public member, this public member has a default
property, from VB6 I can´t acces the default method without especifi the
name of the defaul method, if I do it I get this error: 450: Wrong number of
arguments or
invalid property assignment

Example:

Public Class c2
Private _number As Integer

Default Public Property defaultP(ByVal index As Integer) As Integer
Get
Return index
End Get
Set(ByVal Value As Integer)
_number = Value
End Set
End Property

Public Function hello() As Integer
Return _number
End Function
End Class

Public Class c1
Public c As New c1
End Class
This is VB6

Dim a As Object
Set a = CreateObject("Clase.c1")

a.c.defaultP(9) = 5 'OK
MsgBox a.c.hello()

a.c(9) = 6 'error 450
MsgBox a.hello()

Nov 20 '05 #1
0 1010

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Waser | last post by:
Summary: dlgPrint.PrinterSettings.Copies always returns 1 regardless of what the user entered Details: When trying to print a document, I am first presenting the user with the standard...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
7
by: Jeff | last post by:
Out of curiosity, I tried to check the help file for the property 'Fetch Defaults' to see what it is for. No surprise, it is not mentioned. F1 on the property give nothing. A search of MS knowledge...
0
by: Just Me | last post by:
If I look at the properties of a printer I can find two things: Printing Preferences and Printing Defaults. I believe the preferences apply to my apps and the defaults apply to all users. In...
0
by: **Developer** | last post by:
I know this is not the correct NG but I've been trying to get this answered for a while and can't find someone really knowledgeable about printers. (Actually it does relate to something I'm...
11
by: wASP | last post by:
Hi, I've got a pair of int properties in a class. The properties in question are indexing values - but that's not relevant to my problem - or it's just symptomatic ... sort of. They are...
8
by: Bob Skutnick | last post by:
Greetings, I'm hoping someone has experienced a problem I'm having: I have an existing ASP application (working fine) that uses an SSL server certificate. My user community is made up of both...
3
by: James Coleman | last post by:
Hello, The following error is appearing when attempting to create a directory using the availale system.io methods: System.IO.DirectoryNotFoundException: Could not find a part of the path...
2
by: chris in grimsby | last post by:
I have a combobox of dropdownlist style as one of the controls on a tabbed form. The list is populated by setting the DataSource property to a dataset and then the DisplayMember and ValueMember...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.