|
Are you using VB6 or VB.NET ?
For VB6, I would do this :
In the Menu Project->References : Select 'Microsoft Scripting Runtime'
Then in your code :
Dim fso As FileSystemObject
Set fso = New FileSystemObject
MsgBox fso.Drives("c").SerialNumber
Set fso = Nothing
I'm not sure if this is exactly what you need.
Jerome
|
|
|
|
|
Thank you Jerome
I'm using VB6, i did as you told me, and i got a number, like : 134763457, maybe this number is related to the partition serial number, because, once i have 2 partitions in this hard drive, for "e" i got another number.
What i needed is the vendors serial number that can be read on the hard drive.
Do you know a way to do this?
Thank you once more
|
|
|
|
|
I understand now exactly what you want. You're right, the number you get is the Serial number of the volume. I'm afraid I won't be able to help you on how to get the manufacturer serial number, I've got no idea how to get it...
Sorry,
Jerome
|
|
|
|
|
Thank ok, thank you the same
|
|
|
|
|
I want to set the layout orientation settings of a printer in a client machine..
using an dotnet page I have to set these property in the client machine... & then to print..
I know there we cant change programmatically the settings such as the page orientation or the default printer.
so can I use an activexControl instead or is there anyway to overcome this problem..
pls let me know..
Regards
Thoths
|
|
|
|
|
|
I'm looking for the way to create the custom menu in VS.NET for my Addin.
As you know, if you create the addin with Visual Studio.NET Addin Wizard and choose [Create the TOOL menu] then .NET generates the code in OnConnection Sub like following..
CommandObj = applicationObject.Commands.AddNamedCommand(objAddIn, "MyAddin1", "MyAddin1", Executes the mommands for MyAddin1, True, 59, Nothing, 1+2)
CommandObj.AddControl(applicationObject.CommandBars.Item("Tools"))
This will insert the MyAddin1 menu in TOOL menu when it's first loaded.
I wanna creat my custom Menu like MyAddins next to Tool menu, then insert addin's menu into it...
If anyone know the way to do it, please tell me. Thanks.
|
|
|
|
|
Hello,
In previous version of vb we used to use .inc files like .h files in c++,
how is the changed in vb.net ?
Thanks for your reply
|
|
|
|
|
Use "imports", e.g., "imports system.io"
Gerry
|
|
|
|
|
Hello gerry,
I am a C++ programmer, now in the world of VB.net
as in c++ world where we have .h files where we define
the integer,string...array etc, is there some thing
in vb.net world. where I could define all constants
and global variables and include them in all files.
or should all of them be defined in a module and include
that module in the project while compiling.
bijju
|
|
|
|
|
Not sure, Bijju.
"Imports system.io" for example imports (includes) a namespace that you can then refer to in your code, like additional classes.
system.io comes from system.dll (I believe) so you could create a DLL and then make a reference to it in your project, or you can copy a source file to your project.
I used to keep a number of "global" .h files in a special directory that I made known to the compiler, so it would know where to find it. You can probably do the same thing in vb .net, but I've only been using vb .net a month, so I'm learning as I go along.
Good luck,
Gerry
|
|
|
|
|
You used .inc files in pervisous versions of VB?
Are you sure?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Ray Cassick wrote:
You used .inc files in pervisous versions of VB?
He must be talking about VB3. VB4 dropped the support for include files.
I see dumb people
|
|
|
|
|
Hello,
I would like to call some procedures defined in other dll or pc code
written by other vendor. how do I go about it?
for example I want to use a function in rational's dll, how do I
go it?
|
|
|
|
|
Look at the documentation for the Declare statement in the MSDN Library.
If you are using VB6, look at this[^]
If you are using VB.Net, use this[^]
--
Ian Darling
|
|
|
|
|
Hi...A databinding error messed up my form, at least from
appearances sake (please see attached picture). But when
I view the code everything seems to be there. Does anyone
know how I can get my form back?
Anyone familiar with this databinding error (DataBinding
could not find a row in the list that is suitable for all
bindings)?
Does anyone know how to configure VB.net so I can easily
change my server name (connection)? I develop on the office network
and then take it to another network to run.
Thanks in advance. Mike
|
|
|
|
|
Hello,
I need to connect to an external server from my VB application. I am using Winsock control to connect to the external server. My program runs at a scheduled time. I am not suppose to start a new schedule thread before the first one is done. How to check this using VB or Winsock?
Thanks
Hitesh
|
|
|
|
|
I am spoiled by my VC++ macros...is there a way to create and use macros in VB 6?
|
|
|
|
|
Andrew Stampor wrote:
I am spoiled by my VC++ macros...is there a way to create and use macros in VB 6?
Not directly. VB6 "addins" are the way to go to execute custom code integrated to the IDE and handle many mundane tasks. For example, our company wrote a VB addin that does some standards checking when forms are saved.
Addins have a bit of a learning curve to be properly implemented. I've had problems because I wasn't careful about properly handling the life cycle of my addin.
|
|
|
|
|
Thanks. That is what I was afraid of. Of course, they wouldn't want to make it easy.;)
|
|
|
|
|
I have seen C++ and C# examples but they are way to complex for this newcomer to vb.net. Does anybody have a sample project that I could learn from?
TIA
Gerry
|
|
|
|
|
I guess I should clarify that I can place the OpenFileDialog on the form, but my problem is first how to make it come up when I click on e button, and secondly I need to have multiple files selected go into an array.
Thanks.
Gerry
|
|
|
|
|
OK, so I have found OpenFileDialog() and .ShowDialog() and I can copy the results to a listbox for display.
Now the next question is "how do I find the directory name where the files were selected from?" I prefer not to parse it from one of the listbox entries.
Thanks,
Gerry
|
|
|
|
|
If all you want to do is browse for a folder, try this:
http://www.codeguru.com/vb/articles/1864.shtml[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
See my replies (with more info) to myself.
I have discovered over the last few days how to browse to the folder, select files, copy them to a listbox, and then process the files from the listbox.
When I have time this weekend, I will post the project on http://files.danen.org/h/prg_vbnet.shtml for everyone's benefit.
Thanks for your response.
Gerry
|
|
|
|