|
Hi everybody,
My question could seem to be easy, but I'm a newbie in VB.NET development.
Is it possible to declare a multi-dimensionnal array, but containing different data-type. I mean :
I've got a array containing my own data (actually, it contains objects of type FrameInterpretor which contains some bytes arrays), and I would like to associate to this data an integer.
Thanks a lot for your replies,
Regards,
Ch'Portos.
Yop Yop !!
|
|
|
|
|
Seems like you need to use a Hashtable or Dictionary in which the key is your integer and the value is your FrameInterpreter. If you're using .NET 2 then Dictionary is the one to use. You should find examples in the MSDN documentation.
Kevin
|
|
|
|
|
Hi,
Thanks for your help, but I found another way to do what I want.
I simply created a private class in which I have 2 attributes, one of the FrameInterpreter type, one of Integer type.
After I use an array of objects of this new class
Ch'Portos.
Yop Yop !!
|
|
|
|
|
if i use this line -> myRestrictItems.Item(i).ReceivedTime
in the method i'm getting MissingMethodException ! i just cant understand why it is so?
this page shows that its a bug or something http://support.microsoft.com/kb/834063 but still i'm not able to get away with it !!
|
|
|
|
|
I think I had something similar to this a few weeks ago when using Analysis Services. The fix was to apply the latest Analysis Services service pack.
Kevin
|
|
|
|
|
hiho,
I've got 3rd parity dll and want to bind them in my code with "CreateObject". with "dim t as new dll.klasse" it runs but not with "CreateObject". The Code of the dll is not managed c++ code and i don't have the source code
|
|
|
|
|
CreateObject will NOT let you do something like Dim t As New MyClass . CreateObject is used for late-bound creation of objects.
In order to create objects using Dim , you have to add a reference to the .DLL and this will only work if the .DLL is COM-based.
So, how you can use this .DLL depends entirely on the .DLL and the version of VB you're using. You can't just use it "the way you want to".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
sry, i mean wat u say.. i declare a variable with dim t as object and then i want to set the variable with Set t = CreateObject("mydll.myclass"). but it diddn't run
|
|
|
|
|
Is the .DLL a COM-based DLL and is it registered, using REGSVR32? If not, you can't use CreateObject. CreateObject can only be used to create COM-based objects.
You can't just specify a .DLL filename and some name. You MUST use the COM-exposed name (ProgID) of the object in the library you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
yes the dll is registered. i've searched in the registry and found the clsid with progid.. but when i use them.. it dosen't run. The Name of the ProgID is "BARCODE.BarcodeCtrl.1" and the class name is "Barcode". When i call "Set myVar = CreateObject("BARCODE.BarcodeCtrl.1.Barcode")" then i get the error..
.. i've even tested without the class.. and it runs!! but i'm not sure with object i've get.. i hope it was the barcode-class object
|
|
|
|
|
You can only use the ProdID, without appending the class name:
Set myvar = CreateObject("BARCODE.BarcodeCtrl.1")
That should represent the COM object (class) that you're looking for.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i was EXport some data form my vb6 to EXCEL.
But when i close my program i found out that the EXCEL.exe is still running...
wat is the command to terminate the EXCEL.exe when i close my program????
|
|
|
|
|
Dim e As New excel.Application
e.Quit
|
|
|
|
|
Hi,
I need to write a very little vb.net console application that can mute or unmute the sound device and change the level of each entry to 0 or max.
I've looked around without succes.
I'm sure that someone here can help me !
Thx
|
|
|
|
|
Hi ,
I want to populate a treeview with 1 million nodes.
How can i do that while maintaining the efficiency of the web page.
i want to achieve this in asp.net 1.1
though i have the option of working in asp.net 2.0 but i m not familiar with that.
suggestions for asp.net 2.0 are also welcome.
thanks & regards
Kapil Thakur
|
|
|
|
|
Kapil Thakur wrote: How can i do that while maintaining the efficiency of the web page.
You can't. Your page will still load exceptionally slowly even on a DSL line. That is if the treeview control will even support that many nodes (I seriously doubt that it supports more than +/- 32 thousand).
You should rather think of another solution.
|
|
|
|
|
hi,
thanks for the reply.
i knew that loading such a tree is impossible.
however is there any way by which i can implement the previous & next methods like paging in datagrid.
that is, on demand i can load a certain number of nodes and then get options like previous and next links. on clicking them, i will load next number of nodes.
can that be achieved?
thanks & regards,
Kapil Thakur
|
|
|
|
|
There is no way to do that. Even if you could add that many node (I think the limit is 65,535), the TreeView wouldn't be usable until the entire tree is loaded. With 1 million nodes, that would take a LONG time, even over a 10Mb/sec connection.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
As the previous two members stated, this is unrealistic.
What exactly are you trying to accomplish with your application? Perhaps we can suggest a more efficient working-model to solve your problem.
On the other hand. You might be able to use a TreeView. You would need to AutoPostBack based upon which nodes are clicked, and then generate childNodes for those upon Page Load. This way, you never have 1,000,000 nodes on a single page, but instead potentially just a few hundred.
Either way, you should tell us what it is you're trying to accomplish, and not how you wish to do so
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
as a treeview nodes have indexes in integer you can not make nodes more than integer maximum amount.
try xml files to make a tree-shaped output.
|
|
|
|
|
hi,
can any one tell me how to add sound effects to a vb.net application.
Something like on button click..
|
|
|
|
|
What kind of sound effects? What format?
|
|
|
|
|
a simple beep sound is enough .r any other sound...
|
|
|
|
|
You could use Beep() or if you're using VS2005 My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep) . For playing other audio in VS2005 look at My.Computer.Audio.* classes.
|
|
|
|
|
thanx dude..vl check it..
|
|
|
|