|
Can someone help me on how can I make a program in visual basic 6 that manipulates the disk quota of a particular drive? or perhaps, get the total size of a subdirectory?
|
|
|
|
|
Hello all!
If an object has a member, who's name was not known but only stored in a string, how could I access that member?
Thanks in advance,
Fahad Sadah
New freeware site underway!
|
|
|
|
|
What you exactly mean by this question??? How come an object has a member who has no name ! and if it is then what you think intelliSense is for? and didn't understand yet what you exactly trying to ask.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: How come an object has a member who has no name !
He didn't say the object's member had no name. He said the name was stored in a string.
|
|
|
|
|
Thanks for correcting me man ! but can you please explain it a bit "object has a member, who's name was not known but only stored in a string" I still don't get it.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
I'll give an example:
<br />
Dim obj As New MyClass<br />
Dim str As String = "member"<br />
Assume that str was user input, and I do not know what it is. How do I access obj.str?
|
|
|
|
|
Are you saying that user knew the method in your Class and you want to choose the method in your MyClass according to what user enters ???
Fahad Sadah wrote: How do I access obj.str?
str is not even a member of MyClass its just a string field which can be used at class level or in a method locally depends on its declaration.
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: Are you saying that user knew the method in your Class and you want to choose the method in your MyClass according to what user enters ???
Or maybe the user knows something from which a lookup in a database or XML file could be made which returns the name of the method.
AliAmjad wrote: str is not even a member of MyClass
True, you cannot use a string in that way. But you can use the string to invoke the correct method through "Reflection"
|
|
|
|
|
I know buddy but as he said in his later post bellow that he's a newbie didn't know anything about reflection so thought that he didn't ask a question related to reflection !
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
AliAmjad wrote: I know buddy but as he said in his later post bellow that he's a newbie didn't know anything about reflection so thought that he didn't ask a question related to reflection !
Why would you think that? The most obvious thing is that if he didn't know anything about reflection then his question may be related but he didn't realise it was related. It is therefore necessary to bring the idea to his attention to find out if it really is related or not.
|
|
|
|
|
Ok Thank you very much for bringing this aspect to my attention. It was quite a nice learning experience for me. Thanks !
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
sounds like your talking about reflection...
|
|
|
|
|
Pardon the noobish question please: whats reflection?
|
|
|
|
|
Fahad Sadah wrote: whats reflection?
There is a System.Reflection namespace that contains a number of useful classes to help you with this.
Everything has a GetType() method which returns a Type object.
Use GetMethod() to find the method that you want with the string. This will return a MethodInfo object.
You can then use the MethodInfo object with your object to Invoke() the method.
|
|
|
|
|
Hello,
I'd like to know how i can record the screen, and save it as a .wmv or .avi. Anyone got any idea's?
--Zaegra--
|
|
|
|
|
Zaegra wrote: I'd like to know how i can record the screen, and save it as a .wmv or .avi. Anyone got any idea's?
Camtasia Studio[^] from Techsmith[^] is excellent. I use it from time to time for building training materials.
|
|
|
|
|
I am novice to VB 2005.
I have one DataTable Dtbl. May I sort it?
Following is not good for my case:
foundrows=dtbl.select(expression, sortorder)
above command returned sorted rows from Datatable, I need table to be sorted.
Have good comments
Nasir Mahmood
|
|
|
|
|
Sort the data in your database query that you use to populate your DataTable.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Yap, its a way, but I have added data manually after query, now what is the solution
|
|
|
|
|
Hi, All,
I want to manage combobox following values
code Description
001 Abc
005 Xyz
009 MNP
In VB 6, its like
Combo.Additem "ABC"
Combo.itemdata "001"
What is the equalvilant in VB 2005 ?
I want to put all above values manually not through Tables.
Please guide abt it.
Nasir Mahmood
|
|
|
|
|
Did you try searching Google[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I think in VB.NET its ValueMember as I didn't work in VB6 for quite a long time you can try this property as it says "The Property to use as an actual value for the items in the control" to suit your needs.
Hope it helps !
AliAmjad(MCP)
First make it Run THEN make it Run Fast!
|
|
|
|
|
Hello Nasir,
Please visit the following link to get an idea how you can do it in VB.Net
http://www.mgbrown.com/PermaLink37.aspx
I hope this helps.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Click here to view a page that shows how to use the Itemdata property in both VB6 and VB.NET. (Scroll down to the "Private Sub Code Changes for Associating ItemData" section.)
|
|
|
|
|
Hi
I want to read a reports file that comes in .txt , that report contain a Column like this
idno full name berth date
--------------------------------------------------------
1010000001 john Jackson 10/10/2007
1010044522 john molar 10/09/2007
1010000001 tom s******* 05/10/2007
all Column have a different lengths and different spaces between them
how to cut those Column and store it in a table by using vb.net
-- modified at 2:53 Saturday 10th November, 2007
|
|
|
|