Click here to Skip to main content
16,004,854 members
Home / Discussions / C#
   

C#

 
AnswerRe: Splash Screen in C# for Beginners - Intermediate Pin
Christian Graus20-Oct-07 14:39
protectorChristian Graus20-Oct-07 14:39 
QuestionRe: Splash Screen in C# for Beginners - Intermediate Pin
andyr200520-Oct-07 23:05
andyr200520-Oct-07 23:05 
AnswerRe: Splash Screen in C# for Beginners - Intermediate Pin
Tobias Schoenig21-Oct-07 19:25
Tobias Schoenig21-Oct-07 19:25 
Questionaccept only numbers Pin
kabutar20-Oct-07 2:09
kabutar20-Oct-07 2:09 
AnswerRe: accept only numbers Pin
Giorgi Dalakishvili20-Oct-07 2:15
mentorGiorgi Dalakishvili20-Oct-07 2:15 
GeneralRe: accept only numbers Pin
kabutar20-Oct-07 2:18
kabutar20-Oct-07 2:18 
GeneralRe: accept only numbers Pin
Giorgi Dalakishvili20-Oct-07 2:22
mentorGiorgi Dalakishvili20-Oct-07 2:22 
QuestionFind available drives in windows vista Pin
Maxim Rubchinsky20-Oct-07 1:17
Maxim Rubchinsky20-Oct-07 1:17 
Hello,
I wrote the following code to get a list of available drives letters:

<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.IO;<br />
<br />
namespace drives<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            // build a List<int> representing the ASCII values of all drives<br />
            int intFirstDrive = Convert.ToInt32('A');<br />
            int intLastDrive = Convert.ToInt32('Z');<br />
            List<int> intAvailableDrives = new List<int>();<br />
            for (int i = intFirstDrive; i <= intLastDrive; i++)<br />
            {<br />
                intAvailableDrives.Add(i);<br />
            }<br />
<br />
            // get all current drives<br />
            DriveInfo[] usedDrives = DriveInfo.GetDrives();<br />
            int x = usedDrives.Length;<br />
<br />
            // remove used drives<br />
            foreach (DriveInfo usedDrive in usedDrives)<br />
            {<br />
                int intUsedDrive;<br />
                string strUsedDrive;<br />
                char chrUsedDrive;<br />
                strUsedDrive = usedDrive.Name.Substring(0, 1);<br />
                chrUsedDrive = Convert.ToChar(strUsedDrive);<br />
                intUsedDrive = Convert.ToInt32(chrUsedDrive);<br />
                intAvailableDrives.Remove(intUsedDrive);<br />
            }<br />
<br />
            // convert the ASCII values of the available drives to string<br />
            List<string> strAvailableDrives = intAvailableDrives.ConvertAll<string>(delegate<br />
                (int intDrive)<br />
                {<br />
                    return Convert.ToChar(intDrive).ToString();<br />
                });<br />
        }<br />
    }<br />
}<br />


but it seems that in windows vista DriveInfo.GetDrives() doesn't get network drives, is there something I can do about it?
AnswerRe: Find available drives in windows vista Pin
ekynox20-Oct-07 12:49
ekynox20-Oct-07 12:49 
QuestionProperties Window in windows programming~ [modified] Pin
SeeBees20-Oct-07 0:17
SeeBees20-Oct-07 0:17 
AnswerRe: Properties Window in windows programming~ Pin
Anthony Mushrow20-Oct-07 3:39
professionalAnthony Mushrow20-Oct-07 3:39 
GeneralRe: Properties Window in windows programming~ Pin
SeeBees20-Oct-07 12:56
SeeBees20-Oct-07 12:56 
QuestionDate Format Pin
mpavas19-Oct-07 23:29
mpavas19-Oct-07 23:29 
AnswerRe: Date Format Pin
Luc Pattyn20-Oct-07 0:11
sitebuilderLuc Pattyn20-Oct-07 0:11 
AnswerRe: Date Format Pin
Guffa20-Oct-07 1:05
Guffa20-Oct-07 1:05 
GeneralRe: Date Format Pin
mpavas20-Oct-07 1:06
mpavas20-Oct-07 1:06 
QuestionHow To Load Assembly Pin
Mohamed Yahia19-Oct-07 23:06
Mohamed Yahia19-Oct-07 23:06 
QuestionHow to do network Diagnostic Pin
jason_mf19-Oct-07 22:43
jason_mf19-Oct-07 22:43 
QuestionRegex -- Replace first match only? Pin
bs999919-Oct-07 18:20
bs999919-Oct-07 18:20 
AnswerRe: Regex -- Replace first match only? Pin
Guffa19-Oct-07 20:46
Guffa19-Oct-07 20:46 
QuestionDrag Event Pin
MasterSharp19-Oct-07 14:55
MasterSharp19-Oct-07 14:55 
AnswerRe: Drag Event Pin
Ravi Bhavnani19-Oct-07 16:39
professionalRavi Bhavnani19-Oct-07 16:39 
GeneralRe: Drag Event Pin
MasterSharp19-Oct-07 16:50
MasterSharp19-Oct-07 16:50 
AnswerRe: Drag Event Pin
Ravi Bhavnani19-Oct-07 16:57
professionalRavi Bhavnani19-Oct-07 16:57 
AnswerRe: Drag Event [modified] Pin
Mike Hankey20-Oct-07 10:33
mveMike Hankey20-Oct-07 10:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.