|
What does Win32_CDROMDrive.MaxMediaSize and Win32_CDROMDrive.MaxMediaSize return?
जय हिंद
|
|
|
|
|
That's the thing: It returns Nothing. I'm using the following code:
Dim driveMedia As New ManagementObjectSearcher("Select * From Win32_CDROMdrive")
For Each mo As ManagementObject In driveMedia.Get()
Debug.WriteLine(mo.GetPropertyValue("MaxMediaSize"))
Next
Seems right to me..?
Motivation is the key to software development.
|
|
|
|
|
Code below works fine for me. "Size" will be returned ONLY if there is a DVD in the slot.
ManagementObjectSearcher o = new ManagementObjectSearcher("select * from win32_cdromdrive");
foreach (ManagementObject obj in o.Get()) {
string s = obj.GetText(TextFormat.Mof);
}
Hope this helps.
जय हिंद
|
|
|
|
|
You can do it by using FileSystemObject
Dim _oFSO = CreateObject("Scripting.FileSystemObject")
Dim _oDrive = _oFSO.GetDrive("G:")
MessageBox.Show(_oDrive.TotalSize)
hth
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
No, this returns the used size of the cd and not the total capacity. By total capacity I mean for a CD ~ 700 MB, and for a DVD ~4.7 GB etc. I have to know this because I have to calculate for how many percent a cd is used. (Used space / Total Capacity) * 100. Any other ideas, maybe?
Thanks for your reply, though!
Motivation is the key to software development.
|
|
|
|
|
Just a thought, and post back please if you succeed because I am interested.
Check this solution Get Total Free Space Drive[^]
I have Vista and Nero with InCD Installed and I had tried over a dozen of code to get the capacity of the CD/DVD and I am getting an error.
Is that your case also?
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Nope, this example did not work aswell, because a CD never has any free space. The maximumsize is simply the size of the data burnt on the cd/dvd.. And yes, this is my case aswell. I can't find ANY solution on how to determine the real capacity of a DVD or CD nor can I find a solution on how to see whether the inserted medium is a DVD or CD. I'm totally stuck..
Cheers,
Zaegra
Motivation is the key to software development.
|
|
|
|
|
Hi All,
Recently i upgraded my vb.net 2005 application to vb.net 2008 and facing a problem.
i have used crystal reports as reporting tool. it works fine in current and earlier.
when see a report it also works fine but when i closed it and open another win form not having crystal reports the MainMenu goes missing. i could not understand why it is happened.
i am using (Vista 64 bit).
kindly help me.
Thanks in advance
rmshah
Developer
|
|
|
|
|
I would like to show a sample of a Font from an uninstalled Font file.
|
|
|
|
|
Hi,
I haven't used it yet but AFAIK .NET provides a PrivateFontCollection class for such purposes.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
Thank you very much
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Every human being on this planet (with even the tiniest brain) knows that AFAIK means "As Far As I Know". You see, when answering to replies like this, it discourages people to ever post again, because all they'll get is a bunch of crap. Please reconsider before you post like this. Your reply to the question was nice, though.
Motivation is the key to software development.
|
|
|
|
|
Hi Zaegra,
that's what I hate in thouse forums, the respectless way of talking to each other. I did not know the term AFAIK and did, by missreding it as AFAIK.NET (without the space) that sounded to me as a f***ing werid library, that I did not know either. Google on AFAIK.NET (without the space) did not result in anything... So please treat others, the way you would be treaten.
Regards: Didi
|
|
|
|
|
Now your busting me for what you did wrong?
Motivation is the key to software development.
|
|
|
|
|
no, just for your arogance
|
|
|
|
|
i have created the whole chat application containing server and clients and smiles and everything like msn now the problem is that while i was testing locally and on computers in my network it worked but when i tried to connect from outside over internet all my dreams to publish this application felt... can anyone help me with that? i tried everything searching on internet for solutions, port forwarding all i tried
Thanks!!!
|
|
|
|
|
can you connect to anything else on your computer from outside? I would try to find a solution with a trained network-admin.
Regards: Didi
|
|
|
|
|
wow fast response i didn't expect that heheh
yes i can connect remote, i run my machine as server i have site hosted on my machine all works fine...
|
|
|
|
|
How do you identify the machine you want to chat with?
are you using a public IP address? over the Internet IP addresses are different from your local IP addresses. And they vary over time.
See e.g. here[^].
A more expensive Internet subscription may yield a static IP, an address that is constant over time.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i use public ip's...
|
|
|
|
|
i did it it is working now!!! ahhhhhhhhh finally...
don't laugh:
i was using port 8088 before, for my older application
so probably two applications was killing each other...
well thank you anyway...
now my other problem to solve is static ip, i have no money to pay for it i will do some HTTP requests to read ip and then connect to given ip...
|
|
|
|
|
Hi All,
Actually i am trying to send attachments by using System.Net.Mail.SmtpClient.Sometimes the Timeout error is generate.
So please suggest me what is best timeout intervel for sending 10 mb data.
Thanks in advanced
If you can think then I Can.
|
|
|
|
|
There is no "best timeout". Since the users connection speed can vary greatly, any timeout you can come up with would be pointless if the users connection slows down.
|
|
|
|
|
Hi,
You need a variable timeout.
I would experiment sending mail manually with different attachment sizes, and note the times it takes (say for 1MB and 100MB).
Then I would set up a linear timeout, with a minimum and a safety factor, say
3*(t1MB + t100MB * actualTotalSize/100MB) .
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|