Your loader program (containing Main()) would handle the passage of data.
So it would sit in a while loop looking to see if there is something to move out of the first thread. If there is, then it moves it to the second thread and that thread does it's thing.
You could use the get; set; logic for the payload in thread one to change the state for notifying the Main() process.
private DataClass mydataload;
public DataClass PayLoad
dataAvailable = false;
PayLoad = value; }
This snippet can be supported in both threads. Your Main() thread checks the state of available data in thread one. Thread two in it's main loop checks it's own state for DataAvailable.
I've finished a windows application and started creating a setup project (VS 2005). Everything works fine: application gets installed and links in startmenu are created. But I don't know how to create a link for uninstallation of my application in the startmenu.? Searched MSDN but without any luck.
Hi, I'm having a problem with this. I don't know why it could be. I'm trying to access a file in a directory located in the bin/Debug or bin/Release folder of the c#.net 2003 project. I access it like this:
string file = "Folder1\\Folder2\\File.ext";
where the folder is located, as I said, in ProjectFolder\bin\Debug or ProjectFolder\bin\Release
¿When I access this folder, why is the DirectoryNotFoundException thrown?
Why if I put these folders into ProjectFolder\ and accessing with:
When you're using relative paths, you always have to be sure what's the current directory of the application.
You should NEVER assume anything regarding on what the current directory is, even showing an OpenFileDialog can change the current directory!
If you need a directory relative to your exe, you should use Application.StartupPath and build the path from there.
-- Black holes are the places where god divided by 0...
As you see from the behaviour, this structure IS a valid path but you obviously do not know why. When you add ..\..\ you are telling File that you are accessing a folder relative to the current directory. In this case the Debug or Release folder of your application.
Follow the other suggestion and append your path with your Application ExecutablePath
I set my projects up to use an external directory structure (out side of the project\\bin\\..).
For example, inside my code I will setup some directory strings as the path to certain folders.
GetCurrentDirectory() + "\\Data\\" is where I would store my database.
GetCurrentDirectory() + "\\Art\\" is where I store my art files.
To set this up, inside the .NET project properties set the Output Pathto ..\\Folder\
i am accessing visio's objects programmatically. I am able to know that in a page how many shape are there and what type of shapes are they. Now I want is to know that class object(s) in a window posses how many properties, Method, className etc. I am able to find out the descricption of process, doc, terminator etc. info. But problem with class object is it contains data in row format. plz do reply soon.
I am experimenting with threading and I made the following simple program:
Thread blue = new Thread(new ThreadStart(bluebegin) );
Thread yellow = new Thread(new ThreadStart(yellowbegin) );
Thread red = new Thread(new ThreadStart(redbegin) );
public void bluebegin()
this.BackColor = Color.Blue;
public void yellowbegin()
this.BackColor = Color.Yellow;
public void redbegin()
this.BackColor = Color.Red;
I don´t know how to stop one or all threads. I have tried adding to one of the methods : blue.Abort(); but then I am told that the namespace blue could not be found. Can someone please help me?