Results 1 to 3 of 3

Thread: enter network password

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    enter network password

    hello!
    how enter network username and password?

    tnx a lot
    *****************
    VB6,PHP,VS 2005

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: enter network password

    What network?

    Are you talking about the Windows OS username and password?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    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
  •  



Click Here to Expand Forum to Full Width