Issue with using thread in my desktop Application

Hi Friends and Programmers,


I am new in C# .Net , I am working a desktop application ,in which I want functionality of cd protection . means my software will run with insert cd only without cd it won't work,,,,, for that i am using thread concept, but I am not more clear about thread concept.
[size=5]I have wrritten code [/size][color=Red][/color]
like
//for create thread
Thread workthread= new Thread(frmdimain.dowork)
workthread.start();
//my dowork function in mdiloadform like

public static dowork()
{
if(checkcd()==false)
{
message("cd not found");
}
else
{
thread.sleep(1000);
message("currently cd in disk");

}
}
but abter tread .sleep message is not coming .....
[size=5][/size]PLZ help me I want ,message should print after every 1 minute,PLZ help me.......

Comments

  • Hi Sushila!

    It is very hard to get what u were saying. However, u said
    that u want to make something like, "whenever a CD containing
    your software is inserted in the system, it will automatically
    run your software". Well, for that u need "AutoRun". This
    is a must in every software disk (not in the downloaded
    ones). U will have to create an Autorun for your software.

    Here is an URL on how to do that: http://support.microsoft.com/kb/818804

    Remember *Dont copy my words again like "Issue with..." and
    "Hello Friends and programmers..."

    Happy Programming!
  • thanks AUTORUN IS WORKING.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories