Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

AddBackslash - Append a backslash to a path if needed
Total Hit (4183) «Code LangId=2» ' Append a backslash (or any character) at the end of a path ' if it isn't there already Function AddBackslash(ByVal Path As String, Optional ByVal ch As Char = "\"c) _ As String If Not Path.EndsWith(ch) Then AddBackslash = Path & ch Else AddBack ....Read More
Rating
ChangeFileExtension - Modify the extension in a file name
Total Hit (3017) «Code LangId=2» ' Change the extension of a file name ' if the last argument is True, it adds the extension even if the file doesn't ' have one Function ChangeFileExtension(ByVal FileName As String, _ ByVal Extension As String, Optional ByVal AddIfMissing As Boolean = False) _ As St ....Read More
Rating
CompareFiles - Comparing two binary/text files
Total Hit (2837) «Code LangId=2»' Returns a boolean indicating whether two files are equal ' Example: Debug.WriteLine(CompareFiles("D:\File1.mdb", "D:\File2.mdb")) Function CompareFiles(ByVal path1 As String, ByVal path2 As String) As Boolean Dim file1 As New System.IO.FileInfo(path1) Dim file2 As New ....Read More
Rating
ConcatenateFiles - Concatenating multiple text files
Total Hit (2909) «Code LangId=2» ' Concatenate a variable number of text files into a single result file ' ' Params: ' - resultFile: the complete path of the result file you want to create ' - header: a string that is written when a file is added to the result file. ' Note: this string can contain the #Fi ....Read More
Rating
CopyDirectory - Copy a directory
Total Hit (3118) «Code LangId=2» ' Copies a source directory to the destination directory. ' The last parameter specifies whether the files already present in the ' destination directory will be overwritten ' - Note: requires Imports System.IO ' - Usage: CopyDirectory("C:\Misc", "D:\MiscBackup") Sub CopyDire ....Read More
Rating
FolderHasFiles - Returns whether the specified folder has files
Total Hit (2754) «Code LangId=2» ' Returns a boolean indicating whether the specified folder has files Function FolderHasFiles(ByVal folderPath As String) As Boolean Return System.IO.Directory.GetFiles(folderPath).Length > 0 End Function «/Code»
Rating
FolderHasSubFolders - Returns whether the specified folder has sub-folders
Total Hit (2782) «Code LangId=2» ' Returns a boolean indicating whether the specified folder has sub-folders Function FolderHasSubFolders(ByVal folderPath As String) As Boolean Return System.IO.Directory.GetDirectories(folderPath).Length > 0 End Function «/Code» ....Read More
Rating
GetDirectorySize - Calculate the size of a directory
Total Hit (2875) «Code LangId=2» ' Returns the size of the specified directory ' - Note: requires Imports System.IO ' - Usage: Dim DirSize As Long = GetDirectorySize("D:\Projects") Function GetDirectorySize(ByVal DirPath As String) As Long Dim DirSize As Long Dim Dir As DirectoryInfo = New DirectoryInfo( ....Read More
Rating
GetResourceContent - Retrieving the content of an embedded text file
Total Hit (2734) «Code LangId=2» ' Retrieve the content of an embedded text file ' Note: the file must be included in the project as an embedded resource. ' - after adding the file to the project set its Build Action property to ' Embedded Resource ' ' Example: txtScript.Text = GetResourceContent("script.sql ....Read More
Rating
IsDriveReady - Returns whether a drive is ready
Total Hit (3240) «Code LangId=2» ' Returns a boolean indicating whether a given drive is ready ' Example: check if the floppy disk drive is ready ' Debug.WriteLine(IsDriveReady("a")) Function IsDriveReady(ByVal driveLetter As String) As Boolean If driveLetter.Length = 1 Then driveLetter &= ":\" Dim ....Read More
Rating
IsExecutableFile - Returns whether the file is an executable
Total Hit (2769) «Code LangId=2» ' Returns a boolean indicating whether the file is an executable Function IsExecutableFile(ByVal filePath As String) As Boolean ' add more extensions if you wish Dim extensions() As String = New String() {".exe", ".bat", ".com", ".pif"} ' return true if the extension ....Read More
Rating
IsImageFile - Returns whether the file is an image
Total Hit (3757) «Code LangId=2» ' Returns a boolean indicating whether the file is an image Function IsImageFile(ByVal filePath As String) As Boolean ' add more extensions if you wish Dim extensions() As String = New String() {".bmp", ".jpg", ".jpeg", ".gif", _ ".tif", ".tiff", ".png", ".tga", ....Read More
Rating
IsValidPath - Validating a system path
Total Hit (4669) «Code LangId=2»' Validate a system path ' Example: ' MessageBox.Show(IsValidPath("C:\Test\Memo.txt")) ' => True ' MessageBox.Show(IsValidPath("\\RemotePC\Test\Memo.txt")) ' => True ' MessageBox.Show(IsValidPath("C:\Test\Mem|o.txt")) ' => False Function IsValidPath(ByVal p ....Read More
Rating
LoadTextFile - Load the contents of a text file
Total Hit (2872) «Code LangId=2» ' Returns the content of the specified text file ' Note: it can throw an exception ' Usage: Dim FileContent As String = LoadTextFile("C:\Autoexec.bat") Function LoadTextFile(ByVal FilePath As String) As String Dim sr As System.IO.StreamReader Try sr = New ....Read More
Rating
SaveTextFile - Save or append text to a file
Total Hit (3734) «Code LangId=2» ' Saves a text file. If the destination file already exists, ' its content can be replaced, or the new content can be appended ' at the end of the file, according to the last parameter ' Note: the destination directory must exist, otherwise the file is not ' saved and th ....Read More
Rating
SearchFileInDirTree - Searches a file on a directory tree
Total Hit (2924) «Code LangId=2» <System.Runtime.InteropServices.DllImport("imagehlp.dll")> Shared Function _ SearchTreeForFile(ByVal rootPath As String, ByVal inputPathName As String, _ ByVal outputPathBuffer As System.Text.StringBuilder) As Boolean End Function ' Returns the complete path+name of th ....Read More
Rating
SearchFileOnPath - Searching a file on the system
Total Hit (2783) «Code LangId=2»<System.Runtime.InteropServices.DllImport("kernel32")> Shared Function _ SearchPath(ByVal tartPath As String, ByVal fileName As String, _ ByVal extension As String, ByVal bufferLength As Integer, _ ByVal buffer As System.Text.StringBuilder, ByVal filePart As String) As ....Read More
Rating
GotoPreviousWindow - A macro to jump to the previously selected window
Total Hit (2762) «Code LangId=2»' This macro routine makes VS.NET switch to the previously selected code editor ' / designer window, if it is still open. It is equal to opening the Windows ' menu and selecting the 2nd window. ' Note: put this routine in the MyMacro project, by using the Macro Explorer. ' To u ....Read More
Rating
AlwaysOnTheTop - Move a form on top of all other windows
Total Hit (2233) «Code LangId=1» Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, _ ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, _ ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Const SWP_NOSIZE = &H1 Const SWP_NOMOVE = &H2 Const SWP_SHOWW ....Read More
Rating
ArrayToListbox - Add an array of strings to a ListBox or ComboBox
Total Hit (4354) «Code LangId=1»Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" _ (ByVal hwndLock As Long) A ....Read More
Rating
CenterCaptionInAdodc - Center a caption on an ADODC Data control
Total Hit (1751) «Code LangId=1» ' Center caption in Adodc control ' ' Input: frmForm - Form Adodc contol in on ' datAdodc - Adodc control ' sCaption - Caption text ' ' Output: Padded Caption text Sub CenterCaptionInAdodc(ctrl As Adodc, ByVal sCaption As String) Dim lTextWidth As Long ....Read More
Rating
ComboBoxExtendedMatching - Extended Matching mode for ComboBox controls
Total Hit (1688) «Code LangId=1»' Enable extended matching to any type combobox control ' ' Extended matching means that as soon as you type in the edit area ' of the ComboBox control, the routine searches for a partial match ' in the list area and highlights the characters left to be typed. ' ' To enable thi ....Read More
Rating
ComboBoxGetDroppedControlRect - Get the size of a ComboBox dropped rectangle
Total Hit (2465) «Code LangId=1» Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Cons ....Read More
Rating
ShortPathName - Convert a long file name to 8.3 format
Total Hit (3369) «Code LangId=1»Private Declare Function GetShortPathName Lib "kernel32" Alias _ "GetShortPathNameA" (ByVal lpszLongPath As String, _ ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Const MAX_PATH = 260 ' Convert a long file/path name to a short 8.3 name ' the path m ....Read More
Rating
SynchronizeDirectories - Synchronize the contents of two directories
Total Hit (2221) «Code LangId=1»' Synchronize two directories ' ' This routine compares source and dest directories and copies files ' from source that are newer than (or are missing in) the destination directory ' if TWOWAYSYNC is True, files are synchronized in both ways ' NOTE: requires the CompareDirec ....Read More
Rating
SynchronizeDirectoryTrees - Synchronize files in two directory trees
Total Hit (2103) «Code LangId=1»' Synchronize two directory subtrees ' ' This routine compares source and dest directory trees and copies files ' from source that are newer than (or are missing in) the destination directory ' if TWOWAYSYNC is True, files are synchronized in both ways ' NOTE: requires the C ....Read More
Rating
SystemDirectory - The path of the System directory
Total Hit (1867) «Code LangId=1» Private Declare Function GetSystemDirectory Lib "kernel32" Alias _ "GetSystemDirectoryA" (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long ' The path of the System directory Function SystemDirectory() As String Dim buffer As String * 512, length As Int ....Read More
Rating
VolumeLabel - Read the label of a disk volume
Total Hit (1744) «Code LangId=1»' Return the volume label of a disk ' Pass a null string for the current disk Function VolumeLabel(drive As String) As String Dim temp As String On Error Resume Next temp = Dir$(drive, vbVolume) ' remove the period after the eigth character VolumeLabel = ....Read More
Rating
WindowsDirectory - The path of the Windows directory
Total Hit (1991) «Code LangId=1»Private Declare Function GetWindowsDirectory Lib "kernel32" Alias _ "GetWindowsDirectoryA" (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long ' Return the path of the Windows directory Function WindowsDirectory() As String Dim buffer As String * 512, lengt ....Read More
Rating
WriteToStdOutput - Write to standard output stream
Total Hit (2507) «Code LangId=1» Option Explicit Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) _ As Long Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, _ lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, _ lpNumberOfBytesWritten As L ....Read More
Rating


(Page 102 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.