Quick Search for:  in language:    
Connects,Disconnects,Network,Drives,from,your
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 115. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Encryption Decryption Demo
By Nikhil Raj on 6/30


Click here to see a screenshot of this code!Serial Registration
By Christian (eXonite Team) on 6/30

(Screen Shot)

Click here to see a screenshot of this code!Danger:Can pc kill me? interesting article
By Xasan on 6/30

(Screen Shot)

AniViewer
By Jerrame Hertz on 6/30


Click here to see a screenshot of this code!Raw Packet Sniffer
By Coding Genius on 6/30

(Screen Shot)

Check the support of a record set
By Freebug on 6/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Connect, Disconnect Networks Drives ( EASILY )

Print
Email
 

Submitted on: 6/27/1999
By: MASTER VB PROGRAMMER 
Level: Not Given
User Rating: By 101 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 14434 times.
 
 
     Connects and Disconnects Network Drives from your System
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

'**************************************
' Name: Connect, Disconnect Networks Dri
'     ves ( EASILY )
' Description:Connects and Disconnects N
'     etwork Drives from your System
' By: MASTER VB PROGRAMMER
'
'This code is copyrighted and has' limited warranties.Please see http://w
'     ww.Planet-Source-Code.com/vb/scripts/Sho
'     wCode.asp?txtCodeId=2209&lngWId;=1'for details.'**************************************

Private Sub cmdConnect_Click()

Dim x As Long If Index = 0 Then x = WNetConnectionDialog(Me.hwnd, RESOURCETYPE_DISK) End If
End Sub
Private Sub cmdDisconnect_Click()
If Index = 1 Then x = WNetDisconnectDialog(Me.hwnd, RESOURCETYPE_DISK) End If
End Sub

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
6/27/1999 8:43:00 PM:Brenda
This is very kewl programming!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/28/1999 7:01:00 PM:Helgi Rudd
Works well... right on!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/5/1999 1:44:00 AM:Conrad
Not bad,  simple but very 
usefull
Thanxs
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/5/1999 1:53:00 AM:Conrad
Me again, 
Question : Is there a way 
of connecting a drive without prompting 
the user??
Thanxs
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/6/1999 8:29:00 AM:Nick
Easy, instead of putting the 
code:
Private Sub 
cmdConnect_Click()
Dim x As Long
If 
Index = 0 Then
x = 
WNetConnectionDialog(Me.hwnd, 
RESOURCETYPE_DISK)
End If
End 
Sub
****************Put**************
*
Private Sub Form_Load()
Dim x As 
Long
If Index = 0 Then
x = 
WNetConnectionDialog(Me.hwnd, 
RESOURCETYPE_DISK)
End If
End Sub
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/6/1999 6:53:00 PM:SlimFlem
The API calls are good. However, if you 
could post code that was complete and 
accurate, it would be nice.  The 
command buttons are not control arrays 
in the sample code and variable x is 
not declared for disconnect.  You might 
want to change your name to something 
else.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/9/1999 10:18:00 PM:Aaron
this wont work for me.  The 
Public Const RESOURCETYPE_DISK = &H1 
turns red and gives me an error
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/16/1999 5:37:00 PM:Mo
If you need to know how to connect the 
drive without the resulting error msg 
for the user then e-mail me & I will 
send u my simple project. It works !
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/17/1999 9:51:00 AM:Tenox
This looks great, but does it 
automatically
find the next available 
drive letter?  Either way,
is there a 
way to find next avail drive 
independently?
Thanks,   /ts
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/26/1999 12:23:00 PM:Gilad Shulkin
Aaron, you should put 
 Public Const 
RESOURCETYPE_DISK = &H1 
into 
separate module (actually it always a 
good idea to take constants out of the 
form code). Good Luck
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/27/1999 8:18:00 AM:Nana
Work nice but one question is there any 
way in VB that we can right the script 
to change the CDROM drive and than 
restart the computer.  If u know 
something like that Please e-mail me 
Thank YOu
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.