|
-
Nov 9th, 2007, 02:07 AM
#1
Thread Starter
Hyperactive Member
enter network password
hello!
how enter network username and password?
tnx a lot
*****************
VB6,PHP,VS 2005
-
Nov 9th, 2007, 07:20 AM
#2
Re: enter network password
What network?
Are you talking about the Windows OS username and password?
-
Nov 9th, 2007, 07:14 PM
#3
Thread Starter
Hyperactive Member
Re: enter network password
i'm talking about the network shared folder, anyways i already got
the solution using MAP DRIVE below are codes.
protected void button3_Click_1(object sender, System.EventArgs e){
NetworkDrive oNetDrive = new NetworkDrive();
zUpdateStatus("Mapping drive...");
try{
//set propertys
oNetDrive.Force = this.conForce.Checked;
oNetDrive.Persistent = this.conPersistant.Checked;
oNetDrive.LocalDrive = txtDrive.Text;
oNetDrive.PromptForCredentials = conPromptForCred.Checked;
oNetDrive.ShareName = txtAddress.Text;
oNetDrive.SaveCredentials = conSaveCred.Checked;
//match call to options provided
if(txtPassword.Text==""&&txtUsername.Text==""){
oNetDrive.MapDrive();
}else if(txtUsername.Text==""){
oNetDrive.MapDrive(txtPassword.Text);
}else{
oNetDrive.MapDrive(txtUsername.Text,txtPassword.Text);
}
//update status
zUpdateStatus("Drive map successful");
}catch(Exception err){
//report error
zUpdateStatus("Cannot map drive! - "+err.Message);
MessageBox.Show(this, "Cannot map drive!\nError: "+err.Message);
}
oNetDrive = null;
}
private void button4_Click(object sender, System.EventArgs e){
NetworkDrive oNetDrive = new NetworkDrive();
zUpdateStatus("Unmapping drive...");
try{
//unmap the drive
oNetDrive.Force = conForce.Checked;
oNetDrive.LocalDrive = txtDrive.Text;
oNetDrive.Persistent = this.conPersistant.Checked;
oNetDrive.UnMapDrive();
//update status
zUpdateStatus("Drive unmap successful");
}catch(Exception err){
//report error
zUpdateStatus("Cannot unmap drive! - "+err.Message);
MessageBox.Show(this, "Cannot unmap drive!\nError: "+err.Message);
}
oNetDrive = null;
}
*****************
VB6,PHP,VS 2005
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|