VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



'Set Current directory using SetCurrentDirectory API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

'Set Current directory using SetCurrentDirectory API

API Declarations


Private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Rate 'Set Current directory using SetCurrentDirectory API



'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Private Sub Form_Load()
Dim cwd As String
Dim length As Long
SetCurrentDirectory "C:\karthik"
cwd = Space(128)
length = GetCurrentDirectory(128, cwd)
cwd = Left(cwd, length)
MsgBox cwd
End
End Sub

Download this snippet    Add to My Saved Code

'Set Current directory using SetCurrentDirectory API Comments

No comments have been posted about 'Set Current directory using SetCurrentDirectory API. Why not be the first to post a comment about 'Set Current directory using SetCurrentDirectory API.

Post your comment

Subject:
Message:
0/1000 characters