Member Avatar for nssltd

Hi well recently i have had people IE parents and brothers reading files on my memory stick, reading my homework personal files and saved chat history. i worked on an application to stop them. I'm fine with the password part but what i'm stuck on is if the password is wrong or the user clicks cancel, how do i exit the F:\ window? also ill need to assign it a name because the drive name is different on every PC how could i do this?

any help is much appreciated

(NSSLTD);

why don't you post your code?

Member Avatar for nssltd

because im sure most people who have even dabbled in c# know this.

if(this.textbox1.text == "password")
{ frm1 fm = new frm1();
fm.show
this.hide();
}else{
MessageBox.show("incorrect...");
Application.Exit();
}

Thats the only bits so far that i have done because im stuck on signing my usb the drive R to every computer i use and i need to know how to kill that window if the password is incorrect. i know neither of those things and thats why i am asking for help.

If you know the exact name of the process, it is possible to use "TASKKILL" command to terminate a process.

Member Avatar for nssltd

Its not exactly a process its an explorer window called F:\. I want to know how to kill that explorer window and how to assign it the name of drive F:\ to every computer it gets plugged in to.

Oh ok, thats easy, You can assign your USB a specific disk name, for example Y or Z. In other words the letters which are not generally used. You dont need any programming for it. You can search it online, windows allows you to configure your USB in such a way.

While for window problem, try this:

this->Close();

This code is inside an event for a button. And when the button is clicked the form exits or disappears. Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.