15,886,812 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Retro617 (Top 6 by date)
Retro617
24-Jul-14 13:32pm
View
OK, figured out that it has to be the starting form. I tested it by switching the run application in Program.cs
Retro617
24-Jul-14 13:26pm
View
It is a built in object/function call.
Retro617
24-Jul-14 13:16pm
View
No, it is a separate form. it is a form where you click on the run button and the form I want to show shows. but every time I click the minimize button the application stops. Very frustrating to say the least :)
Retro617
24-Jul-14 12:13pm
View
I have a form that I open before the main form, I close that form on a button click and showdialog() for the form I am working in. I can only think that there is something wrong with the wait it is being handled there.
webServer ws = new webServer();
this.Visible = false;
ws.ShowDialog();
this.Close();
Retro617
11-Jul-14 12:02pm
View
Thank you George. You are right my question was terribly vague. So this is what I want to do, I am creating a back up program. I found the only way to get the file names from all the sub directories was to create a function call to my ShowAllFolders(). Inside of that I created a queue so that I do not have to wait forever for the files to be searched. A basic in and out if you will.
At this point I want to show the file names being queued in my status strip label(which I have created). Unfortunately, the status strip is not available to write to, I will put the threee functions I want to work together with here:
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
// System.Threading.Thread.Sleep(60000);
foreach(string s in Directory.GetLogicalDrives())
{
ShowAllFoldersUnder(s, 0);
}
}
public static void ShowAllFoldersUnder(string path, int indent)
{
workingFolder localWorkingFolder;
Queue folderListQueue = new Queue();
int keyCounter = 0;
try
{
foreach (string folder in Directory.GetDirectories(path))
{
localWorkingFolder.completeWorkingPath = folder;
folderListQueue.Enqueue(localWorkingFolder);
Console.WriteLine("Count of Items in the Queue: " + folderListQueue.Count);
Console.WriteLine("{0}{1}", new string(' ', indent), Path.GetFullPath(folder));
localWorkingFolder = (workingFolder)folderListQueue.Dequeue();
string PathToSearch = localWorkingFolder.completeWorkingPath;
//Console.WriteLine(localWorkingFolder);
try
{ foreach(string f in Directory.GetFiles(PathToSearch,"*.*"))
{
UpdateStatus(f);
Console.WriteLine(f);
}
}
catch (System.Exception excpt)
{
Console.WriteLine(excpt.Message);
}
ShowAllFoldersUnder(folder, +2);
keyCounter++;
}
}
catch (UnauthorizedAccessException) { }
Console.WriteLine("There were " + keyCounter + " files to be searched");
}
public static void UpdateStatus(string fileSearched)
{
string updatedFile = fileSearched;
//MessageBox.Show(updatedFile);
return;
}
Retro617
11-Jul-14 12:02pm
View
Thank you George. You are right my question was terribly vague. So this is what I want to do, I am creating a back up program. I found the only way to get the file names from all the sub directories was to create a function call to my ShowAllFolders(). Inside of that I created a queue so that I do not have to wait forever for the files to be searched. A basic in and out if you will.
At this point I want to show the file names being queued in my status strip label(which I have created). Unfortunately, the status strip is not available to write to, I will put the threee functions I want to work together with here:
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
// System.Threading.Thread.Sleep(60000);
foreach(string s in Directory.GetLogicalDrives())
{
ShowAllFoldersUnder(s, 0);
}
}
public static void ShowAllFoldersUnder(string path, int indent)
{
workingFolder localWorkingFolder;
Queue folderListQueue = new Queue();
int keyCounter = 0;
try
{
foreach (string folder in Directory.GetDirectories(path))
{
localWorkingFolder.completeWorkingPath = folder;
folderListQueue.Enqueue(localWorkingFolder);
Console.WriteLine("Count of Items in the Queue: " + folderListQueue.Count);
Console.WriteLine("{0}{1}", new string(' ', indent), Path.GetFullPath(folder));
localWorkingFolder = (workingFolder)folderListQueue.Dequeue();
string PathToSearch = localWorkingFolder.completeWorkingPath;
//Console.WriteLine(localWorkingFolder);
try
{ foreach(string f in Directory.GetFiles(PathToSearch,"*.*"))
{
UpdateStatus(f);
Console.WriteLine(f);
}
}
catch (System.Exception excpt)
{
Console.WriteLine(excpt.Message);
}
ShowAllFoldersUnder(folder, +2);
keyCounter++;
}
}
catch (UnauthorizedAccessException) { }
Console.WriteLine("There were " + keyCounter + " files to be searched");
}
public static void UpdateStatus(string fileSearched)
{
string updatedFile = fileSearched;
//MessageBox.Show(updatedFile);
return;
}Thank you George. You are right my question was terribly vague. So this is what I want to do, I am creating a back up program. I found the only way to get the file names from all the sub directories was to create a function call to my ShowAllFolders(). Inside of that I created a queue so that I do not have to wait forever for the files to be searched. A basic in and out if you will.
At this point I want to show the file names being queued in my status strip label(which I have created). Unfortunately, the status strip is not available to write to, I will put the threee functions I want to work together with here:
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
{
// System.Threading.Thread.Sleep(60000);
foreach(string s in Directory.GetLogicalDrives())
{
ShowAllFoldersUnder(s, 0);
}
}
public static void ShowAllFoldersUnder(string path, int indent)
{
workingFolder localWorkingFolder;
Queue folderListQueue = new Queue();
int keyCounter = 0;
try
{
foreach (string folder
Show More