<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2521209771908466924</id><updated>2011-04-21T17:01:27.802-07:00</updated><title type='text'>Free Visual Basic</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-2572445630732745517</id><published>2009-02-05T19:08:00.001-08:00</published><updated>2009-02-05T19:12:11.125-08:00</updated><title type='text'>Word Wrap</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Using Visual Basic to word wrap :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Function WordWrap$ (St$, Length)&lt;br /&gt;&lt;br /&gt;'-- This function converts raw text into CRLF delimited lines.&lt;br /&gt;    Length = Length + 1&lt;br /&gt;    St$ = Trim$(St$)&lt;br /&gt;    Cr$ = Chr$(13)&lt;br /&gt;    Crlf$ = Chr$(13) &amp;amp; Chr$(10)&lt;br /&gt;    Do&lt;br /&gt;        L = Len(NextLine$)&lt;br /&gt;        S = InStr(St$, " ")&lt;br /&gt;        C = InStr(St$, Cr$)&lt;br /&gt;        If C Then&lt;br /&gt;            If L + C &lt;= Length Then&lt;br /&gt;                Text$ = Text$ &amp;amp; NextLine$ &amp;amp; Left$(St$, C)&lt;br /&gt;                NextLine$ = ""&lt;br /&gt;                St$ = Mid$(St$, C + 1)&lt;br /&gt;                GoTo LoopHere&lt;br /&gt;            End If&lt;br /&gt;        End If&lt;br /&gt;        If S Then&lt;br /&gt;            If L + S &lt;= Length Then&lt;br /&gt;                DoneOnce = True&lt;br /&gt;                NextLine$ = NextLine$ &amp;amp; Left$(St$, S)&lt;br /&gt;                St$ = Mid$(St$, S + 1)&lt;br /&gt;            ElseIf S &gt; Length Then&lt;br /&gt;                Text$ = Text$ &amp;amp; Crlf$ &amp;amp; Left$(St$, Length)&lt;br /&gt;                St$ = Mid$(St$, Length + 1)&lt;br /&gt;            Else&lt;br /&gt;                Text$ = Text$ &amp;amp; NextLine$ &amp;amp; Crlf$&lt;br /&gt;                NextLine$ = ""&lt;br /&gt;            End If&lt;br /&gt;        Else&lt;br /&gt;            If L Then&lt;br /&gt;                If L + Len(St$) &gt; Length Then&lt;br /&gt;                    Text$ = Text$ &amp;amp; NextLine$ &amp;amp; Crlf$ &amp;amp; St$ &amp;amp; Crlf$&lt;br /&gt;                Else&lt;br /&gt;                    Text$ = Text$ &amp;amp; NextLine$ &amp;amp; St$ &amp;amp; Crlf$&lt;br /&gt;                End If&lt;br /&gt;            Else&lt;br /&gt;                Text$ = Text$ &amp;amp; St$ &amp;amp; Crlf$&lt;br /&gt;            End If&lt;br /&gt;            Exit Do&lt;br /&gt;        End If&lt;br /&gt;&lt;br /&gt;LoopHere:&lt;br /&gt;&lt;br /&gt;    Loop&lt;br /&gt;    WordWrap$ = Text$&lt;br /&gt;&lt;br /&gt;End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-2572445630732745517?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/2572445630732745517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/word-wrap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/2572445630732745517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/2572445630732745517'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/word-wrap.html' title='Word Wrap'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-6703556131044739777</id><published>2009-02-05T19:05:00.000-08:00</published><updated>2009-02-05T19:06:38.165-08:00</updated><title type='text'>Replace String</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Function to replace string :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Public Function ReplaceString(ByVal pString As String, ByVal Keyword As String, ByVal NewKeyWord As String) As String&lt;br /&gt;  Dim StrLen       As Integer&lt;br /&gt;  Dim StrOut       As String&lt;br /&gt;  Dim KeyPos       As Integer&lt;br /&gt;  Dim StrLenChange As Boolean&lt;br /&gt;  Dim StartPos     As Integer&lt;br /&gt; &lt;br /&gt;  ' set a few values before we go any further&lt;br /&gt;  StartPos = 1&lt;br /&gt;  StrLen = Len(pString)&lt;br /&gt; &lt;br /&gt;  ' if the word to replace and the word to replace by are different lengths, record that they are&lt;br /&gt;  If Len(Keyword) &lt;&gt; Len(NewKeyWord) Then StrLenChange = True&lt;br /&gt; &lt;br /&gt;  ' check to see where the first occurence of the keyword to replace is in the string&lt;br /&gt;  KeyPos = InStr(StartPos, pString, Keyword)&lt;br /&gt; &lt;br /&gt;  ' only do the replace loop if the keyword string is there&lt;br /&gt;  While KeyPos &gt; 0&lt;br /&gt;    ' rebuild the string, taking out the keyword and replacing it with the NewKeyword&lt;br /&gt;    pString = Left(pString, KeyPos - 1) &amp;amp; NewKeyWord &amp;amp; Mid(pString, KeyPos + Len(Keyword), StrLen - KeyPos - Len(Keyword) + 1)&lt;br /&gt;   &lt;br /&gt;    ' if the Keyword and NewKeyword as different lengths then recalc the length of the string&lt;br /&gt;    If StrLenChange Then StrLen = Len(pString)&lt;br /&gt;   &lt;br /&gt;    ' calculate the position where we should start looking to see if the KeyWord is in the string&lt;br /&gt;    StartPos = KeyPos + Len(NewKeyWord)&lt;br /&gt; &lt;br /&gt;    ' check to see where the next occurence of the keyword to replace is in the string&lt;br /&gt;    KeyPos = InStr(StartPos, pString, Keyword)&lt;br /&gt;  Wend&lt;br /&gt; &lt;br /&gt;  ' return the string&lt;br /&gt;  ReplaceString = pString&lt;br /&gt;&lt;br /&gt;End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-6703556131044739777?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/6703556131044739777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/replace-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/6703556131044739777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/6703556131044739777'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/replace-string.html' title='Replace String'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-5161277555292268687</id><published>2009-02-05T19:03:00.000-08:00</published><updated>2009-02-05T19:04:11.252-08:00</updated><title type='text'>Parse String</title><content type='html'>&lt;span style="font-weight: bold;"&gt;This code is using to parse string :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Private Sub cmdParse_Click()&lt;br /&gt;   &lt;br /&gt;    Dim colWords    As Collection   &lt;br /&gt;    Dim lngWordCount    As Long&lt;br /&gt;    Dim lngCounter      As Long&lt;br /&gt;   &lt;br /&gt;    lstResults.Clear&lt;br /&gt;   &lt;br /&gt;    Set colWords = ParseString(txtParse.Text)     &lt;br /&gt;    lngWordCount = colWords.Count&lt;br /&gt;   &lt;br /&gt;    For lngCounter = 1 To lngWordCount&lt;br /&gt;        lstResults.AddItem colWords.Item(lngCounter).Value&lt;br /&gt;        DoEvents&lt;br /&gt;    Next lngCounter&lt;br /&gt;   &lt;br /&gt;    Set colWords = Nothing&lt;br /&gt;   &lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-5161277555292268687?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/5161277555292268687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/parse-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/5161277555292268687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/5161277555292268687'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/parse-string.html' title='Parse String'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-7092234043056678150</id><published>2009-02-05T18:58:00.000-08:00</published><updated>2009-02-05T19:01:03.199-08:00</updated><title type='text'>Delay Program</title><content type='html'>Here if you want to make delay program using Visual Basic :&lt;br /&gt;&lt;br /&gt;Public Sub BKWait(HowManySecs)&lt;br /&gt;'   pause for HowManySecs seconds&lt;br /&gt;    Dim EndWait&lt;br /&gt;    EndWait = DateAdd("s", HowManySecs, Now)&lt;br /&gt;    While Now &lt; EndWait&lt;br /&gt;'   dummy text&lt;br /&gt;    Wend&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-7092234043056678150?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/7092234043056678150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/delay-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/7092234043056678150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/7092234043056678150'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/delay-program.html' title='Delay Program'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-7705433929760668999</id><published>2009-02-04T23:37:00.000-08:00</published><updated>2009-02-04T23:40:22.485-08:00</updated><title type='text'>Check String</title><content type='html'>Option Explicit&lt;br /&gt;&lt;br /&gt;Private Function IsNumber(strg As String)&lt;br /&gt;&lt;br /&gt;Dim nInt As String&lt;br /&gt;&lt;br /&gt;'Check if string contains a number&lt;br /&gt;&lt;br /&gt;If IsNumeric(strg) Then&lt;br /&gt;   nInt = Int(strg)&lt;br /&gt;&lt;br /&gt;'    Check if number is an integer&lt;br /&gt;   If strg = nInt Then&lt;br /&gt;&lt;br /&gt;'    Put your code here&lt;br /&gt;&lt;br /&gt;     MsgBox "It is an Integer number"&lt;br /&gt;&lt;br /&gt;   Else&lt;br /&gt;&lt;br /&gt;'    Put your code here&lt;br /&gt;&lt;br /&gt;     MsgBox "It is a NON Integer number"&lt;br /&gt;&lt;br /&gt;   End If&lt;br /&gt;Else&lt;br /&gt;&lt;br /&gt;'   Put your code here&lt;br /&gt;&lt;br /&gt;   MsgBox "It is NOT a number"&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;&lt;br /&gt;IsNumber Text1.Text&lt;br /&gt;&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-7705433929760668999?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/7705433929760668999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/check-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/7705433929760668999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/7705433929760668999'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/check-string.html' title='Check String'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-5627799173238809284</id><published>2009-02-04T23:28:00.000-08:00</published><updated>2009-02-05T01:40:46.049-08:00</updated><title type='text'>Read and Write INI file</title><content type='html'>&lt;span style="font-weight: bold;"&gt;This sample code how to create visual basic program to write and read ini file :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;VERSION 5.00&lt;br /&gt;Begin VB.Form frmReadAndWriteIni&lt;br /&gt;Caption         =   "Form1"&lt;br /&gt;ClientHeight    =   2265&lt;br /&gt;ClientLeft      =   60&lt;br /&gt;ClientTop       =   345&lt;br /&gt;ClientWidth     =   4590&lt;br /&gt;LinkTopic       =   "Form1"&lt;br /&gt;LockControls    =   -1  'True&lt;br /&gt;ScaleHeight     =   2265&lt;br /&gt;ScaleWidth      =   4590&lt;br /&gt;StartUpPosition =   3  'Windows Default&lt;br /&gt;Begin VB.CommandButton cmdWritePrivateProfileSetting&lt;br /&gt;   Caption         =   "&amp;amp;Write Private Profile Setting"&lt;br /&gt;   Height          =   840&lt;br /&gt;   Left            =   150&lt;br /&gt;   TabIndex        =   1&lt;br /&gt;   Top             =   1200&lt;br /&gt;   Width           =   4125&lt;br /&gt;End&lt;br /&gt;Begin VB.CommandButton cmdReadFromIni&lt;br /&gt;   Caption         =   "&amp;amp;Read From Ini"&lt;br /&gt;   Height          =   840&lt;br /&gt;   Left            =   150&lt;br /&gt;   TabIndex        =   0&lt;br /&gt;   Top             =   150&lt;br /&gt;   Width           =   4125&lt;br /&gt;End&lt;br /&gt;End&lt;br /&gt;Attribute VB_Name = "frmReadAndWriteIni"&lt;br /&gt;Attribute VB_GlobalNameSpace = False&lt;br /&gt;Attribute VB_Creatable = False&lt;br /&gt;Attribute VB_PredeclaredId = True&lt;br /&gt;Attribute VB_Exposed = False&lt;br /&gt;Option Explicit&lt;br /&gt;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''&lt;br /&gt;' Copyright ©1999-2005, Vivek Nigam All Rights Reserved.&lt;br /&gt;' Code contain copyrights by the author.&lt;br /&gt;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''&lt;br /&gt;' You are free to use this code within your own applications,&lt;br /&gt;' but you are expressly forbidden from selling or otherwise&lt;br /&gt;' distributing this source code without prior written consent.&lt;br /&gt;' This includes both posting free demo projects made from this&lt;br /&gt;' code as well as reproducing the code in text or html format.&lt;br /&gt;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''&lt;br /&gt;' #VBCode#************************************************************&lt;br /&gt;' * Programmer Name  : Vivek Nigam&lt;br /&gt;' * Web Site         :&lt;br /&gt;' * E-Mail           : vivek.nigam19@hotmail.com&lt;br /&gt;' * Date             : 16/04/2002&lt;br /&gt;' * Time             : 12:40 PM&lt;br /&gt;' * Module Name      : Read And Write your Ini Files&lt;br /&gt;' * Module Filename  : Prjini.vbp&lt;br /&gt;' * Procedure Name   :&lt;br /&gt;' * Parameters       :&lt;br /&gt;' *&lt;br /&gt;' **********************************************************************&lt;br /&gt;' * Comments         : Read And write From Ini&lt;br /&gt;' *&lt;br /&gt;' **********************************************************************&lt;br /&gt; Dim RtnStr As String  ' receives the value read from the INI file&lt;br /&gt; Dim sRetVal As Long  ' receives length of the returned string&lt;br /&gt; Dim ComputerName As String&lt;br /&gt; Dim UserName As String&lt;br /&gt; Dim ScanDate As Variant&lt;br /&gt; Dim OperatingSystem As String&lt;br /&gt; Dim ServicePack As String&lt;br /&gt; Dim WindowsVersion As String&lt;br /&gt; Dim CPUManufacturer As String&lt;br /&gt; Dim CPUType As String&lt;br /&gt; Dim CPUSpeed As Integer&lt;br /&gt; Dim MemoryTotal As Long&lt;br /&gt; Dim MemoryPaged As Long&lt;br /&gt; Dim FixedDrive As String&lt;br /&gt; Dim CdRom As String&lt;br /&gt; Dim NetworkDrive As String&lt;br /&gt; Dim SourceFolder As String&lt;br /&gt; Dim objFSO As Object&lt;br /&gt; Dim ObjFile As Variant&lt;br /&gt; Dim ObjFolder As Variant&lt;br /&gt; Dim ProductName As String&lt;br /&gt; Dim ProductVersion As String&lt;br /&gt; Dim PrinterName As String&lt;br /&gt; Dim PrinterConnection As String&lt;br /&gt; Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long&lt;br /&gt; Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long&lt;br /&gt;&lt;br /&gt;Sub ReadFromINI()&lt;br /&gt;'---------------------------------------------------------------------------------&lt;br /&gt;'Procedure:     ReadFromINI&lt;br /&gt;'Parameter:&lt;br /&gt;'Return Value :RtnStr : Number Of Characters Read From The Files&lt;br /&gt;'Description : This function call the WindowsAPI Function (GetPrivateProfileString) To read data from the section from INI&lt;br /&gt;'---------------------------------------------------------------------------------&lt;br /&gt;On Error Resume Next&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "ComputerName", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; ComputerName = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "UserName", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; UserName = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "ScanDate", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; ScanDate = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt; &lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "OperatingSystem", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; OperatingSystem = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "ServicePack", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; ServicePack = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "WindowsVersion", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; WindowsVersion = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "CPUManufacturer", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; CPUManufacturer = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "CPUType", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; CPUType = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "CPUSpeed", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; CPUSpeed = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "MemoryTotal", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; MemoryTotal = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("PCInfo", "MemoryPaged", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; MemoryPaged = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("Drives", "Fixed Drive", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; FixedDrive = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("Drives", "Cd-Rom", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; CdRom = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; sRetVal = GetPrivateProfileString("Drives", "Network Drive", "0", RtnStr, 255, SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name)&lt;br /&gt; NetworkDrive = Left$(RtnStr, sRetVal)  ' extract the returned string from the buffer&lt;br /&gt;&lt;br /&gt; Call ReadPrinter&lt;br /&gt; Call ReadSoftware&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;Sub ReadPrinter()&lt;br /&gt;On Error Resume Next&lt;br /&gt;Dim TextLine As String&lt;br /&gt;Dim strTemp1 As String&lt;br /&gt;Dim strTemp2 As String&lt;br /&gt;Dim strTemp3 As String&lt;br /&gt;Dim strTemp4 As String&lt;br /&gt;Dim BlankLnFlag As Boolean&lt;br /&gt;BlankLnFlag = False&lt;br /&gt;Open SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name For Input As #1 ' Open file.&lt;br /&gt; strTemp1 = "PrinterName="&lt;br /&gt; strTemp2 = "PrinterConnection="&lt;br /&gt; Do While Not EOF(1) ' Loop until end of file.&lt;br /&gt;    Line Input #1, TextLine&lt;br /&gt;    strTemp3 = Left(TextLine, 12)&lt;br /&gt;    If TextLine = "" And BlankLnFlag = True Then&lt;br /&gt;     Exit Do&lt;br /&gt;    End If&lt;br /&gt;    If strTemp1 = strTemp3 Then&lt;br /&gt;         BlankLnFlag = True&lt;br /&gt;         PrinterName = Mid(TextLine, Len(strTemp1) + 1, Len(Trim(TextLine)))&lt;br /&gt;         If Not EOF(1) Then&lt;br /&gt;             Line Input #1, TextLine&lt;br /&gt;             strTemp4 = Left(TextLine, 18)&lt;br /&gt;             If strTemp2 = strTemp4 Then&lt;br /&gt;                PrinterConnection = Mid(TextLine, Len(strTemp4) + 1, Len(Trim(TextLine)))&lt;br /&gt;             End If&lt;br /&gt;         End If&lt;br /&gt;    End If&lt;br /&gt; Loop&lt;br /&gt;Close #1 ' Close file&lt;br /&gt;End Sub&lt;br /&gt;Sub ReadSoftware()&lt;br /&gt;On Error Resume Next&lt;br /&gt;Dim TextLine As String&lt;br /&gt;Dim strTemp1 As String&lt;br /&gt;Dim strTemp2 As String&lt;br /&gt;Dim strTemp3 As String&lt;br /&gt;Dim strTemp4 As String&lt;br /&gt;&lt;br /&gt; Open SourceFolder &amp;amp; "\" &amp;amp; ObjFile.Name For Input As #1 ' Open file.&lt;br /&gt;  strTemp1 = "ProductName="&lt;br /&gt;  strTemp2 = "ProductVersion="&lt;br /&gt; Do While Not EOF(1) ' Loop until end of file.&lt;br /&gt;    Line Input #1, TextLine&lt;br /&gt;    strTemp3 = Left(TextLine, 12)&lt;br /&gt;    If strTemp1 = strTemp3 Then&lt;br /&gt;         ProductName = Mid(TextLine, Len(strTemp1) + 1, Len(Trim(TextLine)))&lt;br /&gt;         If Not EOF(1) Then&lt;br /&gt;             Line Input #1, TextLine&lt;br /&gt;             strTemp4 = Left(TextLine, 15)&lt;br /&gt;             If strTemp2 = strTemp4 Then&lt;br /&gt;                ProductVersion = Mid(TextLine, Len(strTemp4) + 1, Len(Trim(TextLine)))&lt;br /&gt;             End If&lt;br /&gt;         End If&lt;br /&gt;    End If&lt;br /&gt; Loop&lt;br /&gt;Close #1 ' Close file&lt;br /&gt;End Sub&lt;br /&gt;Sub ReadFiles()&lt;br /&gt;On Error GoTo ErrorHandler   ' Enable error-handling routine.&lt;br /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;br /&gt;    SourceFolder = App.Path&lt;br /&gt;    If objFSO.FolderExists(SourceFolder) Then&lt;br /&gt;        Set ObjFolder = objFSO.GetFolder(SourceFolder)&lt;br /&gt;        For Each ObjFile In ObjFolder.Files&lt;br /&gt;          'If InStr(ObjFile.Type, UCase("INI")) &gt; 0 Then '// For reading the Type of File&lt;br /&gt;          If InStr(ObjFile, ".ini") &gt; 0 Then&lt;br /&gt;             Call ReadFromINI '// Ok&lt;br /&gt;             'Kill (SourceFolder &amp;amp; "/" &amp;amp; ObjFile.Name)'// Please remove the comments if you wants to kill file after reading&lt;br /&gt;          End If&lt;br /&gt;        Next&lt;br /&gt;     End If&lt;br /&gt;     Set ObjFolder = Nothing&lt;br /&gt;     Set ObjFile = Nothing&lt;br /&gt;     Set objFSO = Nothing&lt;br /&gt;Exit Sub           ' Exit to avoid handler.&lt;br /&gt;ErrorHandler:       ' Error-handling routine.&lt;br /&gt; Set ObjFolder = Nothing&lt;br /&gt; Set ObjFile = Nothing&lt;br /&gt; Set objFSO = Nothing&lt;br /&gt; End&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub cmdReadFromIni_Click()&lt;br /&gt;RtnStr = Space(255)  ' provide enough room for the function to put the value into the buffer&lt;br /&gt;Call ReadFiles&lt;br /&gt;Debug.Print ComputerName &amp;amp; ";" &amp;amp; UserName &amp;amp; ";" &amp;amp; ScanDate &amp;amp; ";" &amp;amp; OperatingSystem &amp;amp; ";" &amp;amp; ServicePack _&lt;br /&gt;          &amp;amp; ";" &amp;amp; WindowsVersion &amp;amp; ";" &amp;amp; CPUManufacturer &amp;amp; ";" &amp;amp; CPUType &amp;amp; ";" &amp;amp; CPUSpeed _&lt;br /&gt;          &amp;amp; ";" &amp;amp; MemoryTotal &amp;amp; ";" &amp;amp; MemoryPaged &amp;amp; ";" &amp;amp; FixedDrive &amp;amp; ";" &amp;amp; CdRom _&lt;br /&gt;          &amp;amp; ";" &amp;amp; NetworkDrive &amp;amp; ";" &amp;amp; PrinterName &amp;amp; ";" &amp;amp; PrinterConnection &amp;amp; ";" &amp;amp; ProductName _&lt;br /&gt;          &amp;amp; ";" &amp;amp; ProductVersion&lt;br /&gt;       &lt;br /&gt;End Sub&lt;br /&gt;Private Sub cmdWritePrivateProfileSetting_Click()&lt;br /&gt;Call WriteToINI&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Sub WriteToINI()&lt;br /&gt;'---------------------------------------------------------------------------------&lt;br /&gt;'Procedure:     WriteToINI&lt;br /&gt;'Parameter:&lt;br /&gt;'Return Value :RtnStr : Number Of Characters Read From The Files&lt;br /&gt;'Description : This function call the WindowsAPI Function (WritePrivateProfileString) To store data into INI&lt;br /&gt;            'sRetVal = WritePrivateProfileString(SectionName, KeyField, KeyVal, FilePath)&lt;br /&gt;'---------------------------------------------------------------------------------&lt;br /&gt; sRetVal = WritePrivateProfileString("Personal Information", "Name", "Vivek Nigam", App.Path &amp;amp; "\WriteIniFile.ini")&lt;br /&gt; sRetVal = WritePrivateProfileString("Personal Information", "Address", "UK", App.Path &amp;amp; "\WriteIniFile.ini")&lt;br /&gt; sRetVal = WritePrivateProfileString("EmailAddress", "EmailId", "vivek_nigam19@hotmail.com", App.Path &amp;amp; "\WriteIniFile.ini")&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-5627799173238809284?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/5627799173238809284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/read-and-write-ini-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/5627799173238809284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/5627799173238809284'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/read-and-write-ini-file.html' title='Read and Write INI file'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2521209771908466924.post-2173110859268541011</id><published>2009-02-04T20:07:00.000-08:00</published><updated>2009-02-04T22:52:36.059-08:00</updated><title type='text'>Free Visual Basic</title><content type='html'>Welcome to freevisualbasic.blogspot.com&lt;br /&gt;&lt;br /&gt;You can find all of visual basic code here..&lt;br /&gt;&lt;br /&gt;I hope you will enjoy with my blog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2521209771908466924-2173110859268541011?l=freevisualbasic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freevisualbasic.blogspot.com/feeds/2173110859268541011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/free-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/2173110859268541011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2521209771908466924/posts/default/2173110859268541011'/><link rel='alternate' type='text/html' href='http://freevisualbasic.blogspot.com/2009/02/free-visual-basic.html' title='Free Visual Basic'/><author><name>FreeMiniSoftware</name><uri>http://www.blogger.com/profile/16004280600606314585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://1.bp.blogspot.com/_6lCpU1Fh3EE/SXmGa3YuDLI/AAAAAAAAAAM/n3qwzPJYWR0/S220/haris2.JPG'/></author><thr:total>0</thr:total></entry></feed>
