<?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-1703949483545735951</id><updated>2011-11-27T15:27:54.446-08:00</updated><category term='Microsoft decided'/><category term='one dimensional array'/><category term='A simple calculator'/><category term='The List Box'/><category term='development'/><category term='Dimension of an Array'/><category term='Androi Data Storage'/><category term='SIP'/><category term='asp code'/><category term='uses a common dialog box'/><category term='Object Exchange'/><category term='function in vb 6'/><category term='mouse'/><category term='The Top Five Changes between VB 6 and VB.NET'/><category term='Graphically Show CPU'/><category term='and FileListBox Controls in vb 6'/><category term='integrated'/><category term='scalable'/><category term='The Space function'/><category term='variables'/><category term='vb code  basic'/><category term='declare'/><category term='Visual Basic 6'/><category term='invalid keys in the'/><category term='internal Storage'/><category term='dim ArrayName'/><category term='The Combo Box'/><category term='The Code'/><category term='API Declaration'/><category term='Loop'/><category term='In 4th Place'/><category term='code in vb'/><category term='array can also be assigned'/><category term='PSet'/><category term='system services'/><category term='our 6th Place award goes to the C groupies'/><category term='vb code overwrite field access database'/><category term='multidimensional'/><category term='Sample Program: Reading file'/><category term='Sample Programs use Array'/><category term='VB Program'/><category term='source code free'/><category term='VBA'/><category term='The explanation can be found in this note found buried pretty'/><category term='common controls'/><category term='totorial'/><category term='OptionButton Controls in VB6'/><category term='non-numeric Data type'/><category term='vb source code'/><category term='Net compact Framework'/><category term='for next loop'/><category term='DirListBox'/><category term='important part of programming'/><category term='vb 6 code'/><category term='screen saver'/><category term='Label'/><category term='ordinary'/><category term='String Manipulation Functions'/><category term='Text Box'/><category term='ActiveX controls'/><category term='Assigning values'/><category term='say C++ has multiple inheritance and .NET still'/><category term='demo'/><category term='Your Own Function'/><category term='Platform'/><category term='Introduction to Arrays'/><category term='The Image Box and the Picture Box'/><category term='do loop'/><category term='Graphics  very important'/><category term='Visual Basic application'/><category term='Commissions Payment'/><category term='open program'/><category term='The Format function'/><category term='Dim Count'/><category term='common'/><category term='message box'/><category term='pitfalls'/><category term='CE .NET'/><category term='Formatting output is a very'/><category term='connect'/><category term='the ‘change pictures’ button'/><category term='vb code for access form'/><category term='each time you click'/><category term='Some Windows Specifics'/><category term='Need to Creating  VBA  Functions'/><category term='ByVal and ByRef: Passing Arguments in Visual Basic'/><category term='example for use'/><category term='vb'/><category term='vbcode'/><category term='The reason for the error this time is that when the VB 6'/><category term='RTC'/><category term='wireless'/><category term='vb code  basic games'/><category term='source code free downloads'/><category term='The Bronze Award - 3rd Place'/><category term='project management'/><category term='image processing'/><category term='we have Changes to Procedure'/><category term='vb code to open any programs'/><category term='twodimensional array'/><category term='select case example'/><category term='.net code'/><category term='vb code + basic games'/><category term='Line and Circle'/><category term='Windows CE .NET'/><category term='test 2'/><category term='Handling'/><category term='Sample Program  Creating a text file'/><category term='flexibly'/><category term='how to write vb code to produce barcodes'/><category term='Select Case'/><category term='visual basic programming'/><category term='array is declared'/><category term='vb codes'/><category term='using if then else'/><category term='framwork'/><category term='devices'/><category term='32 bit'/><category term='Command Button'/><category term='function'/><category term='vb code'/><category term='.NET needed to do'/><category term='Download the vbSkinner'/><category term='for next'/><category term='vb.net'/><category term='android 3.1'/><category term='The Picture Box'/><category term='numeric datatype'/><category term='Setting properties to a TextBox'/><category term='suffixes for literals'/><category term='control properties'/><category term='In this example'/><category term='Mathematical Functions'/><category term='DLL'/><category term='hoc management'/><category term='3D space'/><category term='format loop'/><category term='User-Defined Functions'/><category term='Program Example  Use Do Loop'/><category term='DriveListBox'/><category term='The InputBox( ) Function'/><category term='shown'/><category term='Example: yourMsg'/><category term='Using ScrollBar'/><category term='allows the user to change'/><category term='value'/><category term='Trapping Keyboard Activity - Visual Basic 6 TextBox Control'/><category term='Example: use inputBox'/><category term='technologies'/><category term='Award(5)&quot;'/><category term='general format'/><category term='the shape by selecting a particular shape from a list of options from a list box'/><category term='k1 vbcode'/><category term='ObjPtr and StrPtr'/><category term='window handle'/><category term='OptionButton'/><category term='no of process'/><category term='C# Primary Sites'/><category term='VB6 CommandButton'/><category term='The program in this example'/><category term='Visual Basic'/><category term='Probably no other single feature of Visual Basic &quot;notNet&quot;'/><category term='vb built in function'/><category term='Memory Usage'/><category term='file'/><category term='www.irecog.com'/><category term='Application'/><category term='MS Excel'/><category term='example computes the values of Int(x)'/><category term='Where to get the funs descriptions from'/><category term='do while'/><category term='Visual Basic DirectX Tutorials'/><category term='Although trapping'/><category term='ListBox'/><category term='Frame Controls'/><category term='Data Types'/><category term='Drawing Methods'/><category term='Download  source codes vb 6 free'/><category term='The Circle Method'/><category term='line and Shape controls'/><category term='API'/><category term='effective'/><category term='Creating'/><category term='CDRW'/><category term='MsgBox ( ) Function'/><category term='vb6'/><category term='declares an array'/><category term='The Numeric Functions'/><category term='VB.NET no longer supports VarPtr'/><category term='KeyPress or KeyDown event'/><category term='basic games'/><category term='vbcode.irecog.com'/><category term='Windows API Message'/><category term='scrollbar Control'/><category term='Windows Operating System'/><title type='text'>k1 vb code training</title><subtitle type='html'>vb code training downloads</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default?start-index=101&amp;max-results=100'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>111</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4866149566967070982</id><published>2011-06-01T10:03:00.000-07:00</published><updated>2011-06-01T10:04:39.785-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Androi Data Storage'/><category scheme='http://www.blogger.com/atom/ns#' term='internal Storage'/><title type='text'>Androi : Using the Internal Storage</title><content type='html'>Using the Internal Storage&lt;br /&gt;You can save files directly on the device's internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). When the user uninstalls your application, these files are removed.&lt;br /&gt;&lt;br /&gt;To create and write a private file to the internal storage:&lt;br /&gt;&lt;br /&gt;1.Call openFileOutput() with the name of the file and the operating mode. This returns a FileOutputStream.&lt;br /&gt;2.Write to the file with write().&lt;br /&gt;3.Close the stream with close().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4866149566967070982?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4866149566967070982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/androi-using-internal-storage.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4866149566967070982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4866149566967070982'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/androi-using-internal-storage.html' title='Androi : Using the Internal Storage'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5032075084782694373</id><published>2011-06-01T10:01:00.000-07:00</published><updated>2011-06-01T10:03:18.651-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android 3.1'/><category scheme='http://www.blogger.com/atom/ns#' term='Androi Data Storage'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><title type='text'>Androi Data Storage</title><content type='html'>Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires.&lt;br /&gt;&lt;br /&gt;Your data storage options are the following:&lt;br /&gt;&lt;br /&gt;Shared Preferences&lt;br /&gt;Store private primitive data in key-value pairs.&lt;br /&gt;Internal Storage&lt;br /&gt;Store private data on the device memory.&lt;br /&gt;External Storage&lt;br /&gt;Store public data on the shared external storage.&lt;br /&gt;SQLite Databases&lt;br /&gt;Store structured data in a private database.&lt;br /&gt;Network Connection&lt;br /&gt;Store data on the web with your own network server.&lt;br /&gt;Android provides a way for you to expose even your private data to other applications — with a content provider. A content provider is an optional component that exposes read/write access to your application data, subject to whatever restrictions you want to impose. For more information about using content providers, see the Content Providers documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5032075084782694373?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5032075084782694373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/androi-data-storage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5032075084782694373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5032075084782694373'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/androi-data-storage.html' title='Androi Data Storage'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6160978315523071861</id><published>2011-06-01T09:55:00.000-07:00</published><updated>2011-06-01T10:00:08.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android 3.1'/><category scheme='http://www.blogger.com/atom/ns#' term='Platform'/><title type='text'>Android 3.1 PlatformIn this document</title><content type='html'>Android 3.1 PlatformIn this document&lt;br /&gt;Revisions&lt;br /&gt;API Overview&lt;br /&gt;API Level&lt;br /&gt;Built-in Applications&lt;br /&gt;Locales&lt;br /&gt;Emulator Skins&lt;br /&gt;Reference&lt;br /&gt;API Differences Report »&lt;br /&gt;See Also&lt;br /&gt;Optimizing Apps for Android 3.0&lt;br /&gt;API Level: 12&lt;br /&gt;&lt;br /&gt;For developers, the Android 3.1 platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.&lt;br /&gt;&lt;br /&gt;To get started developing or testing against Android 3.1, use the Android SDK Manager to download the platform into your SDK. For more information, see Adding SDK Components. If you are new to Android, download the SDK Starter Package first.&lt;br /&gt;&lt;br /&gt;For a high-level introduction to Android 3.1, see the Platform Highlights.&lt;br /&gt;&lt;br /&gt;Reminder: If you've already published an Android application, please test and optimize your application on Android 3.0 and Android 3.1 as soon as possible. You should do so to be sure your application provides the best experience possible on the latest Android-powered devices. For information about what you can do, read Optimizing Apps for Android 3.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6160978315523071861?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6160978315523071861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/android-31-platformin-this-document.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6160978315523071861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6160978315523071861'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2011/06/android-31-platformin-this-document.html' title='Android 3.1 PlatformIn this document'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4267649748909328524</id><published>2009-12-28T18:35:00.000-08:00</published><updated>2009-12-28T18:44:29.467-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='common'/><category scheme='http://www.blogger.com/atom/ns#' term='uses a common dialog box'/><category scheme='http://www.blogger.com/atom/ns#' term='demo'/><category scheme='http://www.blogger.com/atom/ns#' term='important part of programming'/><title type='text'>Common Dialogs Allow A professional VB app</title><content type='html'>The Common Dialog control provides a standard set of dialog boxes for operations such as opening, saving, and printing files, as well as selecting colors and fonts and displaying help. Any six of the different dialog boxes can be displayed with just one Common Dialog control. A particular dialog box is displayed by using one of the six "Show..." methods of the Common Dialog control: ShowOpen, ShowSave, ShowPrinter, ShowColor, ShowFont, or ShowHelp.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Common Dialog control not an intrinsic control; rather, it is an "Active X" control that must be added to the toolbox via the Components dialog box, as shown below. This dialog box is accessed via the Project menu, Components item. Once you check "Microsoft Common Dialog Control 6.0" and click OK, the control is added to your toolbox (also shown below, circled). Then you can double-click it to make it appear on your form, as you would with any other control. The Common Dialog control is not visible at run-time.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image001.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 455px; height: 404px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image001.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image002.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 110px; height: 280px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image002.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Certain functionality for the dialog boxes is provided automatically by VB and Windows, but other functionality must be coded. For example, with the Open and Save dialog boxes, the functionality to navigate to different drives and directories is built in, but the functionality to actually save or open a file must be coded in your program.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The sample program for this topic will be presented shortly, but first, two properties of the Common Dialog control, Flags and CancelError, will be discussed briefly.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Flags Property&lt;br /&gt;&lt;br /&gt; The appearance and behavior of the dialog boxes can be modified to some degree with the Flags property of the Common Dialog control. Wherever possible, you should use the Flags property to control the appearance of the dialog box in question such that you only present features to the user that your application supports. Examples follow.&lt;br /&gt;&lt;br /&gt;(1) Shown below is a screen shot of the Open Common Dialog Box. Note that the item "Open as read only" is circled. You can use the Flags property to suppress this item (you should only show it if your application will let the user decide whether or not to open the file as read-only).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image003.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 563px; height: 344px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image003.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Shown below is a screen shot of the Print Common Dialog Box. Note that the circled items in the "Page Range" area (for printing a selection or a specific page range) are grayed out. These items were disabled via Flags property settings. You should only enable such options if your program contains the logic to act on them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image004.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 464px; height: 416px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image004.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(3) Shown below is a screen shot of the Font Common Dialog Box. The Flags property can control whether or not the "Effects" area (circled) is displayed&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image005.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 437px; height: 344px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image005.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The CancelError Property&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;In order to test whether or not the user clicked the Cancel button on a Common Dialog box, you must set up special error-handling logic. If you don't, VB will treat the clicking of the Cancel button as an unhandled error and will thus cause your program to end abruptly (this will not exactly endear you to your users).&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;You can test to see whether or not the user clicked the Cancel button by setting the CancelError property to True – this causes an error routine you have written (using the "On Error Goto label technique) to be executed when the user clicks Cancel.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The basic structure of a VB procedure that displays a Common Dialog box should be as follows:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Private Sub WHATEVER()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DECLARE LOCAL VARIABLES&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ON ERROR GOTO CANCELERROR_ROUTINE&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SET CancelError PROPERTY TO TRUE (e.g., CommonDialog1.CancelError = True)&lt;br /&gt;&lt;br /&gt;SET Flags AND OTHER PROPERTIES TO APPROPRIATE VALUES&lt;br /&gt;&lt;br /&gt;SHOW THE COMMON DIALOG (e.g., CommonDialog1.ShowSave)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;' When you show the common dialog box, processing is suspending until the&lt;br /&gt;&lt;br /&gt;' user performs an action. If they click the Cancel button, VB will jump &lt;br /&gt;&lt;br /&gt;' to the error-handling routine you set up (i.e., CANCELERROR_ROUTINE).&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;' Assuming the user did not click Cancel, continue processing below ...&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;' Now that the dialog box is done being shown, we can put a "normal" error-&lt;br /&gt;&lt;br /&gt;' handling routine in place, if desired ...&lt;br /&gt;&lt;br /&gt;On Error GoTo NORMAL_ERROR_ROUTINE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NORMAL PROCESSING HERE&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;' Exit here so that you don't fall through to the error-handling logic&lt;br /&gt;&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NORMAL_ERROR_ROUTINE:&lt;br /&gt;&lt;br /&gt;MsgBox "Err # " &amp; Err.Number &amp; " - " &amp; Err.Description, vbCritical, "Error"&lt;br /&gt;&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CANCELERROR_ROUTINE:&lt;br /&gt;&lt;br /&gt;' Do nothing, no problem if user clicks Cancel button ...&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;COMMON DIALOG DEMO PROGRAM&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Common Dialog demo program shows how to use each of the six types of dialog boxes. The design-time form is shown below, with the names and property settings for each control on the form, as well as for the form itself, shown in callouts.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vb6.us/files/VBPrograms/CommonDialog/image006.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 734px; height: 520px;" src="http://www.vb6.us/files/VBPrograms/CommonDialog/image006.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;more detail Click this link&lt;br /&gt;http://www.vb6.us/tutorials/common-dialogs-vb-tutorial&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4267649748909328524?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4267649748909328524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/12/common-dialogs-allow-professional-vb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4267649748909328524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4267649748909328524'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/12/common-dialogs-allow-professional-vb.html' title='Common Dialogs Allow A professional VB app'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7945203758699791132</id><published>2009-08-27T07:10:00.001-07:00</published><updated>2009-08-27T07:10:43.892-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='for next loop'/><title type='text'>for next loop</title><content type='html'>The For...Next Loop&lt;br /&gt;The For...Next Loop is another way to make loops in Visual Basic. For...Next repetition structure handles all the details of counter-controlled repetition. The following loop counts the numbers from 1 to 100:&lt;br /&gt;&lt;br /&gt;Dim x As Integer&lt;br /&gt;For x = 1 To 50&lt;br /&gt;Print x&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;In order to count the numbers from 1 yo 50 in steps of 2, the following loop can be used&lt;br /&gt;&lt;br /&gt;For x = 1 To 50 Step 2&lt;br /&gt;Print x&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;The following loop counts numbers as 1, 3, 5, 7..etc&lt;br /&gt;&lt;br /&gt;The above coding will display numbers vertically on the form. In order to display numbers horizontally the following method can be used.&lt;br /&gt;&lt;br /&gt;For x = 1 To 50&lt;br /&gt;Print x &amp; Space$ (2);&lt;br /&gt;Next &lt;br /&gt;&lt;br /&gt;To increase the space between the numbers increase the value inside the brackets after the &amp; Space$.&lt;br /&gt;&lt;br /&gt;Following example is a For...Next repetition structure which is with the If condition used.&lt;br /&gt;&lt;br /&gt;Dim number As Integer&lt;br /&gt;For number = 1 To 10&lt;br /&gt;If number = 4 Then&lt;br /&gt;Print "This is number 4"&lt;br /&gt;Else&lt;br /&gt;Print number&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;In the output instead of number 4 you will get the "This is number 4".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7945203758699791132?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7945203758699791132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/for-next-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7945203758699791132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7945203758699791132'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/for-next-loop.html' title='for next loop'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5847760114940984972</id><published>2009-08-27T07:08:00.000-07:00</published><updated>2009-08-27T07:09:34.583-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='for next'/><category scheme='http://www.blogger.com/atom/ns#' term='do while'/><title type='text'>Loop in Visual basic</title><content type='html'>The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100. &lt;br /&gt;Dim number As Integer&lt;br /&gt;number = 1&lt;br /&gt;Do While number &lt;= 100&lt;br /&gt;number = number + 1&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;A variable number is initialized to 1 and then the Do While Loop starts. First, the condition is tested; if condition is True, then the statements are executed. When it gets to the Loop it goes back to the Do and tests condition again. If condition is False on the first pass, the statements are never executed.&lt;br /&gt;&lt;br /&gt;While... Wend Statement&lt;br /&gt;A While...Wend statement behaves like the Do While...Loop statement. The following While...Wend counts from 1 to 100&lt;br /&gt;&lt;br /&gt;Dim number As Integer&lt;br /&gt;&lt;br /&gt;number = 1&lt;br /&gt;While number &lt;=100&lt;br /&gt;number = number + 1&lt;br /&gt;Wend&lt;br /&gt;&lt;br /&gt;Do...Loop While Statement&lt;br /&gt;The Do...Loop While statement first executes the statements and then test the condition after each execution. The following program block illustrates the structure:&lt;br /&gt;&lt;br /&gt;Dim number As Long&lt;br /&gt;number = 0&lt;br /&gt;Do &lt;br /&gt;number = number + 1&lt;br /&gt;Loop While number &lt; 201&lt;br /&gt;&lt;br /&gt;The programs executes the statements between Do and Loop While structure in any case. Then it determines whether the counter is less than 501. If so, the program again executes the statements between Do and Loop While else exits the Loop.&lt;br /&gt;&lt;br /&gt;Do Until...Loop Statement&lt;br /&gt;Unlike the Do While...Loop and While...Wend repetition structures, the Do Until... Loop structure tests a condition for falsity. Statements in the body of a Do Until...Loop are executed repeatedly as long as the loop-continuation test evaluates to False.&lt;br /&gt;&lt;br /&gt;An example for Do Until...Loop statement. The coding is typed inside the click event of the command button&lt;br /&gt;&lt;br /&gt;Dim number As Long&lt;br /&gt;number=0&lt;br /&gt;Do Until number &gt; 1000&lt;br /&gt;number = number + 1&lt;br /&gt;Print number&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;Numbers between 1 to 1000 will be displayed on the form as soon as you click on the command button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5847760114940984972?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5847760114940984972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/loop-in-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5847760114940984972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5847760114940984972'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/loop-in-visual-basic.html' title='Loop in Visual basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-94053630168009852</id><published>2009-08-25T00:08:00.000-07:00</published><updated>2009-08-25T00:11:02.365-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DirListBox'/><category scheme='http://www.blogger.com/atom/ns#' term='and FileListBox Controls in vb 6'/><category scheme='http://www.blogger.com/atom/ns#' term='DriveListBox'/><title type='text'>DriveListBox, DirListBox, and FileListBox Controls in vb 6</title><content type='html'>Three of the controls on the ToolBox let you access the computer's file system. They are DriveListBox, DirListBox and FileListBox controls (see below figure) , which are the basic blocks for building dialog boxes that display the host computer's file system. Using these controls, user can traverse the host computer's file system, locate any folder or files on any hard disk, even on network drives. The files are controls are independent of one another, and each can exist on it's own, but they are rarely used separately. The files controls are described next. &lt;br /&gt;&lt;br /&gt;In a nutshell, the DriveListBox control is a combobox-like control that's automatically filled with your drive's letters and volume labels. The DirListBox is a special list box that displays a directory tree. The FileListBox control is a special-purpose ListBox control that displays all the files in a given directory, optionally filtering them based on their names, extensions, and attributes.&lt;br /&gt;&lt;br /&gt;These controls often work together on the same form; when the user selects a drive in a DriveListBox, the DirListBox control is updated to show the directory tree on that drive. When the user selects a path in the DirListBox control, the FileListBox control is filled with the list of files in that directory. These actions don't happen automatically, however—you must write code to get the job done.&lt;br /&gt;&lt;br /&gt;After you place a DriveListBox and a DirListBox control on a form's surface, you usually don't have to set any of their properties; in fact, these controls don't expose any special property, not in the Properties window at least. The FileListBox control, on the other hand, exposes one property that you can set at design time—the Pattern property. This property indicates which files are to be shown in the list area: Its default value is *.* (all files), but you can enter whatever specification you need, and you can also enter multiple specifications using the semicolon as a separator. You can also set this property at run time, as in the following line of code:&lt;br /&gt;&lt;br /&gt;File1.Pattern = "*.txt;*.doc;*.rtf"&lt;br /&gt;&lt;br /&gt;Following figure shows three files controls are used in the design of Forms that let users explore the entire structure of their hard disks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://visualbasic.freetutes.com/learn-vb6/images/F001.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 335px; height: 214px;" src="http://visualbasic.freetutes.com/learn-vb6/images/F001.JPG" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;DriveListBox : Displays the names of the drives within and connected to the PC. The basic property of this control is the drive property, which set the drive to be initially selected in the control or returns the user's selection.&lt;br /&gt;&lt;br /&gt;DirListBox : Displays the folders of current Drive. The basic property of this control is the Path property, which is the name of the folder whose sub folders are displayed in the control.&lt;br /&gt;&lt;br /&gt;FileListBox : Displays the files of the current folder. The basic property of this control is also called Path, and it's the path name of the folder whose files are displayed.&lt;br /&gt;&lt;br /&gt;The three File controls are not tied to one another. If you place all three of them on a Form, you will see the names of all the folders under the current folder, and so on. Each time you select a folder in the DirlistBox by double clicking its name, its sub folders are displayed. Similarly , the FileListBox control will display the names of all files in the current folder. Selecting a drive in the DriveListBox control, however this doesn't affect the contents of the DirListBox.&lt;br /&gt;&lt;br /&gt;To connect to the File controls, you must assign the appropriate values to the properties. To compel the DirListBox to display the folders of the selected drive in the DriveListBox, you must make sure that each time the user selects another drive, the Path property of the DirListBox control matches the Drive property of the DriveListBox. &lt;br /&gt;&lt;br /&gt;After these preliminary steps, you're ready to set in motion the chain of events. When the user selects a new drive in the DriveListBox control, it fires a Change event and returns the drive letter (and volume label) in its Drive property. You trap this event and set the DirListBox control's Path property to point to the root directory of the selected drive:&lt;br /&gt;&lt;br /&gt;Private Sub Drive1_Change()&lt;br /&gt;' The Drive property also returns the volume label, so trim it.&lt;br /&gt;Dir1.Path = Left$(Drive1.Drive, 1) &amp; ":\"&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;When the user double-clicks on a directory name, the DirListBox control raises a Change event; you trap this event to set the FileListBox's Path property accordingly:&lt;br /&gt;&lt;br /&gt;Private Sub Dir1_Change()&lt;br /&gt;File1.Path = Dir1.Path&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Finally, when the user clicks on a file in the FileListBox control, a Click event is fired (as if it were a regular ListBox control), and you can query its Filename property to learn which file has been selected. Note how you build the complete path:&lt;br /&gt;&lt;br /&gt;Filename = File1.Path &lt;br /&gt;If Right$(Filename, 1) &lt;&gt; "\" Then Filename = Filename &amp; "\"&lt;br /&gt;Filename = Filename &amp; File1.Filename&lt;br /&gt;&lt;br /&gt;The DirListBox and FileListBox controls support most of the properties typical of the control they derive from—the ListBox control—including the ListCount and the ListIndex properties and the Scroll event. The FileListBox control supports multiple selection; hence you can set its MultiSelect property in the Properties window and query the SelCount and Selected properties at run time.&lt;br /&gt;&lt;br /&gt;The FileListBox control also exposes a few custom Boolean properties, Normal, Archive, Hidden, ReadOnly, and System, which permit you to decide whether files with these attributes should be listed. (By default, the control doesn't display hidden and system files.) This control also supports a couple of custom events, PathChange and PatternChange, that fire when the corresponding property is changed through code. In most cases, you don't have to worry about them, and I won't provide examples of their usage.&lt;br /&gt;&lt;br /&gt;The problem with the DriveListBox, DirListBox and FileListBox controls is that they're somewhat outdated and aren't used by most commercial applications any longer. Moreover, these controls are known to work incorrectly when listing files on network servers and sometimes even on local disk drives, especially when long file and directory names are used. For this reason, I discourage you from using them and suggest instead that you use the Common Dialog controls for your FileOpen and FileSave dialog boxes. But if you need to ask the user for the name of a directory rather than a file, you're out of luck because—while Windows does include such a system dialog box, named BrowseForFolders dialog—Visual Basic still doesn't offer a way to display it (unless you do some advanced API programming). Fortunately, Visual Basic 6 comes with a new control—the ImageCombo control—that lets you simulate the appearance of the DriveListBox control. It also offers you a powerful library—the FileSystemObject library—that completely frees you from using these three controls, if only as hidden controls that you use just for quickly retrieving information on the file system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-94053630168009852?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/94053630168009852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/drivelistbox-dirlistbox-and-filelistbox.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/94053630168009852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/94053630168009852'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/drivelistbox-dirlistbox-and-filelistbox.html' title='DriveListBox, DirListBox, and FileListBox Controls in vb 6'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8287641574210431799</id><published>2009-08-25T00:07:00.000-07:00</published><updated>2009-08-25T00:08:19.678-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Label'/><category scheme='http://www.blogger.com/atom/ns#' term='common'/><title type='text'>Label</title><content type='html'>Label and Frame controls have a few features in common, so it makes sense to explain them together. First they're mostly "decorative" controls that contribute to the user interface but are seldom used as programmable objects. In other words, you often place them on the form and arrange their properties as your user interface needs dictate, but you rarely write code to serve their events, generally, or manipulate their properties at run time.&lt;br /&gt;&lt;br /&gt;Label Controls&lt;br /&gt;Most people use Label controls to provide a descriptive caption and possibly an associated hot key for other controls, such as TextBox, ListBox, and ComboBox, that don't expose the Caption property. In most cases, you just place a Label control where you need it, set its Caption property to a suitable string (embedding an ampersand character in front of the hot key you want to assign), and you're done. Caption is the default property for Label controls. Be careful to set the Label's TabIndex property so that it's 1 minus the TabIndex property of the companion control. &lt;br /&gt;&lt;br /&gt;Other useful properties are BorderStyle(if you want the Label control to appear inside a 3D border) and Alignment (if you want to align the caption to the right or center it on the control). In most cases, the alignment depends on how the Label control relates to its companion control: for example, if the Label control is placed to the left of its companion field, you might want to set its Alignment property to 1-Right Justify. The value 2-Center is especially useful for stand-alone Label controls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8287641574210431799?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8287641574210431799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/label.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8287641574210431799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8287641574210431799'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/label.html' title='Label'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-544489698855195494</id><published>2009-08-25T00:06:00.001-07:00</published><updated>2009-08-25T00:08:29.276-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Frame Controls'/><title type='text'>Frame Controls</title><content type='html'>Frame Controls&lt;br /&gt;Frame controls are similar to Label controls in that they can serve as captions for those controls that don't have their own. Moreover, Frame controls can also (and often do) behave as containers and host other controls. In most cases, you only need to drop a Frame control on a form and set its Caption property. If you want to create a borderless frame, you can set its BorderStyle property to 0-None.&lt;br /&gt;&lt;br /&gt;Controls that are contained in the Frame control are said to be child controls. Moving a control at design time over a Frame control—or over any other container, for that matter—doesn't automatically make that control a child of the Frame control. After you create a Frame control, you can create a child control by selecting the child control's icon in the Toolbox and drawing a new instance inside the Frame's border. Alternatively, to make an existing control a child of a Frame control, you must select the control, press Ctrl+X to cut it to the Clipboard, select the Frame control, and press Ctrl+V to paste the control inside the Frame. If you don't follow this procedure and you simply move the control over the Frame, the two controls remain completely independent of each other, even if the other control appears in front of the Frame control.&lt;br /&gt;&lt;br /&gt;Frame controls, like all container controls, have two interesting features. If you move a Frame control, all the child controls go with it. If you make a container control disabled or invisible, all its child controls also become disabled or invisible. You can exploit these features to quickly change the state of a group of related controls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-544489698855195494?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/544489698855195494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/frame-controls_25.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/544489698855195494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/544489698855195494'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/frame-controls_25.html' title='Frame Controls'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5962263949626682258</id><published>2009-08-25T00:06:00.000-07:00</published><updated>2009-08-25T00:08:28.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Frame Controls'/><title type='text'>Frame Controls</title><content type='html'>Frame Controls&lt;br /&gt;Frame controls are similar to Label controls in that they can serve as captions for those controls that don't have their own. Moreover, Frame controls can also (and often do) behave as containers and host other controls. In most cases, you only need to drop a Frame control on a form and set its Caption property. If you want to create a borderless frame, you can set its BorderStyle property to 0-None.&lt;br /&gt;&lt;br /&gt;Controls that are contained in the Frame control are said to be child controls. Moving a control at design time over a Frame control—or over any other container, for that matter—doesn't automatically make that control a child of the Frame control. After you create a Frame control, you can create a child control by selecting the child control's icon in the Toolbox and drawing a new instance inside the Frame's border. Alternatively, to make an existing control a child of a Frame control, you must select the control, press Ctrl+X to cut it to the Clipboard, select the Frame control, and press Ctrl+V to paste the control inside the Frame. If you don't follow this procedure and you simply move the control over the Frame, the two controls remain completely independent of each other, even if the other control appears in front of the Frame control.&lt;br /&gt;&lt;br /&gt;Frame controls, like all container controls, have two interesting features. If you move a Frame control, all the child controls go with it. If you make a container control disabled or invisible, all its child controls also become disabled or invisible. You can exploit these features to quickly change the state of a group of related controls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5962263949626682258?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5962263949626682258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/frame-controls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5962263949626682258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5962263949626682258'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/frame-controls.html' title='Frame Controls'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7120848744937472502</id><published>2009-08-25T00:04:00.000-07:00</published><updated>2009-08-25T00:05:22.194-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OptionButton Controls in VB6'/><title type='text'>OptionButton Controls in VB6</title><content type='html'>OptionButton Controls in VB6&lt;br /&gt;OptionButton controls are also known as radio buttons because of their shape. You always use OptionButton controls in a group of two or more because their purpose is to offer a number of mutually exclusive choices. Anytime you click on a button in the group, it switches to a selected state and all the other controls in the group become unselected.&lt;br /&gt;&lt;br /&gt;Preliminary operations for an OptionButton control are similar to those already described for CheckBox controls. You set an OptionButton control's Caption property to a meaningful string, and if you want you can change its Alignment property to make the control right aligned. If the control is the one in its group that's in the selected state, you also set its Valueproperty to True. (The OptionButton's Value property is a Boolean value because only two states are possible.) Value is the default property for this control.&lt;br /&gt;&lt;br /&gt;At run time, you typically query the control's Value property to learn which button in its group has been selected. Let's say you have three OptionButton controls, named optWeekly, optMonthly, and optYearly. You can test which one has been selected by the user as follows:&lt;br /&gt;&lt;br /&gt;If optWeekly.Value Then&lt;br /&gt;' User prefers weekly frequency.&lt;br /&gt;ElseIf optMonthly.Value Then&lt;br /&gt;' User prefers monthly frequency.&lt;br /&gt;ElseIf optYearly.Value Then&lt;br /&gt;' User prefers yearly frequency.&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Strictly speaking, you can avoid the test for the last OptionButton control in its group because all choices are supposed to be mutually exclusive. But the approach I just showed you increases the code's readability.&lt;br /&gt;&lt;br /&gt;A group of OptionButton controls is often hosted in a Frame control. This is necessary when there are other groups of OptionButton controls on the form. As far as Visual Basic is concerned, all the OptionButton controls on a form's surface belong to the same group of mutually exclusive selections, even if the controls are placed at the opposite corners of the window. The only way to tell Visual Basic which controls belong to which group is by gathering them inside a Frame control. Actually, you can group your controls within any control that can work as a container—PictureBox, for example—but Frame controls are often the most reasonable choice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7120848744937472502?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7120848744937472502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/optionbutton-controls-in-vb6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7120848744937472502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7120848744937472502'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/optionbutton-controls-in-vb6.html' title='OptionButton Controls in VB6'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-332434628474591465</id><published>2009-08-24T23:59:00.000-07:00</published><updated>2009-08-25T00:04:11.033-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB6 CommandButton'/><title type='text'>VB6 CommandButton</title><content type='html'>When compared to TextBox controls, these controls are really simple. Not only do they expose relatively few properties, they also support a limited number of events, and you don't usually write much code to manage them.&lt;br /&gt;&lt;br /&gt;CommandButton Controls in VB6&lt;br /&gt;Using CommandButton controls is trivial. In most cases, you just draw the control on the form's surface, set its Caption property to a suitable string (adding an &amp; character to associate a hot key with the control if you so choose), and you're finished, at least with user-interface issues. To make the button functional, you write code in its Click event procedure, as in this fragment:&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;' Save data, then unload the current form.&lt;br /&gt;Call SaveDataToDisk&lt;br /&gt;Unload Me&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;You can use two other properties at design time to modify the behavior of a CommandButton control. You can set the Default property to True if it's the default push button for the form (the button that receives a click when the user presses the Enter key—usually the OK or Save button). Similarly, you can set the Cancel property to True if you want to associate the button with the Escape key.&lt;br /&gt;&lt;br /&gt;The only relevant CommandButton's run-time property is Value, which sets or returns the state of the control (True if pressed, False otherwise). Value is also the default property for this type of control. In most cases, you don't need to query this property because if you're inside a button's Click event you can be sure that the button is being activated. The Value property is useful only for programmatically clicking a button:&lt;br /&gt;&lt;br /&gt;This fires the button's Click event.&lt;br /&gt;Command1.Value = True&lt;br /&gt;&lt;br /&gt;The CommandButton control supports the usual set of keyboard and mouse events (KeyDown, KeyPress, KeyUp, MouseDown, MouseMove, MouseUp, but not the DblClick event) and also the GotFocus and LostFocus events, but you'll rarely have to write code in the corresponding event procedures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-332434628474591465?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/332434628474591465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/vb6-commandbutton.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/332434628474591465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/332434628474591465'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/vb6-commandbutton.html' title='VB6 CommandButton'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8286828103994852809</id><published>2009-08-24T23:57:00.002-07:00</published><updated>2009-08-24T23:59:04.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='invalid keys in the'/><category scheme='http://www.blogger.com/atom/ns#' term='Although trapping'/><category scheme='http://www.blogger.com/atom/ns#' term='KeyPress or KeyDown event'/><title type='text'>Validation Routines for Numbers</title><content type='html'>Although trapping invalid keys in the KeyPress or KeyDown event procedures seems a great idea at first, when you throw your application to inexperienced users you soon realize that there are many ways for them to enter invalid data. Depending on what you do with this data, your application can come to an abrupt end with a run-time error or—much worse—it can appear to work correctly while it delivers bogus results. What you really need is a bullet-proof method to trap invalid values.&lt;br /&gt;&lt;br /&gt;Before I offer you a decent solution to the problem, let me explain why you can't rely solely on trapping invalid keys for your validation chores. What if the user pastes an invalid value from the clipboard? Well, you might say, let's trap the Ctrl+V and Shift+Ins key combinations to prevent the user from doing that! Unfortunately, Visual Basic's TextBox controls offer a default edit menu that lets users perform any clipboard operation by simply right-clicking on them. Fortunately, there's a way around this problem: Instead of trapping a key before it gets to the TextBox control, you trap its effect in the Change event and reject it if it doesn't pass your test. But this makes the structure of the code a little more complex than you might anticipate:&lt;br /&gt;&lt;br /&gt;' Form-level variables&lt;br /&gt;Dim saveText As String&lt;br /&gt;Dim saveSelStart As Long&lt;br /&gt;&lt;br /&gt;Private Sub Text1_GotFocus()&lt;br /&gt;' Save values when the control gets the focus.&lt;br /&gt;saveText = Text1.Text&lt;br /&gt;saveSelStart = Text1.SelStart&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Text1_Change()&lt;br /&gt;' Avoid nested calls.&lt;br /&gt;Static nestedCall As Boolean&lt;br /&gt;If nestedCall Then Exit Sub&lt;br /&gt;&lt;br /&gt;' Test the control's value here.&lt;br /&gt;If IsNumeric(Text1.Text) Then&lt;br /&gt;' If value is OK, save values.&lt;br /&gt;saveText = Text1.Text&lt;br /&gt;saveSelStart = Text1.SelStart&lt;br /&gt;Else&lt;br /&gt;' Prepare to handle a nested call. &lt;br /&gt;nestedCall = True&lt;br /&gt;Text1.Text = saveText&lt;br /&gt;nestedCall = False&lt;br /&gt;Text1.SelStart = saveSelStart&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)&lt;br /&gt;saveSelStart = Text1.SelStart&lt;br /&gt;End Sub&lt;br /&gt;Private Sub Text1_MouseDown(Button As Integer, _&lt;br /&gt;Shift As Integer, X As Single, Y As Single)&lt;br /&gt;saveSelStart = Text1.SelStart&lt;br /&gt;End Sub&lt;br /&gt;Private Sub Text1_MouseMove(Button As Integer, _&lt;br /&gt;Shift As Integer, X As Single, Y As Single)&lt;br /&gt;saveSelStart = Text1.SelStart&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;If the control's value doesn't pass your tests in the Change event procedure, you must restore its previous valid value; this action recursively fires a Change event, and you must prepare yourself to neutralize this nested call. You might wonder why you also need to trap the KeyUp, MouseDown, and MouseMove events: The reason is that you always need to keep track of the last valid position for the insertion point because the end user could move it using arrow keys or the mouse.&lt;br /&gt;&lt;br /&gt;The preceding code snippet uses the IsNumeric function to trap invalid data. You should be aware that this function isn't robust enough for most real-world applications. For example, the IsNumeric function incorrectly considers these strings as valid numbers:&lt;br /&gt;&lt;br /&gt;123,,,123&lt;br /&gt;345-&lt;br /&gt;$1234 ' What if it isn't a currency field?&lt;br /&gt;2.4E10 ' What if I don't want to support scientific notation?&lt;br /&gt;&lt;br /&gt;To cope with this issue, I have prepared an alternative function, which you can modify for your particular purposes. (For instance, you can add support for a currency symbol or the comma as the decimal separator.) Note that this function always returns True when it's passed a null string, so you might need to perform additional tests if the user isn't allowed to leave the field blank:&lt;br /&gt;&lt;br /&gt;Function CheckNumeric(text As String, DecValue As Boolean) As Boolean&lt;br /&gt;Dim i As Integer&lt;br /&gt;For i = 1 To Len(text)&lt;br /&gt;Select Case Mid$(text, i, 1)&lt;br /&gt;Case "0" To "9"&lt;br /&gt;Case "-", "+"&lt;br /&gt;' Minus/plus signs are only allowed as leading chars.&lt;br /&gt;If i &gt; 1 Then Exit Function&lt;br /&gt;Case "."&lt;br /&gt;' Exit if decimal values not allowed.&lt;br /&gt;If Not DecValue Then Exit Function&lt;br /&gt;' Only one decimal separator is allowed.&lt;br /&gt;If InStr(text, ".") &lt; i Then Exit Function&lt;br /&gt;Case Else&lt;br /&gt;' Reject all other characters.&lt;br /&gt;Exit Function&lt;br /&gt;End Select&lt;br /&gt;Next&lt;br /&gt;CheckNumeric = True&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;If your TextBox controls are expected to contain other types of data, you might be tempted to reuse the same validation framework I showed you previously—including all the code in the GotFocus, Change, KeyUp, MouseDown, and MouseMove event procedures—and replace only the call to IsNumeric with a call to your custom validation routine. Things aren't as simple as they appear at first, however. Say that you have a date field: Can you use the IsDate function to validate it from within the Change event? The answer is, of course, no. In fact, as you enter the first digit of your date value, IsDate returns False and the routine therefore prevents you from entering the remaining characters, and so preventing you from entering any value.&lt;br /&gt;&lt;br /&gt;This example explains why a key-level validation isn't always the best answer to your validation needs. For this reason, most Visual Basic programmers prefer to rely on field-level validation and test the values only when the user moves the input focus to another field in the form. I explain field-level validation in the next section.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8286828103994852809?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8286828103994852809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/validation-routines-for-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8286828103994852809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8286828103994852809'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/validation-routines-for-numbers.html' title='Validation Routines for Numbers'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2900084011288559420</id><published>2009-08-24T23:57:00.001-07:00</published><updated>2009-08-24T23:57:33.151-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trapping Keyboard Activity - Visual Basic 6 TextBox Control'/><title type='text'>Trapping Keyboard Activity - Visual Basic 6 TextBox Control</title><content type='html'>TextBox controls support KeyDown, KeyPress, and KeyUp standard events. One thing that you will often do is prevent the user from entering invalid keys. A typical example of where this safeguard is needed is a numeric field, for which you need to filter out all nondigit keys:&lt;br /&gt;&lt;br /&gt;Private Sub Text1_KeyPress(KeyAscii As Integer)&lt;br /&gt;Select Case KeyAscii&lt;br /&gt;Case Is &lt; 32 ' Control keys are OK.&lt;br /&gt;Case 48 To 57 ' This is a digit.&lt;br /&gt;Case Else ' Reject any other key.&lt;br /&gt;KeyAscii = 0&lt;br /&gt;End Select&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;You should never reject keys whose ANSI code is less than 32, a group that includes important keys such as Backspace, Escape, Tab, and Enter. Also note that a few control keys will make your TextBox beep if it doesn't know what to do with them—for example, a single-line TextBox control doesn't know what to do with an Enter key.&lt;br /&gt;&lt;br /&gt;Don't assume that the KeyPress event will trap all control keys under all conditions. For example, the KeyPress event can process the Enter key only if there's no CommandButton control on the form whose Default property is set to True. If the form has a default push button, the effect of pressing the Enter key is clicking on that button. Similarly, no Escape key goes through this event if there's a Cancel button on the form. Finally, the Tab control key is trapped by a KeyPress event only if there isn't any other control on the form whose TabStop property is True.&lt;br /&gt;&lt;br /&gt;You can use the KeyDown event procedure to allow users to increase and decrease the current value using Up and Down arrow keys, as you see here:&lt;br /&gt;&lt;br /&gt;Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)&lt;br /&gt;Select Case KeyCode&lt;br /&gt;Case vbKeyUp&lt;br /&gt;Text1.Text = CDbl(Text1.Text) + 1&lt;br /&gt;Case vbKeyDown&lt;br /&gt;Text1.Text = CDbl(Text1.Text) -1&lt;br /&gt;End Select&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;There's a bug in the implementation of TextBox ready-only controls. When the Locked property is set to True, the Ctrl+C key combination doesn't correctly copy the selected text to the Clipboard, and you must manually implement this capability by writing code in the KeyPress event procedure&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2900084011288559420?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2900084011288559420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/trapping-keyboard-activity-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2900084011288559420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2900084011288559420'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/trapping-keyboard-activity-visual-basic.html' title='Trapping Keyboard Activity - Visual Basic 6 TextBox Control'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5175745588302115314</id><published>2009-08-24T23:56:00.000-07:00</published><updated>2009-08-25T00:06:32.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application'/><category scheme='http://www.blogger.com/atom/ns#' term='example for use'/><category scheme='http://www.blogger.com/atom/ns#' term='OptionButton'/><title type='text'>example for use OptionButton in Application</title><content type='html'>The application responds to the following events&lt;br /&gt;&lt;br /&gt;The change event of the TextBox reads the value and stores it in a form-level numeric variable.&lt;br /&gt;&lt;br /&gt;The click event of optOct button returns curretval in octal.&lt;br /&gt;&lt;br /&gt;The click event of the optHex button curerntval in hexadecimal&lt;br /&gt;&lt;br /&gt;The click event of the optDec button returns the decimal equivalent of the value held currentval.&lt;br /&gt;&lt;br /&gt;The following code is entered in the general declarations section of the Form.&lt;br /&gt;&lt;br /&gt;Dim currentval as variant&lt;br /&gt;&lt;br /&gt;The variable is initialized to 0 by default. The change event procedure checks to ascertain the number system (Octal, Hexadecimal) that is in effect and then reads in the number.&lt;br /&gt;&lt;br /&gt;Private Sub Text1_Change()&lt;br /&gt;If optOct.Value = True Then&lt;br /&gt;currentval = Val ("&amp;O" &amp; LTrim (Text1.Text) &amp; "&amp;")&lt;br /&gt;Elseif optDec.value = True Then&lt;br /&gt;currentval = Val (LTrim (Text1.Text) &amp; "&amp;")&lt;br /&gt;Else&lt;br /&gt;currentval = Val ("&amp;H" &amp; LTrim (Text1.Text) &amp; "&amp;")&lt;br /&gt;End if&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;The Val function is used to translate string to a number and can recognize Octal and Hexadecimal strings. The LTrim function trims the leading blanks in the text. The following code is entered in the click events of the OptionButton controls.&lt;br /&gt;&lt;br /&gt;Private Sub optOct_Click()&lt;br /&gt;Text1.Text = Oct(currentval)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub optHex_Click()&lt;br /&gt;Text1.Text = Hex(currentval)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub optDec_Click()&lt;br /&gt;Text1.Text = Format(currentval)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;The follwoing code is entered in the click event of teh Close button.&lt;br /&gt;&lt;br /&gt;Private Sub cmdClose_Click()&lt;br /&gt;Unlod Me&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;The Application is run by pressing F5 or clicking on the Run icon in the tool bar. By pressing the Exit button the program is terminated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5175745588302115314?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5175745588302115314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/example-for-use-optionbutton-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5175745588302115314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5175745588302115314'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/example-for-use-optionbutton-in.html' title='example for use OptionButton in Application'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8614806608980880532</id><published>2009-08-24T23:55:00.000-07:00</published><updated>2009-08-24T23:56:02.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Setting properties to a TextBox'/><title type='text'>Setting properties to a TextBox</title><content type='html'>Setting properties to a TextBox&lt;br /&gt;Text can be entered into the text box by assigning the necessary string to the text property of the control &lt;br /&gt;&lt;br /&gt;If the user needs to display multiple lines of text in a TextBox, set the MultiLine property to True&lt;br /&gt;&lt;br /&gt;To customize the scroll bar combination on a TextBox, set the ScrollBars property.&lt;br /&gt;&lt;br /&gt;Scroll bars will always appear on the TextBox when it's MultiLine property is set to True and its ScrollBars property is set to anything except None(0)&lt;br /&gt;&lt;br /&gt;If you set the MultilIne property to True, you can set the alignment using the Alignment property. The test is left-justified by default. If the MultiLine property is et to False, then setting the Alignment property has no effect.&lt;br /&gt;&lt;br /&gt;Run-Time Properties of a TextBox control&lt;br /&gt;The Text property is the one you'll reference most often in code, and conveniently it's the default property for the TextBox control. Three other frequently used properties are these:&lt;br /&gt;&lt;br /&gt;The SelStart property sets or returns the position of the blinking caret (the insertion point where the text you type appears). Note that the blinking cursor inside TextBox and other controls is named caret, to distinguish it from the cursor (which is implicitly the mouse cursor). When the caret is at the beginning of the contents of the TextBox control, SelStart returns 0; when it's at the end of the string typed by the user, SelStart returns the value Len(Text). You can modify the SelStart property to programmatically move the caret.&lt;br /&gt;&lt;br /&gt;The SelLength property returns the number of characters in the portion of text that has been highlighted by the user, or it returns 0 if there's no highlighted text. You can assign a nonzero value to this property to programmatically select text from code. Interestingly, you can assign to this property a value larger than the current text's length without raising a run-time error.&lt;br /&gt;&lt;br /&gt;The SelText property sets or returns the portion of the text that's currently selected, or it returns an empty string if no text is highlighted. Use it to directly retrieve the highlighted text without having to query Text, SelStart, and SelLength properties. What's even more interesting is that you can assign a new value to this property, thus replacing the current selection with your own. If no text is currently selected, your string is simply inserted at the current caret position.&lt;br /&gt;&lt;br /&gt;When you want to append text to a TextBox control, you should use the following code (instead of using the concatenation operator) to reduce flickering and improve performance:&lt;br /&gt;&lt;br /&gt;Text1.SelStart = Len(Text1.Text)&lt;br /&gt;Text1.SelText = StringToBeAdded&lt;br /&gt;&lt;br /&gt;One of the typical operations you could find yourself performing with these properties is selecting the entire contents of a TextBox control. You often do it when the caret enters the field so that the user can quickly override the existing value with a new one, or start editing it by pressing any arrow key:&lt;br /&gt;&lt;br /&gt;Private Sub Text1_GotFocus()&lt;br /&gt;Text1.SelStart = 0&lt;br /&gt;' A very high value always does the trick.&lt;br /&gt;Text1.SelLength = 9999&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Always set the SelStart property first and then the SelLength or SelText properties. When you assign a new value to the SelStart property, the other two are automatically reset to 0 and an empty string respectively, thus overriding your previous settings.&lt;br /&gt;&lt;br /&gt;The selected text can be copied to the Clipboard by using SelText:&lt;br /&gt;&lt;br /&gt;Clipboard.SelText text, [format]&lt;br /&gt;&lt;br /&gt;In the above syntax, text is the text that has to be placed into the Clipboard, and format has three possible values.&lt;br /&gt;&lt;br /&gt;1. VbCFLink - conversation information&lt;br /&gt;2. VbCFRTF - Rich Text Format&lt;br /&gt;3. VbCFText - Text&lt;br /&gt;&lt;br /&gt;We can get text from the clipboard using the GetText() function this way:&lt;br /&gt;&lt;br /&gt;Clipboard.GetText ([format])&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8614806608980880532?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8614806608980880532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/setting-properties-to-textbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8614806608980880532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8614806608980880532'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/setting-properties-to-textbox.html' title='Setting properties to a TextBox'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6395054452253647757</id><published>2009-08-24T19:00:00.000-07:00</published><updated>2009-08-24T19:02:24.246-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hoc management'/><category scheme='http://www.blogger.com/atom/ns#' term='image processing'/><category scheme='http://www.blogger.com/atom/ns#' term='pitfalls'/><title type='text'>Some of the pitfalls of ad hoc management</title><content type='html'>Everyone does projects. The idea that all it takes to be successful is technical knowledge and lots of intensive hard work leads to unnecessary stress, avoidable rework, unnecessary conflicts and a greater chance of failure. &lt;br /&gt;&lt;br /&gt;As fun and exciting as it might be, managing in an ad hoc, seat-of-the-pants, shoot-from-the-hip way is not the most effective way when it comes to managing projects. That is because projects often cannot be planned and carried out entirely from the top of your head. When you experience being overwhelmed, or your outcomes are not as good as they could have been, it may be time for managing in a more structured and thoughtful way.&lt;br /&gt;For example, when you start thinking about moving an office, you probably realize that it can be quite complex. There are many dependencies, such as if you committed to be out of the current space by a certain date, you have to make sure you can go somewhere, ideally to your new space. If the new space is not ready, you have to find another temporary place and/or storage. If you cannot find a mover or schedule phone and other installations, you may need to renegotiate the exit date. If the new space is not entirely ready, you need to carefully plan where and how people will operate. As you can see, there is a lot of complexity in even a simple move. This is a project. Managing it like a project and in the right way will improve your chances for success. Projects require a disciplined yet flexible approach. &lt;br /&gt;&lt;br /&gt;Not managing projects the right way leads to unnecessary rework and costs, delays, unsatisfied customers and hostile relationships. Think about the times that you or your customers have been impacted by late delivery of project results or by having to do unnecessary rework or by having yourself and others affected by confusion and chaos that could have been avoided by better project planning and control. Think about the time, effort and money that could have been saved. Think about the relations that were disrupted, in some cases irreparably so. In the unlikely case that you have no personal experience, think about high profile projects like the Challenger space shuttle in which poor project management practices led to loss of life or the “Big Dig” in Boston in which poor project planning, communications or control resulted in huge costs and delivery delays.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Managing projects well increases the probability of success and leads to better results, lower costs, less effort, shorter time, better relationships and the ability to continuously improve performance across multiple projects. At the same time, it is necessary to not over manage. Too much of anything is counter productive. In managing projects, the right balance between discipline and flexibility is best. &lt;br /&gt;&lt;br /&gt;Most projects are managed by people who are drafted because they have a combination of being available, have subject matter expertise, and are natural coordinators and/or good communicators. Many of these incidental project managers do a great job despite having had little or no training in project management. That is because much of project management is good common sense and because good project managers and performers combine acts of heroism, the acceptance of delays and other shortfalls, good leadership and management skills and the ability to adapt well in moment to moment project performance. &lt;br /&gt;&lt;br /&gt;Imagine how much better they might be with a more solid foundation&lt;br /&gt;&lt;br /&gt;source from :http://www.profsr.com/msproject/msproj04.htm&lt;br /&gt;&lt;a href="http://www.irecog.com"&gt;image processing&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6395054452253647757?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6395054452253647757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/some-of-pitfalls-of-ad-hoc-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6395054452253647757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6395054452253647757'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/some-of-pitfalls-of-ad-hoc-management.html' title='Some of the pitfalls of ad hoc management'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3571199354303854532</id><published>2009-08-24T18:44:00.000-07:00</published><updated>2009-08-24T19:00:18.335-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project management'/><category scheme='http://www.blogger.com/atom/ns#' term='effective'/><title type='text'>Projects, Their Outcomes and Project Management</title><content type='html'>Projects are efforts to achieve objectives, within finite time and cost expectations. Projects are contrasted with operational activities – the repetitive things performed regularly over time. In some way the dividing line between projects and operational activities is not clear; often an operational activity is a series of small projects. However, what is clear is, healthy projects have a finite end that is reached either when the project objectives have been met or when the project is cancelled.&lt;br /&gt;&lt;br /&gt;In this paper the term outcome will be used to mean any project result, whether it is a new or changed product, event or process. Projects produce outcomes like newly design car models, an annual budget, a great party, or a new procedure. The use of the outcome and its value after the project delivers it are the underlying justification for the project.&lt;br /&gt;&lt;br /&gt;So, what does it mean to manage a project? It is the application of a broad set of skills to properly initiate, plan, execute, control and close a project. The primary skills are scoping (i.e., describing and agreeing on project objectives and requirements), scheduling, and estimating. Added to these core skills are managing risk and uncertainty, managing quality, communicating, managing ourselves, and collaborating with others, including suppliers of goods and services and everyone else who works on or is affected by the project. The people who are involved or interested in a project are referred to as stakeholders.&lt;br /&gt;&lt;br /&gt;To put projects and project management into practical context, it is useful to take a systems view. This view recognizes that everything is operating in a system of interacting people, organizations, things and processes. Change or activity anywhere can have an effect elsewhere. The more one can predict the effect, the greater one's control of the system's performance. In complex systems, no one can ever predict the effect of actions with 100% accuracy. A project is a complex system. Project management itself is also a complex system.&lt;br /&gt;&lt;br /&gt;Figure 1, below, is a picture of project management as a system. The Unified Project Management Methodology (UPMM) is one of many views in use today to describe the various activities in managing projects. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.profsr.com/images/msproject03a.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 521px; height: 370px;" src="http://www.profsr.com/images/msproject03a.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A single project is managed from Originating, the time someone communicates an idea that may someday become a project, through Closing, the completion of the project, if in fact the project becomes a project and is completed. &lt;br /&gt;&lt;br /&gt;Surrounding the performance of a single project are activities that support and direct the organization and its ability to perform multiple projects in a complex, changing environment. These activities include Ongoing Improvement, the effort to learn from past experience and improve the way you perform and manage projects; Portfolio Management &amp; Governance, the decision making needed to select, initiate and continue the right projects and to manage the optimum use of scarce resources; and Multi-project Management, the process for looking across all of the projects being performed and managing them as a group to avoid conflicts and promote synergy. &lt;br /&gt;&lt;br /&gt;Effective portfolio management and multi-project management are among the most critical factors for successful projects. They address many of the root causes of chronic problems in projects, such as the chronic over burdening of resources and constant priority shifts that create confusion and impact productivity.&lt;br /&gt;&lt;br /&gt;Collaboration and Consulting represents the critical need for teamwork, communication, coordination and the management of knowledge and information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3571199354303854532?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3571199354303854532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/projects-their-outcomes-and-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3571199354303854532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3571199354303854532'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/projects-their-outcomes-and-project.html' title='Projects, Their Outcomes and Project Management'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5799890362918336674</id><published>2009-08-21T00:58:00.000-07:00</published><updated>2009-08-21T00:59:08.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows API Message'/><category scheme='http://www.blogger.com/atom/ns#' term='Where to get the funs descriptions from'/><title type='text'>Where to get the funs descriptions from</title><content type='html'>This topics won't tell how to change the button text through API or how to find a file quickly. It is not a API functions documentation.&lt;br /&gt;&lt;br /&gt;To get the description of an API function, you need to have either SDK help file or the Microsoft SDK documentation (it's more that 40MB I think - how can I place it here?). Such SDK helps are shipped with Borland Delphi 3.0 package or MS Visual C++ 5.0 for example. Search the Internet and ask your friends to get one. The newer it is the better.&lt;br /&gt;&lt;br /&gt;Note that SDK help for Win 3.x won't help you as some functions are obsolete, though most of them still exist for compatibility in Win95.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5799890362918336674?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5799890362918336674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/where-to-get-funs-descriptions-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5799890362918336674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5799890362918336674'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/where-to-get-funs-descriptions-from.html' title='Where to get the funs descriptions from'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5732272851199691000</id><published>2009-08-21T00:54:00.000-07:00</published><updated>2009-08-21T00:58:17.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Some Windows Specifics'/><title type='text'>API : Some Windows Specifics</title><content type='html'>This topic is intended to give you a clue about some Windows specifics that are not the same under VB.&lt;br /&gt;&lt;br /&gt;Windows identifies every form, control, menu, menu item or whatever you can think of by its handle. When your application is run, every control on it is assigned a handle which is used later to separate the button from the rest of the controls. If you want to perform any operation on the button through an API you must use this handle. Where to get it from? Well VB has provided a Hwnd property for all controls that have handles in Windows.&lt;br /&gt;&lt;br /&gt;Windows works with pixels, not twips. So, it is a good idea to have the controls you'll use API functions over set their ScaleMode properties to Pixel(3) so that you can use ScaleXXX properties to get their metrics. But even though, you have this opportunity, you may still need to convert twips to pixels and vice versa. You do it using TwipsPerPixelX and TwipsPerPixelY or the global Screen object. Here it is:&lt;br /&gt;&lt;br /&gt;pixXValue = twipXValue \ Screen.TwipsPerPixelX&lt;br /&gt;pixYValue = twipYValue \ Screen.TwipsPerPixelY&lt;br /&gt;&lt;br /&gt;twipXValue = pixXValue * Screen.TwipsPerPixelX&lt;br /&gt;twipYValue = pixYValue * Screen.TwipsPerPixelY &lt;br /&gt;&lt;br /&gt;I haven't really seen the TwipsPerPixelX and TwipsPerPixelY value to be different, but its always better to make difference, at least for the good programing style. Also note that \ (for integer division) is used instead of / as pixels must always be whole numbers. &lt;br /&gt;&lt;br /&gt;Another thing to mention is that Windows uses different coordinate systems for the functions. So, be careful. &lt;br /&gt;&lt;br /&gt;And lastly, don't forget that VB is safe till the moment you begin to use APIs. A single syntax error in an API call may cause VB to crash (save often!). Also VB cannot debug APIs and if your program is crashing or behaving awkwardly, firstly check the API calls - for missed ByVal, for mistaken type or parameter, everything).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5732272851199691000?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5732272851199691000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/api-some-windows-specifics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5732272851199691000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5732272851199691000'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/api-some-windows-specifics.html' title='API : Some Windows Specifics'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-751773886255896888</id><published>2009-08-21T00:51:00.001-07:00</published><updated>2009-08-21T00:55:37.364-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows API Message'/><category scheme='http://www.blogger.com/atom/ns#' term='window handle'/><category scheme='http://www.blogger.com/atom/ns#' term='32 bit'/><title type='text'>Windows API Message</title><content type='html'>OK, now you know what API function is, but you have definitely heart of messages (if you haven't you will soon do) and wonder what this is.&lt;br /&gt;Messages are the basic way Windows tells your program that some kind of input has occurred and you must process it. A message to your form is sent when the user clicks on a button, moves the mouse over it or types text in a textbox.&lt;br /&gt;All messages are sent along with four parameters - a &lt;a href="http://www.geocities.com/SiliconValley/Lab/1632/atch05.html"&gt;window handle&lt;/a&gt;, a message identifier and two 32-bit (Long) values. The window handle contains the handle of the window the message is going to. The identifier is actually the type of input occurred (click, mousemove) and the two value specify an additional information for the message (like where is the mouse cursor when the mouse is been moved).&lt;br /&gt;But, when messages are sent to you, why don't you see them, looks like someone is stealing your mail. And before you get angry enough, let me tell you.&lt;br /&gt;The theft is actually VB. But he does not steal your mail, but instead read it for you and give you just the most important in a better look (with some information hidden from time to time). This better look is the events you write code for.&lt;br /&gt;So, when the user moves the mouse over your form, Windows sends WM_MOUSEMOVE to your window, VB get the message and its parameters and executes the code you've entered for Button_MouseMove event. Along the way, VB has transformed the second 32-bit value of the message (it contains the x and y position in pixels, 16-bit each) into two Single type value of twips.&lt;br /&gt;Now, say you need the coordinates of the mouse in pixels. VB converted them into twips, and now you will convert them into pixels again. Apart from losing time, it is somehow irritating to know Windows gives you what you need and VB "favorably" alters it so that you must re-alter it. Here you will ask - Can't I receive the messages myself. OK, there is a way called &lt;a href="http://www.geocities.com/SiliconValley/Lab/1632/atch12.html"&gt;SubClassing&lt;/a&gt;, but you should use it only if really necessary as it goes a bit against the concepts of safe programming of VB.&lt;br /&gt;Something else that needs to be said: You can send massages to your own window or to another one yourself. You just call SendMessage or PostMessage (SendMessage will cause the window to process the message immediately and Post message will post it onto a queue, called message queue, after any other messages waiting to be processed (it will return after the message is processed, i.e. with some delay)). You must specify the window handle to send the message to, the message identifier (all message identifiers are available as constants in VB API Text Viewer) and the two 32-bit values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-751773886255896888?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/751773886255896888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/windows-api-message.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/751773886255896888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/751773886255896888'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/windows-api-message.html' title='Windows API Message'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1249580728015699859</id><published>2009-08-21T00:51:00.000-07:00</published><updated>2009-08-21T00:54:41.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><category scheme='http://www.blogger.com/atom/ns#' term='API Declaration'/><title type='text'>API Declaration</title><content type='html'>As said in &lt;a href="http://www.geocities.com/SiliconValley/Lab/1632/atch02.html"&gt;What's API&lt;/a&gt;, functions are declared in Dlls located in the Windows System directory. You can type in the declaration of an API just as you do with any other function exported from a Dll, but VB has provided an easier way to do it. It is called API Text Viewer.&lt;br /&gt;To have some API declared in your project, just launch API Text Viewer, open Win32Api.txt (or .MDB if you have converted it into a database to speed it up), choose Declares, find the function, click Add and then Copy. Go to your project and paste it in. Do the same to have a predefined constant or type.&lt;br /&gt;There are few problems you may face:&lt;br /&gt;Suppose you want to declare a function in your form module. You paste the declaration and run the program. VB says Compile Error, ...and Declare statements not allowed as Public members of ... . Sounds bad, but it isn't, all you need to do is add Private in front of the declaration (like Private Declare Function ...). Do not forget, though, that the function will be visible only within this form module.&lt;br /&gt;In some cases, you may get the message Ambiguous name detected by VB. It means you have two functions, constants or whatsoever sharing one name. As most of the functions (maybe all of them, I haven't checked that) are aliased, which means they are given different names, and not their original using Alias clause, you may simply change the name of the function and it will still work.&lt;br /&gt;You may read the Declare statement help topic of VB's for description of Alias.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1249580728015699859?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1249580728015699859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/api-declaration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1249580728015699859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1249580728015699859'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/api-declaration.html' title='API Declaration'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4371065692421829804</id><published>2009-08-21T00:50:00.000-07:00</published><updated>2009-08-21T00:51:12.794-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# Primary Sites'/><title type='text'>C# Primary Sites</title><content type='html'>C# Primary Sites&lt;br /&gt;&lt;a href="http://www.codeproject.com/csharp/"&gt;The Code Project&lt;/a&gt; Whitepapers and code examples by category. Good code resource.&lt;a href="http://www.vcskicks.com/"&gt;Visual C# Kicks&lt;/a&gt;&lt;a href="http://www.developerfusion.com/csharp/"&gt;DeveloperFusion&lt;/a&gt; (C# Directory: U.K. Developer Community) &lt;a href="http://www.c-sharpcorner.com/"&gt;C# Corner&lt;/a&gt;C# developers network: code, downloads, discussions,... &lt;a href="http://www.csharphelp.com/"&gt;C# Help&lt;/a&gt;Help for C# Developers &lt;a href="http://msdn.microsoft.com/library/default.asp?URL=/library/techart/pdc_vsdescmp.htm"&gt;Creating Designable Components for Microsoft Visual Studio .NET Designers&lt;/a&gt;An introduction to using components in C# development. (July 2000 by Shawn Burke, Microsoft Corp.) &lt;a href="http://www.csharp-station.com/"&gt;C# Station&lt;/a&gt; &lt;a href="http://www.devx.com/dotnet/resources/vsresources-13.asp"&gt;DevX Resources&lt;/a&gt; &lt;a href="http://www.csharpfriends.com/"&gt;C# Friends&lt;/a&gt; See whitepapers, a class- "browser" reference, and more... by Salman Ahmed. &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Lutz Roeder's Programming .NET&lt;/a&gt;Tools and source code examples. Reflector assembly browser, Resourcer, Digger. Also applications and source code. &lt;a href="http://www.codehound.com/csharp/"&gt;Code Hound C# Search Engine&lt;/a&gt; &lt;a href="http://www.componentsnotebook.com/notebooks/csharp/index.html"&gt;C# Notebook&lt;/a&gt; Notebooks, Bookstore, Code, .dll tutorial,..much more &lt;a href="http://www.csharphelp.com/"&gt;CSharpHelp.Com&lt;/a&gt; The place for C# developers. &lt;a href="http://www.razorsoft.net/"&gt;Peter Drayton's .NET Goodies&lt;/a&gt;C# Utilities &amp;amp; samples with code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4371065692421829804?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4371065692421829804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/c-primary-sites.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4371065692421829804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4371065692421829804'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/c-primary-sites.html' title='C# Primary Sites'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4136247087091012624</id><published>2009-08-20T00:57:00.000-07:00</published><updated>2009-08-20T01:04:49.896-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='no of process'/><category scheme='http://www.blogger.com/atom/ns#' term='Graphically Show CPU'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory Usage'/><title type='text'>Graphically Show CPU Memory Usage  no of process</title><content type='html'>This is simple program that shows how to use performance calculator to get % CPU usage, memory usage in kb and number of processes running on the computer. You can modify the code for your convenience. Do reply me.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://vbcode.irecog.com/freecode/GraphDemo.zip"&gt;Downloads Hear&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4136247087091012624?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4136247087091012624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/graphically-show-cpu-memory-usage-no-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4136247087091012624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4136247087091012624'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/graphically-show-cpu-memory-usage-no-of.html' title='Graphically Show CPU Memory Usage  no of process'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4733607116518722549</id><published>2009-08-17T00:21:00.000-07:00</published><updated>2009-08-17T00:39:38.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic application'/><category scheme='http://www.blogger.com/atom/ns#' term='screen saver'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Operating System'/><title type='text'>Visual Basic application and create a full fledged screen saver</title><content type='html'>Visual Basic is a great developers language it allows you to create applications that are very functional and to do so in a quick way. This is why people love VB6. However, at times it can be hard to figure out how to interact directly with the Windows Operating System. To do this we need to make API calls. Anyone who has delved into using VB and API's knows that it can be a little cumbersome at times. However, this tutorial demonstrates how you can make the API calls from your Visual Basic application and create a full fledged screen saver!&lt;br /&gt;&lt;br /&gt;A screen saver at its core is very simple. It is simply a window that covers the entire screen. In Visual Basic 6 this is accomplished by createing a form that will be displayed full size overtop of everything else. Lets start with the simple. Create a new VB6 project with just the main form. Set the properties to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;&lt;strong&gt;Property Setting&lt;br /&gt;&lt;/strong&gt;Caption ""&lt;br /&gt;ControlBox False&lt;br /&gt;MinButton False&lt;br /&gt;MaxButton False&lt;br /&gt;BorderStyle 0 - None&lt;br /&gt;WindowState 2 - Maximized&lt;br /&gt;BackColor &amp;amp;H0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Private Declare Function SetWindowPos Lib "user32" _&lt;br /&gt;(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _&lt;br /&gt;ByVal x As Long, ByVal Y As Long, ByVal cx As Long, _&lt;br /&gt;ByVal cy As Long, ByVal wFlags As Long) As Long&lt;br /&gt;&lt;br /&gt;Private Declare Function ShowCursor Lib "user32" _&lt;br /&gt;(ByVal bShow As Long) As Long&lt;br /&gt;We are going to use these functions a little later. First lets create a helper subroutine that will always keep our form on top.&lt;br /&gt;&lt;br /&gt;Sub AlwaysOnTop (FrmID As Form, OnTop As Boolean)&lt;br /&gt;Const SWP_NOMOVE = 2&lt;br /&gt;Const SWP_NOSIZE = 1&lt;br /&gt;Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE&lt;br /&gt;Const HWND_TOPMOST = -1&lt;br /&gt;Const HWND_NOTOPMOST = -2&lt;br /&gt;&lt;br /&gt;If OnTop Then&lt;br /&gt;OnTop = SetWindowPos(FrmID.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)&lt;br /&gt;Else&lt;br /&gt;OnTop = SetWindowPos(FrmID.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;The next part is the load-up of our Screen Saver: put these lines in the Load event of the form. This will handle things when the Windows OS launches our screen saver.&lt;br /&gt;&lt;br /&gt;Select Case LCase(Left(Command, 2))&lt;br /&gt;Case "/p": End&lt;br /&gt;Case "/s"&lt;br /&gt;Case Else: Me.Hide: frmSettings.Show: Exit Sub&lt;br /&gt;End Select&lt;br /&gt;&lt;br /&gt;Dim x As Integer&lt;br /&gt;Call AlwaysOnTop(Me, True)&lt;br /&gt;x = ShowCursor(False)&lt;br /&gt;The form will always stay on top and the cursor will desappear.&lt;br /&gt;When the Screen Saver unloads, we must do the inverse. Put these lines in the Unload event of the form.&lt;br /&gt;&lt;br /&gt;Dim x As Integer&lt;br /&gt;x = ShowCursor(True)&lt;br /&gt;The first 5 lines of the Form_Load event are needed to make the Screen Saver work, work as an example or show its settings. Windows tells the Screen Saver what to do through command line parameters: /S tells the Screen Saver to start working, /P tells the Screen Saver to start working in a preview area, and no parameters makes the Screen Saver show its settings dialog. So, you may create a form called frmSettings that gives the opportunity to set Screen Saver parameters and to save them in a INI file or in the Registry; that dialog must unload the program when it is finished.&lt;br /&gt;&lt;br /&gt;Another important thing to do, is to handle the events that unload the Screen Saver. A Screen Saver is usually unloaded when we move the mouse or hit a key, so we'll put the instruction Unload Me in the KeyPress event of the form. For the MouseMove or MouseClick events, use these lines:&lt;br /&gt;&lt;br /&gt;Static Count As Integer&lt;br /&gt;Count = Count + 1&lt;br /&gt;If Count &gt; 5 Then&lt;br /&gt;Unload Me&lt;br /&gt;End If&lt;br /&gt;This makes sure that the mouse is moved atleast a little bit before it exits. Otherwise your screen saver will exit too easily (with just a bump of the desk or something).&lt;br /&gt;&lt;br /&gt;Well, it is your turn now! Can you creat an original and good Screen Saver. You can use controls (even OCXs) to create the graphic, and add code anywhere you want. If you want, you can download this example, located in the samples section of the site, demostrating a full working Screen Saver.&lt;br /&gt;&lt;br /&gt;Installing The Screen Saver&lt;br /&gt;When you have finished creating the look of the Screen Saver, it's the moment to compile it and bring it to life. Once you have compiled your Screen Saver, change its EXE extension to SCR. Then, copy it to the Windows\System folder.&lt;br /&gt;&lt;br /&gt;To use the Screen Saver, go in the Control Panel, double-click the icon Screen, select the second tab (Screen Saver) and select your program from the Screen Saver dropdown list. Then, click OK.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With these properties, the form will be black, will have no border, buttons or title bar and will cover all the screen.&lt;br /&gt;So, create a form and give it the above properties.&lt;br /&gt;&lt;br /&gt;Now we must do two other things. First, each screen saver is a form that stays on the top of all others. Second, we notice that, during the display of a Screen Saver, the mouse cursor desappear.&lt;br /&gt;&lt;br /&gt;To make our program do these two things, we first put these two lines in the declarations section of the form:&lt;br /&gt;&lt;br /&gt;from &lt;a href="http://www.vb6.us/tutorials/createing-visual-basic-screen-saver"&gt;http://www.vb6.us/tutorials/createing-visual-basic-screen-saver&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4733607116518722549?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4733607116518722549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/visual-basic-application-and-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4733607116518722549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4733607116518722549'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/visual-basic-application-and-create.html' title='Visual Basic application and create a full fledged screen saver'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4294371665004000214</id><published>2009-08-04T10:16:00.000-07:00</published><updated>2009-08-04T10:19:31.746-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ListBox'/><category scheme='http://www.blogger.com/atom/ns#' term='array can also be assigned'/><title type='text'>Working with arrays ListBox</title><content type='html'>An array can also be assigned to a variable in code. Look at the following example and understand that that is not an implicit declaration. The variable "Week" is declared as Variant. It is assigned an array value in code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.profsr.com/images/vb05f02.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 508px; height: 112px;" src="http://www.profsr.com/images/vb05f02.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, when we get to the next set of controls, different kinds of Lists, these notions may prove useful.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ListBox&lt;br /&gt;With the ListBox control the user can select items from a list of choices. Although the list of choices can be entered in the List property of the control, as in the example below, this is not a very good habit to get into. It is essentially "hardcoding" data into the program and it can cause maintenance headaches. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.profsr.com/images/vb05f03.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 508px; height: 112px;" src="http://www.profsr.com/images/vb05f03.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4294371665004000214?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4294371665004000214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/working-with-arrays-listbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4294371665004000214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4294371665004000214'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/working-with-arrays-listbox.html' title='Working with arrays ListBox'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-878152568201294655</id><published>2009-08-04T10:09:00.000-07:00</published><updated>2009-08-04T10:13:04.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='array is declared'/><title type='text'>Working with arrays</title><content type='html'>Before we get to today's lesson on common controls, we will cover a bit of programming theory on Arrays.&lt;br /&gt;In VB, arrays work in much the same way as they do in all other languages you have studied. By definition an array is an indexed variable, meaning it is one variable with many parts, each part being referenced by an index number. The index number being numeric, it can be manipulated by loop statements, incremented, decremented, etc. An array can contain any valid data type and, if it is of the Variant type, can even contain elements of different types.&lt;br /&gt;An array is declared like any other variable, with the addition of an index:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim Department(6) As String&lt;br /&gt;&lt;br /&gt;will declare an array of 7 elements of the String type (we assume that it will be 7 Department names). The only problem with this declaration is that the index goes from 0 to 6. So, if you want the name of the sixth Department you have to specify Department(5), which can be confusing at times.&lt;br /&gt;To work around this problem you can specify the starting index in the declaration:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim Months(1 To 12) As String&lt;br /&gt;&lt;br /&gt;Thus, Months(1) is January and Months(12) is December.&lt;br /&gt;You don't even have to start at 1. If your Sections are numbered 101 - 120 you can define an array: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim Sections(101 To 120) As Integer&lt;br /&gt;&lt;br /&gt;One common method of manipulating arrays is to use For...Next loops:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.profsr.com/images/vb05f01.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 468px; height: 308px;" src="http://www.profsr.com/images/vb05f01.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-878152568201294655?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/878152568201294655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/working-with-arrays.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/878152568201294655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/878152568201294655'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/08/working-with-arrays.html' title='Working with arrays'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-557740599798845668</id><published>2009-07-30T11:14:00.000-07:00</published><updated>2009-07-30T11:16:27.690-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='say C++ has multiple inheritance and .NET still'/><title type='text'>Finally! The Gold Medal, 1st Place</title><content type='html'>Finally! The Gold Medal, 1st Place, the highest award I can bestow goes to ... &lt;br /&gt;&lt;br /&gt;TA DAH! &lt;br /&gt;&lt;br /&gt;VB.NET is finally completely Object Oriented! &lt;br /&gt;&lt;br /&gt;Now when you go to the beach, the C++ programmers won't kick sand in your face and steal your (girlfriend/boyfriend - pick one). And you can still code a complete General Ledger Trial Balance while they're trying to figure out which header files to include. &lt;br /&gt;&lt;br /&gt;For the first time, you can code as close to the chip as you need to and access all the system internals your heart desires without having to resort to those nasty Win32 API calls. You've got inheritance, function overloading, asynchronous multithreading, garbage collection, and everything is an object. Can life get any better? &lt;br /&gt;&lt;br /&gt;Did I hear someone say C++ has multiple inheritance and .NET still doesn't? &lt;br /&gt;&lt;br /&gt;Burn the heretic! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from  http://visualbasic.about.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-557740599798845668?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/557740599798845668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/finally-gold-medal-1st-place.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/557740599798845668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/557740599798845668'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/finally-gold-medal-1st-place.html' title='Finally! The Gold Medal, 1st Place'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7629471327584362439</id><published>2009-07-30T11:13:00.001-07:00</published><updated>2009-07-30T11:13:52.366-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Bronze Award - 3rd Place'/><title type='text'>The Bronze Award - 3rd Place</title><content type='html'>The Bronze Award - 3rd Place, goes to Arrays are 0 based instead of 1 based! &lt;br /&gt;&lt;br /&gt;It's just one syntax change, but this change gets "medal podium" status because it is voted, "most likely to screw up your program logic". Remember, 3rd place IS "Award(2)" in our list. If you have counters and arrays in your VB6 program (and how many don't), this one will MESS YOU UP. &lt;br /&gt;&lt;br /&gt;For ten years, People have been asking, "What was Microsoft smoking when they did it this way?" And for ten years, programmers have sort of universally ignored the fact that there was a myArray(0) element that just took up space and didn't get used for anything ... Except for those programmers who DID use it and their programs looked, I mean, just "weird". &lt;br /&gt;&lt;br /&gt;For I = 1 to 5&lt;br /&gt;   MyArray(I - 1) = Whatever&lt;br /&gt;Next &lt;br /&gt;&lt;br /&gt;I mean, REALLY! ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7629471327584362439?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7629471327584362439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/bronze-award-3rd-place.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7629471327584362439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7629471327584362439'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/bronze-award-3rd-place.html' title='The Bronze Award - 3rd Place'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8662268695345273423</id><published>2009-07-30T11:12:00.001-07:00</published><updated>2009-07-30T11:14:43.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Probably no other single feature of Visual Basic &quot;notNet&quot;'/><title type='text'>Probably no other single feature of Visual Basic "notNet"</title><content type='html'>The Silver Medal of 2nd Place goes to honor an old friend that was dropped into the bit bucket of programming with the passing of VB6! I speak of none other than, The Variant Datatype.&lt;br /&gt;&lt;br /&gt;Probably no other single feature of Visual Basic "notNet" better represents the philosophy of "fast, cheap, and loose". This image dogged VB right up to the introduction of VB.NET. I'm old enough to remember the introduction of Visual Basic 3.0 by Microsoft: "Oh Wow! Lookee here! With the new, improved Variant data type, you don't have to declare variables or nothin'. You can just think 'em up and code 'em."&lt;br /&gt;&lt;br /&gt;Microsoft changed their tune pretty fast on that one and recommended declaring variables with a specific datatype almost immediately, leaving many of us to wonder, "If you can't use Variants, why have them?"&lt;br /&gt;&lt;br /&gt;But while we're on the subject of datatypes, I should mention that a lot of datatypes have changed in addition to dropping Variant into wet cement. There's a new Char datatype and a Long datatype that is 64 bits. Decimal is way different. Short and Integer aren't the same length anymore.&lt;br /&gt;&lt;br /&gt;And there is a new "Object" datatype that can be anything. Did I hear someone say, "Son of Variant"?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8662268695345273423?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8662268695345273423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/probably-no-other-single-feature-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8662268695345273423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8662268695345273423'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/probably-no-other-single-feature-of.html' title='Probably no other single feature of Visual Basic &quot;notNet&quot;'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2565644244678347222</id><published>2009-07-30T11:12:00.000-07:00</published><updated>2009-07-30T11:13:20.900-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='In 4th Place'/><category scheme='http://www.blogger.com/atom/ns#' term='we have Changes to Procedure'/><title type='text'>In 4th Place, we have Changes to Procedure</title><content type='html'>In 4th Place, we have Changes to Procedure Calls! &lt;br /&gt;&lt;br /&gt;This is the "goodness, purity, and wholesome virtue" award and represents a lot of hard campaigning by the "no more sloppy code" faction. &lt;br /&gt;&lt;br /&gt;In VB6, if a procedure parameter variable is an intrinsic type, then it's ByRef, unless you have coded it ByVal explicitly, but if it's not coded ByRef or ByVal and it's not an intrinsic variable then it's ByVal. ... Got that? &lt;br /&gt;&lt;br /&gt;In VB.NET, it's ByVal unless it's coded ByRef. &lt;br /&gt;&lt;br /&gt;The ByVal VB.NET default, by the way, also prevents changes to parameter variables in procedures from being unintentionally propagated back into the calling code - a key part of good OOP programming. &lt;br /&gt;&lt;br /&gt;Microsoft also "overloads" VB.NET with a change in the requirements for parentheses in procedure calls. &lt;br /&gt;&lt;br /&gt;In VB6, parentheses are required around arguments when making function calls, but not when calling a subroutine when not using the Call statement but they are required when the Call statement is used. &lt;br /&gt;&lt;br /&gt;In VB.NET, parentheses are always required around a nonempty argument list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2565644244678347222?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2565644244678347222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/in-4th-place-we-have-changes-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2565644244678347222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2565644244678347222'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/in-4th-place-we-have-changes-to.html' title='In 4th Place, we have Changes to Procedure'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6583968699229941378</id><published>2009-07-30T11:09:00.000-07:00</published><updated>2009-07-30T11:11:13.004-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='our 6th Place award goes to the C groupies'/><category scheme='http://www.blogger.com/atom/ns#' term='Award(5)&quot;'/><title type='text'>Award(5)", our 6th Place award goes to the C groupies</title><content type='html'>"Award(5)", our 6th Place award goes to the C groupies choice: C-like Syntax Changes! &lt;br /&gt;&lt;br /&gt;Now you can code a += 1 instead of a = a + 1, saving THREE WHOLE KEYSTROKES! &lt;br /&gt;&lt;br /&gt;Programmers of the World, Rejoice! VB has been raised up to C level, and a whole new generation trying to learn VB will get a little closer to the mass confusion that confronts students of C++. &lt;br /&gt;&lt;br /&gt;But wait! There's more! &lt;br /&gt;&lt;br /&gt;VB.NET now features "short circuit logic" that has introduced subtle bugs into C++ code for years to save precious nano-seconds of processor time. Short circuit logic only evaluates multiple conditions in a logical statement if necessary. For example: &lt;br /&gt;&lt;br /&gt;Dim R As Boolean&lt;br /&gt;R = Function1() And Function2() &lt;br /&gt;&lt;br /&gt;In VB6, both functions are evaluated whether they need it or not. With VB.NET, if Function1() is false, Function2() is ignored since "R" can't be True. But, what if a global variable is changed in Function2() - just by chance (C++ programmers would say, "by poor programming".) Why does my code produce the wrong answer some of the time when it's translated to VB.NET? This might be it! &lt;br /&gt;&lt;br /&gt;For Trying harder, VB.NET will Catch a little luck and Finally get recognized for "exceptional" error handling.&lt;br /&gt;&lt;br /&gt;VB6 had the last holdout GoTo: "On Error GoTo". Even I have to admit that the C++ style "Try-Catch-Finally" structured exception handling is a vast improvement, not just a half vast improvement. &lt;br /&gt;&lt;br /&gt;What, you say "On Error GoTo" is still in VB.NET? Wellll ... We try not to talk about that too much.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6583968699229941378?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6583968699229941378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/award5-our-6th-place-award-goes-to-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6583968699229941378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6583968699229941378'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/award5-our-6th-place-award-goes-to-c.html' title='Award(5)&quot;, our 6th Place award goes to the C groupies'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5850693202618530213</id><published>2009-07-30T11:08:00.001-07:00</published><updated>2009-07-30T11:12:46.315-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ObjPtr and StrPtr'/><category scheme='http://www.blogger.com/atom/ns#' term='VB.NET no longer supports VarPtr'/><title type='text'>VB.NET no longer supports VarPtr, ObjPtr and StrPtr</title><content type='html'>5th Place selection is a group award: The Miscellaneous Command Changes! They have to share this award and there's a gazillion of 'em. Microsoft has been saving up for ten years and they really cut loose.&lt;br /&gt;VB.NET no longer supports VarPtr, ObjPtr and StrPtr functions which retrieved the memory address of variables. And it doesn't support VB6 LSet which was used to convert one user defined type to another. (Not to be confused with VB6 LSet which does something completely different - see below.)&lt;br /&gt;We also bid fond adieu to Let, Is Missing, DefBool, DefByte, DefLng, DefCur, DefSng, DefDbl, DefDec, DefDate, DefStr, DefObj, DefVar, and (my personal favorite!) GoSub.&lt;br /&gt;Circle has morphed into GDI+ DrawEllipse. The same goes for Line to DrawLine. In calculation we now have Atan instead of Atn, Sign goes in for Sgn, and Sqrt suits up for the big game instead of Sqr.&lt;br /&gt;In string processing, even though they're still available if you reference a Microsoft compatibility namespace, we have PadRight for VB6's LSet (again, totally different than VB6's LSet, of course) and PadLeft for RSet. (There goes the three keystrokes we saved with "+="!)&lt;br /&gt;And of course, since we're OOP now, don't fret if Property Set, Property Let, and Property Get are not met in VB.NET, you bet!&lt;br /&gt;Finally, Debug.Print becomes either Debug.Write or Debug.WriteLine. Only nerds print everything anyway.&lt;br /&gt;This doesn't even touch all the NEW commands in VB.NET, but we've got to stop this nonsense somewhere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5850693202618530213?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5850693202618530213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/vbnet-no-longer-supports-varptr-objptr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5850693202618530213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5850693202618530213'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/vbnet-no-longer-supports-varptr-objptr.html' title='VB.NET no longer supports VarPtr, ObjPtr and StrPtr'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4672446894912941390</id><published>2009-07-30T11:08:00.000-07:00</published><updated>2009-07-30T11:10:15.215-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft decided'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET needed to do'/><title type='text'>.NET needed to do, Microsoft decided</title><content type='html'>In the meantime, Java, Python, and a whole lot of other programming languages that WERE object oriented started to appear. Visual Basic was getting passed up - big time! This is a situation Microsoft does not tolerate ... and they resolved to solve the problem once and for all. The solution is .NET.&lt;br /&gt;But to do the things that .NET needed to do, Microsoft decided that they had to "break compatibility". That is, Visual Basic programs had been (with very minor exceptions) "upward compatible" from VB1 right up to VB6. A program written in that first version of VB would still compile and run in the next version. But with VB.NET, Microsoft found they just couldn't make the language completely OOP and maintain upward compatibily.&lt;br /&gt;Once they made this fundamental decision, the flood gates opened on ten years of accumulated "wish list" changes and ALL of them went into the new VB.NET. As they say in Britain, "In for a penny, in for a pound."&lt;br /&gt;Without further delay, here's my very personal list of the top five changes from VB6 to VB.NET in reverse order.&lt;br /&gt;Wellllll .... just one further delay. Since we're changing from VB6, where an array declared as Dim myArray(5) has 6 elements, We have six of 'em. It's only fitting&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4672446894912941390?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4672446894912941390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/net-needed-to-do-microsoft-decided.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4672446894912941390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4672446894912941390'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/net-needed-to-do-microsoft-decided.html' title='.NET needed to do, Microsoft decided'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1634081732828338796</id><published>2009-07-30T11:02:00.000-07:00</published><updated>2009-07-30T11:08:34.450-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Top Five Changes between VB 6 and VB.NET'/><title type='text'>The Top Five Changes between VB 6 and VB.NET</title><content type='html'>Visual Basic 1.0 was a major earthquake throughout programming. Before VB1, you had to use C, C++, or some other horrible development environment to create Windows applications. Programmers literally spent weeks just drawing windows on screens with picky, detailed, hard to debug code. (The same thing you can do by dragging a form from the toolbar in a few seconds.) VB1 was a hit and gazillions of programmers immediately started using it.&lt;br /&gt;But to make the magic happen, Microsoft made some major architecture compromises. In particular, since VB1 created the forms and controls, they didn't allow the programmer access to the code that did it. You either let VB create everything, or you used C++.&lt;br /&gt;VB 2 through 6 maintained this same architecture. Microsoft made some very clever updates which gave programmers a lot more control, but in the final analysis programmers still couldn't integrate their code with the VB code. It was a black box - and not in the good OOP way either. Another way of saying this was that the programmer didn't have access to the internal VB "objects" and another way of saying that was that VB6 still wasn't fully "object oriented".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1634081732828338796?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1634081732828338796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/top-five-changes-between-vb-6-and-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1634081732828338796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1634081732828338796'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/top-five-changes-between-vb-6-and-vbnet.html' title='The Top Five Changes between VB 6 and VB.NET'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4507522252218053967</id><published>2009-07-30T11:01:00.001-07:00</published><updated>2009-07-30T11:02:36.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The reason for the error this time is that when the VB 6'/><title type='text'>The reason for the error this time is that when the VB 6</title><content type='html'>The reason for the error this time is that when the VB 6 code was pasted into VB.NET, Intellisense corrected another "error" and added the VB.NET default, ByVal. This doesn't allow the actual value of the argument to be changed, only the copy made for the subroutine. If this is changed to ByRef in the VB.NET program, all is well again. This is one thing the Upgrade Wizard does right, by the way. It's changed to ByRef automatically when the Wizard is run.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4507522252218053967?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4507522252218053967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/reason-for-error-this-time-is-that-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4507522252218053967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4507522252218053967'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/reason-for-error-this-time-is-that-when.html' title='The reason for the error this time is that when the VB 6'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6121623739323772669</id><published>2009-07-30T11:01:00.000-07:00</published><updated>2009-07-30T11:02:09.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The explanation can be found in this note found buried pretty'/><title type='text'>The explanation can be found in this note found buried pretty</title><content type='html'>The explanation can be found in this note found buried pretty deeply in the VB 6 documentation:&lt;br /&gt;You are not required to use the Call keyword when calling a procedure. However, if you use the Call keyword to call a procedure that requires arguments, argumentlist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentlist. If you use either Call syntax to call any intrinsic or user-defined function, the function's return value is discarded. Emphasis added.&lt;br /&gt;The actual behavior of the code doesn't seem to quite follow the documentation. But one thing is clear, the result is discarded. Not knowing this interesting bit of non-obvious behavior could result in a hard to find bug in VB 6.&lt;br /&gt;Because VB 6 didn't follow the conventions used by other languages and was generally confusing and inconsistent, Microsoft decided to scrap most of the procedure call syntax in VB 6 when they moved to VB.NET. In VB.NET, there is one way to do things and if you don't do it that way, an error results. Let's see what has to be done to convert this code to VB.NET.&lt;br /&gt;One way to convert the VB 6 project is to use the Upgrade Wizard. Just open the VB 6 project in VB.NET and the wizard takes over. But the Upgrade Wizard often misses a lot of optimization and can't convert some things at all. So a lot of programmers just copy and paste the code from VB 6 to VB.NET and correct the errors that result. If you do this with the first code example at the top of the article, there's just one error to correct: the fact that the variable CallingArg isn't declared. When this is declared as String, the program runs! But it doesn't quite get the right result as shown below:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6121623739323772669?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6121623739323772669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/explanation-can-be-found-in-this-note.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6121623739323772669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6121623739323772669'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/explanation-can-be-found-in-this-note.html' title='The explanation can be found in this note found buried pretty'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5406104482791495377</id><published>2009-07-30T10:55:00.000-07:00</published><updated>2009-07-30T10:59:43.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ByVal and ByRef: Passing Arguments in Visual Basic'/><title type='text'>ByVal and ByRef: Passing Arguments in Visual Basic</title><content type='html'>There are two ways to pass arguments to a procedure in Visual Basic: ByVal and ByRef. This refers to whether a copy of the argument is passed to the procedure (ByVal - the value is passed) or whether the actual argument itself is passed (ByRef - a reference to the argument is passed). The default for VB 6 is to call ByRef.&lt;br /&gt;&lt;br /&gt;There are also two types of procedures in Visual Basic: Function and Sub. The difference is that a Function returns the a value assigned to the function name and a Sub doesn't. So if you want to return a value to the calling routine, there are two ways to do it. In VB 6, the code that returns a value could look like this for a Sub:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Sub code to return a value from a procedure call &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Public Sub CallingSub()   CallingArg = "ABCDEF"   CalledSub CallingArg   MsgBox (CallingArg)End SubPublic Sub CalledSub(CalledArg)   CalledArg = "987654"End Sub&lt;br /&gt;Or the code could look like this for a Function:&lt;br /&gt;Function code to return a value from a procedure call&lt;br /&gt;Public Sub CallingSub()   CallingArg = "ABCDEF"   CalledFunc CallingArg   MsgBox (CallingArg)End SubPublic Function CalledFunc(CalledArg)   CalledArg = "987654"   CalledFunc = "Any Return Value"End Function&lt;br /&gt;The result of both is a messagebox that displays the value "987654" that is returned as a result of changing the value of the argument.&lt;br /&gt;Note that the main difference is that the function has just one more statement to assign a return value to the function name. In VB 6, the difference was sometimes considered meaningless and programmers often used subroutines rather than functions out of habit or just to save a statement.&lt;br /&gt;A few other "shortcuts" in VB 6 should be pointed out.&lt;br /&gt;No variables are declared.This means that all of the variables are of type "Variant" - similar to "Object" in VB.NET.&lt;br /&gt;No scoping or typing is done in the argument list.This means that everything uses the default settings.&lt;br /&gt;The procedure call doesn't use any parentheses or a Call keyword.&lt;br /&gt;This has some additional consequences. Let's look at those next. The illustration below shows an interesting result of simply changing whether parentheses are used or not in VB 6.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5406104482791495377?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5406104482791495377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/byval-and-byref-passing-arguments-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5406104482791495377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5406104482791495377'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/byval-and-byref-passing-arguments-in.html' title='ByVal and ByRef: Passing Arguments in Visual Basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8117928137973108979</id><published>2009-07-26T07:24:00.000-07:00</published><updated>2009-07-26T07:25:34.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIP'/><category scheme='http://www.blogger.com/atom/ns#' term='system services'/><category scheme='http://www.blogger.com/atom/ns#' term='Object Exchange'/><category scheme='http://www.blogger.com/atom/ns#' term='RTC'/><title type='text'>Object Exchange</title><content type='html'>Object Exchange  (OBEX)  protocol - Windows CE .Net's support for OBEX works over Bluetooth and infra red data association (IrDA) protocols . Object Exchange (OBEX) is an efficient, compact binary protocol that enables a wide range of devices to exchange data spontaneously in a simple, efficient manner.&lt;br /&gt;&lt;br /&gt;Media Sense - This feature improves the roaming experience for mobile devices users by notifying application of network status.&lt;br /&gt;&lt;br /&gt;Real time collaboration and communication (RTC/SIP) - Real time communication (RTC) enables messaging, presence, and audio (voice over IP between any two IP-enabled devices .&lt;br /&gt;&lt;br /&gt;Realiable core operating system services for demanding embedded designs : Windows CE .ET offers reliable core operating system services that enable the most demanding real time embedded designs across a breadth of devices .&lt;br /&gt;&lt;br /&gt;New and enhanced operating system features include:&lt;br /&gt;&lt;br /&gt;Small footprint: Continuing the effort to minimize the operating system footprint for embedded devices, Windows CE .NET provides granular Kernel componentization. Windows CE .NET supports a minimum configuration platform as small as 200 KB with minimum Kernel functions only.&lt;br /&gt;&lt;br /&gt;Enterprise-scale - Network security enhancements include support for the Kerberos Security Protocol.&lt;br /&gt;&lt;br /&gt;Wide selection of CPU'S- Windows CE .NET provides a high level of processor flexibility with support for the following four families of microprocessors and emulation technologies like ARM, MIPS, SHx, x 86 etc.&lt;br /&gt;&lt;br /&gt;Real time - Real time processing support for the most demanding support for the most demanding deterministic applications with 256 priority levels and nested interrupt support.&lt;br /&gt;&lt;br /&gt;Net- enabled for creating rich personalized experiences - Windows CE .NET enables you to build smart Microsoft .NET-enabled devices and create rich, personalized experiences.&lt;br /&gt;&lt;br /&gt;XML - XML allows developers to easily describe and deliver rich, structured data from any application in a standard consistent way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8117928137973108979?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8117928137973108979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/object-exchange.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8117928137973108979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8117928137973108979'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/object-exchange.html' title='Object Exchange'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8793742343020750180</id><published>2009-07-26T07:23:00.001-07:00</published><updated>2009-07-26T07:26:40.127-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Net compact Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='framwork'/><category scheme='http://www.blogger.com/atom/ns#' term='CE .NET'/><title type='text'>Net compact Framework :</title><content type='html'>&lt;strong&gt;Net compact Framework :&lt;/strong&gt; The .NET Compact Framework supports all processors supported by windows CE .NET . For more information on how to develop application using the .NET Framework, please see .NET on the MSDN site. Look in the .NET Compact Framework Read me' for specific information about implementation issues in your embedded design.&lt;br /&gt;&lt;br /&gt;Microsoft Direct3D API - Provides support for interactive three-dimensional   (3-D) graphics applications by allowing device dependent access to 30d video-display hardware in devices-independent manner.&lt;br /&gt;&lt;br /&gt;Windows Media 8 compressor/decompressor (codecs) and controls - Supports the latest Microsoft Windows Media 8 codes and controls ,which allows for the latest high-bandwidth encoded multimedia streams .&lt;br /&gt;&lt;br /&gt;Easy-to-use end-to-end tool set:  Windows CE .NET provides an integrated end-to-end tool set to help developers reduce both operating system and application development time, allowing them to get devices to market faster. &lt;br /&gt;&lt;br /&gt;These tools include:&lt;br /&gt;&lt;br /&gt;Emulation technology - Windows CE .NET include emulation technology to enable developers to build and test their designs on their Windows 2000 or Windows xp professional workstations without additional hardware investments.&lt;br /&gt;&lt;br /&gt;New platform wizard - The new platform wizard provides a foundation for starting device designs for:&lt;br /&gt;&lt;br /&gt;Cellophanes / Smart phones &lt;br /&gt;Custom devices &lt;br /&gt;Digital imaging devices &lt;br /&gt;Industrial automation devices &lt;br /&gt;Internet/media appliances &lt;br /&gt;Personal digital assistants (PDA)/Mobile handhelds &lt;br /&gt;Residential gateways &lt;br /&gt;Retail point-of-sale &lt;br /&gt;Set-top boxes &lt;br /&gt;Tiny kernels &lt;br /&gt;Web pads Windows thin clients&lt;br /&gt;Support for managed and native code - To write applications for Windows CE .NET, Microsoft offers a rich set of languages for creating managed .NET-enabled or unmanaged (native) applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8793742343020750180?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8793742343020750180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/net-compact-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8793742343020750180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8793742343020750180'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/net-compact-framework.html' title='Net compact Framework :'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3773522661139821758</id><published>2009-07-26T07:23:00.000-07:00</published><updated>2009-07-26T07:24:28.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scalable'/><category scheme='http://www.blogger.com/atom/ns#' term='devices'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows CE .NET'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='connect'/><category scheme='http://www.blogger.com/atom/ns#' term='technologies'/><category scheme='http://www.blogger.com/atom/ns#' term='flexibly'/><title type='text'>Windows CE .NET:</title><content type='html'>Windows CE .NET:&lt;br /&gt;&lt;br /&gt;Window CE .NET is the successor to Windows CE 3.0 Designed from the ground up for the embedded marketplace, Window CE .NET aims to deliver a robust realtime operating system for rapidly building the next generation of smart mobile and small footprint devices. &lt;br /&gt;&lt;br /&gt;With a complete operating system feature set and end-to-end development environment Windows CE-based devices that requires rich networking hard real time, and a small footprint , as well as rich multimedia and Web browsing capabilities. &lt;br /&gt;&lt;br /&gt;Windows CE .NET offers :&lt;br /&gt;&lt;br /&gt;Scalable  wireless technologies : Windows CE.NET include scalable wireless technologies that enable mobile devices to flexibly connect into existing infrastructures . Supported wireless technologies include Bluetooth.&lt;br /&gt;&lt;br /&gt;Windows CE .NET allows a devices to use a Bluetooth-enabled cellular phone as a data modem , and to use a Bluetooth-enabled local area network (LAN) access point to provide network connectivity .&lt;br /&gt;&lt;br /&gt;802.1x/Zero Configuration - New features in window CE .NET i.e., 802.11 zero configuration, aim to simplify setup of 802.11 network and to enable seamless roaming from one 802.11 network to another. 801.1x and EAP enhance the security of 802.11 by enabling user/password, certificate, or original equipment manufacturer (OEM) specific authentication to log on to the network.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3773522661139821758?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3773522661139821758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/windows-ce-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3773522661139821758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3773522661139821758'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/windows-ce-net.html' title='Windows CE .NET:'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3140728604529077255</id><published>2009-07-26T07:20:00.000-07:00</published><updated>2009-07-26T07:23:02.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='function in vb 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Graphics  very important'/><category scheme='http://www.blogger.com/atom/ns#' term='totorial'/><title type='text'>With Command Explained</title><content type='html'>Introduction&lt;br /&gt;As mentioned above this tutorial focuses on the With command in Visual Basic 6.0, you can use it to control object on your forms and to set the properties like you can with the click of a mouse. I can hear you ask "Why use this when you can set properties with mouse clicks?". Well the answer is, in the programming world most people use this method and you can then easily change the property without going through any wizards or anything.&lt;br /&gt;&lt;br /&gt;Requirements&lt;br /&gt;For this tutorial you will need a Windows based operating system with a copy of Visual Basic 6.0 installed. Nothing else...&lt;br /&gt;&lt;br /&gt;The With Command&lt;br /&gt;I feel this command is sometimes underrated and most definantly underused in programs I have seen. People tend not to use this command as the Properties Window in Visual Basic allows you to do it much quicker without typing lines of code. In fact all you are doing is writing the code without typing (if that makes sense).&lt;br /&gt;&lt;br /&gt;The syntax for this is really simple...&lt;br /&gt;&lt;br /&gt;With objectname&lt;br /&gt;    'perform code&lt;br /&gt;End With&lt;br /&gt;Simply enough you replace the object name section with the name of your object e.g. dlgSplash. From here you can use the . (dot) to bring up the syntax suggest list of attributes to set. In our example we will load a splash dialog and then load the main program form.&lt;br /&gt;&lt;br /&gt;So say we startup with a sub-routine called main. Using our with command we will show the dlgSplash form and refresh it.&lt;br /&gt;&lt;br /&gt;Sub main()&lt;br /&gt;    'start with&lt;br /&gt;    With dlgSplash&lt;br /&gt;        'show form&lt;br /&gt;        .Show&lt;br /&gt;        &lt;br /&gt;        'refresh form&lt;br /&gt;        .Refresh&lt;br /&gt;&lt;br /&gt;    End With&lt;br /&gt;End Sub&lt;br /&gt;Simple enough eh? All this does is shorten the dlgSplash.Show to what you see above in the example. Our final code example will have the code above and then load the new form for the main program and remove the splash dialog.&lt;br /&gt;Sub main()    'start with    With dlgSplash        'show form        .Show                'refresh form        .Refresh&lt;br /&gt;        'show program form        frmMain.Show&lt;br /&gt;        'unload splash        Unload dlgSplash&lt;br /&gt;    End WithEnd Sub&lt;br /&gt;As you may have guessed by now we can shorten the frmMain.Show to this...&lt;br /&gt;With frmMain    .ShowEnd With&lt;br /&gt;However if you have a property call in this in an if function for example you have to referenceit properly even though the With may already be where your object is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3140728604529077255?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3140728604529077255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/with-command-explained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3140728604529077255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3140728604529077255'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/with-command-explained.html' title='With Command Explained'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2853586456998835432</id><published>2009-07-09T07:06:00.000-07:00</published><updated>2009-07-09T07:10:25.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><category scheme='http://www.blogger.com/atom/ns#' term='scrollbar Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Using ScrollBar'/><title type='text'>VB ScrollBar - Using ScrollBar Control In Visual Basic 6</title><content type='html'>The ScrollBar is a commonly used control, which enables the user to select a value by positioning it at the desired location. It represents a set of values. The Min and Max property represents the minimum and maximum value. The value property of the ScrollBar represents its current value, that may be any integer between minimum and maximum values assigned.&lt;br /&gt;&lt;br /&gt;The HScrollBar and the VScrollBar controls are perfectly identical, apart from their different orientation. After you place an instance of such a control on a form, you have to worry about only a few properties: Min and Max represent the valid range of values, SmallChange is the variation in value you get when clicking on the scroll bar's arrows, and LargeChange is the variation you get when you click on either side of the scroll bar indicator. The default initial value for those two properties is 1, but you'll probably have to change LargeChange to a higher value. For example, if you have a scroll bar that lets you browse a portion of text, SmallChange should be 1 (you scroll one line at a time) and LargeChange should be set to match the number of visible text lines in the window.&lt;br /&gt;&lt;br /&gt;The most important run-time property is Value, which always returns the relative position of the indicator on the scroll bar. By default, the Min value corresponds to the leftmost or upper end of the control:&lt;br /&gt;&lt;br /&gt;' Move the indicator near the top (or left) arrow.&lt;br /&gt;VScroll1.Value = VScroll1.Min&lt;br /&gt;' Move the indicator near the bottom (or right) arrow.&lt;br /&gt;VScroll1.Value = VScroll1.Max&lt;br /&gt;&lt;br /&gt;While this setting is almost always OK for horizontal scroll bars, you might sometimes need to reverse the behavior of vertical scroll bars so that the zero is near the bottom of your form. This arrangement is often desirable if you want to use a vertical scroll bar as a sort of slider. You obtain this behavior by simply inverting the values in the Min and Max properties. (In other words, it's perfectly legal for Min to be greater than Max.)&lt;br /&gt;&lt;br /&gt;There are two key events for scrollbar controls: the Change event fires when you click on the scroll bar arrows or when you drag the indicator; the Scroll event fires while you drag the indicator. The reason for these two distinct possibilities is mostly historical. First versions of Visual Basic supported only the Change event, and when developers realized that it wasn't possible to have continuous feedback when users dragged the indicator, Microsoft engineers added a new event instead of extending the Change event. In this way, old applications could be recompiled without unexpected changes in their behavior. At any rate, this means that you must often trap two distinct events:&lt;br /&gt;&lt;br /&gt;' Show the current scroll bar's value. &lt;br /&gt;Private VScroll1_Change()&lt;br /&gt;Label1.Caption = VScroll1.Value&lt;br /&gt;End Sub&lt;br /&gt;Private VScroll1_Scroll()&lt;br /&gt;Label1.Caption = VScroll1.Value&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;The example shown in the following figure uses three VScrollBar controls as sliders to control the individual RGB (red, green, blue) components of a color. The three scroll bars have their Min property set to 255 and their Max property set to 0, while their SmallChange is 1 and LargeChange is 16. This example is also a moderately useful program in itself because you can select a color and then copy its numeric value to the clipboard and paste it in your application's code as a decimal value, a hexadecimal value, or an RGB function.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Use scrollbar controls to visually create colors.&lt;br /&gt;&lt;br /&gt;Scrollbar controls can receive the input focus, and in fact they support both the TabIndex and TabStop properties. If you don't want the user to accidentally move the input focus on a scrollbar control when he or she presses the Tab key, you must explicitly set its TabStop property to False. When a scrollbar control has the focus, you can move the indicator using the Left, Right, Up, Down, PgUp, PgDn, Home, and End keys. For example, you can take advantage of this behavior to create a read-only TextBox control with a numeric value that can be edited only through a tiny companion scroll bar. This scroll bar appears to the user as a sort of spin button, as you can see in the figure below. To make the trick work, you need to write just a few lines of code:&lt;br /&gt;&lt;br /&gt;Private Sub Text1_GotFocus()&lt;br /&gt;' Pass the focus to the scroll bar.&lt;br /&gt;VScroll1.SetFocus&lt;br /&gt;End Sub&lt;br /&gt;Private Sub VScroll1_Change()&lt;br /&gt;' Scroll bar controls the text box value.&lt;br /&gt;Text1.Text = VScroll1.Value&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Scrollbar controls are even more useful for building scrolling forms, like the one displayed in Figure 3-15. To be certain, scrolling forms aren't the most ergonomic type of user interface you can offer to your customers: If you have that many fields in a form, you should consider using a Tab control, child forms, or some other custom interface. Sometimes, however, you badly need scrollable forms, and in this situation you are on your own because Visual Basic forms don't support scrolling.&lt;br /&gt;&lt;br /&gt;Fortunately, it doesn't take long to convert a regular form into a scrollable one. You need a couple of scrollbar controls, plus a PictureBox control that you use as the container for all the controls on the form, and a filler control—a CommandButton, for example—that you place in the bottom-right corner of the form when it displays the two scroll bars. The secret to creating scrollable forms is that you don't move all the child controls one by one. Instead, you place all the controls in the PictureBox control (named picCanvas in the following code), and you move it when the user acts on the scroll bar:&lt;br /&gt;&lt;br /&gt;Sub MoveCanvas()&lt;br /&gt;picCanvas.Move -HScroll1.Value, -VScroll1.Value&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;In other words, to uncover the portion of the form near the right border, you assign a negative value to the PictureBox's Left property, and to display the portion near the form's bottom border you set its Top property to a negative value. It's really that simple. You do this by calling the MoveCanvas procedure from within the scroll bars' Change and Scroll events. Of course, it's critical that you write code in the Form_Resize event, which makes a scroll bar appear and disappear as the form is resized, and that you assign consistent values to Max properties of the scrollbar controls:&lt;br /&gt;&lt;br /&gt;' size of scrollbars in twips&lt;br /&gt;Const SB_WIDTH = 300 ' width of vertical scrollbars&lt;br /&gt;Const SB_HEIGHT = 300 ' height of horizontal scrollbars&lt;br /&gt;&lt;br /&gt;Private Sub Form_Resize()&lt;br /&gt;' Resize the scroll bars along the form.&lt;br /&gt;HScroll1.Move 0, ScaleHeight - SB_HEIGHT, ScaleWidth - SB_WIDTH&lt;br /&gt;VScroll1.Move ScaleWidth - SB_WIDTH, 0, SB_WIDTH, _&lt;br /&gt;ScaleHeight - SB_HEIGHT&lt;br /&gt;cmdFiller.Move ScaleWidth - SB_WIDTH, ScaleHeight - SB_HEIGHT, _&lt;br /&gt;SB_WIDTH, SB_HEIGHT&lt;br /&gt;&lt;br /&gt;' Put these controls on top.&lt;br /&gt;HScroll1.ZOrder &lt;br /&gt;VScroll1.ZOrder&lt;br /&gt;cmdFiller.ZOrder&lt;br /&gt;picCanvas.BorderStyle = 0&lt;br /&gt;&lt;br /&gt;' A click on the arrow moves one pixel.&lt;br /&gt;HScroll1.SmallChange = ScaleX(1, vbPixels, vbTwips)&lt;br /&gt;VScroll1.SmallChange = ScaleY(1, vbPixels, vbTwips)&lt;br /&gt;' A click on the scroll bar moves 16 pixels.&lt;br /&gt;HScroll1.LargeChange = HScroll1.SmallChange * 16&lt;br /&gt;VScroll1.LargeChange = VScroll1.SmallChange * 16&lt;br /&gt;&lt;br /&gt;' If the form is larger than the picCanvas picture box,&lt;br /&gt;' we don't need to show the corresponding scroll bar.&lt;br /&gt;If ScaleWidth &lt; picCanvas.Width + SB_WIDTH Then&lt;br /&gt;HScroll1.Visible = True&lt;br /&gt;HScroll1.Max = picCanvas.Width + SB_WIDTH - ScaleWidth&lt;br /&gt;Else&lt;br /&gt;HScroll1.Value = 0&lt;br /&gt;HScroll1.Visible = False&lt;br /&gt;End If&lt;br /&gt;If ScaleHeight &lt; picCanvas.Height + SB_HEIGHT Then&lt;br /&gt;VScroll1.Visible = True&lt;br /&gt;VScroll1.Max = picCanvas.Height + SB_HEIGHT - ScaleHeight&lt;br /&gt;Else&lt;br /&gt;VScroll1.Value = 0&lt;br /&gt;VScroll1.Visible = False&lt;br /&gt;End If&lt;br /&gt;' Make the filler control visible only if necessary.&lt;br /&gt;cmdFiller.Visible = (HScroll1.Visible Or VScroll1.Visible)&lt;br /&gt;MoveCanvas&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Working with scrollable forms at design time isn't comfortable. I suggest that you work with a maximized form and with the PictureBox control sized as large as possible. When you're finished with the form interface, resize the PictureBox control to the smallest area that contains all the controls, and then reset the form's WindowState property to 0-Normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2853586456998835432?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2853586456998835432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/vb-scrollbar-using-scrollbar-control-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2853586456998835432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2853586456998835432'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/07/vb-scrollbar-using-scrollbar-control-in.html' title='VB ScrollBar - Using ScrollBar Control In Visual Basic 6'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3533320055890493943</id><published>2009-05-27T00:58:00.000-07:00</published><updated>2009-05-27T01:00:36.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Circle Method'/><category scheme='http://www.blogger.com/atom/ns#' term='uses a common dialog box'/><title type='text'>The Circle Method,uses a common dialog box</title><content type='html'>The Circle Method&lt;br /&gt;&lt;br /&gt;The circle method takes the following format&lt;br /&gt;&lt;br /&gt;Circle (x1, y1), radius, color&lt;br /&gt;&lt;br /&gt;That draws a circle centered at (x1, y1), with a certain radius and a certain border color. For example, the procedure&lt;br /&gt;&lt;br /&gt;Circle (400, 400), 500, VbRed&lt;br /&gt;&lt;br /&gt;draws a circle centered at (400, 400) with a radius of 500 twips and a red border.&lt;br /&gt;&lt;br /&gt;---------&lt;br /&gt;example&lt;br /&gt; uses a common dialog box here to perform some of the jobs which could be difficult to perform . In this program, a user have to fill in all the coordinates and choose a color before he can proceed to draw the required shape. If one forget to fill in the coordinates or choose a color, he will be asked to do so. &lt;br /&gt;&lt;br /&gt;Private Sub Command2_Click()&lt;br /&gt;x1 = Text1.Text&lt;br /&gt;y1 = Text2.Text&lt;br /&gt;x2 = Text3.Text&lt;br /&gt;y2 = Text4.Text&lt;br /&gt;Picture1.Line (x1, y1)-(x2, y2), color, B&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Command3_Click()&lt;br /&gt;CommonDialog1.Flags = &amp;H1&amp;&lt;br /&gt;CommonDialog1.ShowColor&lt;br /&gt;color = CommonDialog1.color&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Command4_Click()&lt;br /&gt;On Error GoTo addvalues&lt;br /&gt;x3 = Text5.Text&lt;br /&gt;y3 = Text6.Text&lt;br /&gt;r = Text7.Text&lt;br /&gt;Picture1.Circle (x3, y3), r, color&lt;br /&gt;Exit Sub&lt;br /&gt;&lt;br /&gt;addvalues:&lt;br /&gt;MsgBox ("Please fill in the coordinates ,the radius and the color")&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Command5_Click()&lt;br /&gt;Picture1.Cls&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Command6_Click()&lt;br /&gt;x1 = Text1.Text&lt;br /&gt;y1 = Text2.Text&lt;br /&gt;x2 = Text3.Text&lt;br /&gt;y2 = Text4.Text&lt;br /&gt;Picture1.Line (x1, y1)-(x2, y2), color, BF&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3533320055890493943?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3533320055890493943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/circle-methoduses-common-dialog-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3533320055890493943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3533320055890493943'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/circle-methoduses-common-dialog-box.html' title='The Circle Method,uses a common dialog box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6355781336595336650</id><published>2009-05-27T00:57:00.000-07:00</published><updated>2009-05-27T00:58:28.093-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Drawing Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='Line and Circle'/><category scheme='http://www.blogger.com/atom/ns#' term='PSet'/><title type='text'>PSet, Line and Circle Drawing Methods</title><content type='html'>PSet, Line and Circle Drawing Methods&lt;br /&gt;&lt;br /&gt;Other than using the line and shape controls to draw graphics on the form, you can also use the Pset, Line and Circle methods to draw graphics on the form. &lt;br /&gt;&lt;br /&gt;(a) The Pset Method&lt;br /&gt;&lt;br /&gt;The Pset method draw a dot on the screen, it takes the format&lt;br /&gt;&lt;br /&gt;Pset (x , y ), color&lt;br /&gt;&lt;br /&gt;(x,y) is the coordinates of the point and color is its color. To specify the color, you can use the color codes or the standard VB color constant such as VbRed, VbBlue, VbGeen and etc. For example, Pset(100,200), VbRed will display a red dot at the (100,200) coordinates.&lt;br /&gt;&lt;br /&gt;The Pset method can also be used to draw a straight line on the form. The procedure is&lt;br /&gt;&lt;br /&gt;For x= a to b&lt;br /&gt;&lt;br /&gt;Pset(x,x)&lt;br /&gt;&lt;br /&gt;Next x&lt;br /&gt;&lt;br /&gt;This procedure will draw a line starting from the point (a,a) and to the point (b,b). For example, the following procedure will draw a magenta line from the point (0,0) to the point (1000,1000).&lt;br /&gt;&lt;br /&gt;For x= 0 to 100&lt;br /&gt;&lt;br /&gt;Pset(x,x) , vbMagenta&lt;br /&gt;&lt;br /&gt;Next x&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6355781336595336650?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6355781336595336650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/pset-line-and-circle-drawing-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6355781336595336650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6355781336595336650'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/pset-line-and-circle-drawing-methods.html' title='PSet, Line and Circle Drawing Methods'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-9089757747313742509</id><published>2009-05-27T00:55:00.000-07:00</published><updated>2009-05-27T00:57:46.003-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='In this example'/><category scheme='http://www.blogger.com/atom/ns#' term='the ‘change pictures’ button'/><category scheme='http://www.blogger.com/atom/ns#' term='shown'/><category scheme='http://www.blogger.com/atom/ns#' term='each time you click'/><title type='text'>In this example, each time you click on the ‘change pictures’ button as shown</title><content type='html'>In this example, each time you click on the ‘change pictures’ button as shown in Figure 19.2, you will be able to see three images loaded into the image boxes. This program uses the Rnd function to generate random integers and then uses the LoadPicture method to load different pictures into the image boxes using the If…Then…Statements based on the random numbers generated. The output is shown in Figure below&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 297px; CURSOR: hand; HEIGHT: 184px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/Images/figure18a_3.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Dim a, b, c As Integer&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click ()&lt;br /&gt;&lt;br /&gt;Randomize Timer&lt;br /&gt;&lt;br /&gt;a = 3 + Int(Rnd * 3)&lt;br /&gt;&lt;br /&gt;b = 3 + Int(Rnd * 3)&lt;br /&gt;&lt;br /&gt;c = 3 + Int(Rnd * 3)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;If a = 3 Then&lt;br /&gt;&lt;br /&gt;Image1(0).Picture = LoadPicture("C:\My Folder\VB program\Images\grape.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If a = 4 Then&lt;br /&gt;&lt;br /&gt;Image1(0).Picture = LoadPicture("C:\My Folder\VB program\Images\cherry.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If a = 5 Then&lt;br /&gt;&lt;br /&gt;Image1(0).Picture = LoadPicture("C:\My Folder\VB program\Images\orange.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If b = 3 Then&lt;br /&gt;&lt;br /&gt;Image1(1).Picture = LoadPicture("C:\My Folder\VB program\Images\grape.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If b = 4 Then&lt;br /&gt;&lt;br /&gt;Image1(1).Picture = LoadPicture("C:\My Folder\VB program\Images\cherry.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If b = 5 Then&lt;br /&gt;&lt;br /&gt;Image1(1).Picture = LoadPicture("C:\My Folder\VB program\Images\orange.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If c = 3 Then&lt;br /&gt;&lt;br /&gt;Image1(2).Picture = LoadPicture("C:\My Folder\VB program\Images\grape.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If c = 4 Then&lt;br /&gt;&lt;br /&gt;Image1(2).Picture = LoadPicture("C:\My Folder\VB program\Images\cherry.gif")&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;If c = 5 Then&lt;br /&gt;&lt;br /&gt;Image1(2).Picture = LoadPicture("C:\My Folder\VB program\Images\orange.gif")&lt;br /&gt;&lt;br /&gt;End If&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/1703949483545735951-9089757747313742509?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/9089757747313742509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/in-this-example-each-time-you-click-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/9089757747313742509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/9089757747313742509'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/in-this-example-each-time-you-click-on.html' title='In this example, each time you click on the ‘change pictures’ button as shown'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-775251745741164939</id><published>2009-05-27T00:53:00.001-07:00</published><updated>2009-05-27T00:55:05.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Image Box and the Picture Box'/><title type='text'>The Image Box and the Picture Box</title><content type='html'>The Image Box and the Picture Box&lt;br /&gt;&lt;br /&gt;Using the line and shape controls to draw graphics will only enable you to create a simple design. In order to improve the look of the interface, you need to put in images and pictures of your own. Fortunately, there are two very powerful graphics tools you can use in Visual Basic which are the image box and the picture box.&lt;br /&gt;&lt;br /&gt;To load a picture or image into an image box or a picture box, you can click on the picture property in the properties window and a dialog box will appear which will prompt the user to select a certain picture file. You can also load a picture at runtime by using the LoadPictrure ( ) method. The syntax is&lt;br /&gt;&lt;br /&gt;Image1.Picture= LoadPicture("C:\path name\picture file name") or&lt;br /&gt;&lt;br /&gt;picture1.Picture= LoadPicture("C:\path name\picture name")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For example, the following statement will load the grape.gif picture into the image box.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Image1.Picture= LoadPicture("C:\My Folder\VB program\Images\grape.gif")&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-775251745741164939?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/775251745741164939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/image-box-and-picture-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/775251745741164939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/775251745741164939'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/image-box-and-picture-box.html' title='The Image Box and the Picture Box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2724814773594901944</id><published>2009-05-27T00:53:00.000-07:00</published><updated>2009-05-27T00:54:11.560-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='function in vb 6'/><category scheme='http://www.blogger.com/atom/ns#' term='The Code'/><title type='text'>The Code</title><content type='html'>The Code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Form_Load()&lt;br /&gt;&lt;br /&gt;List1.AddItem "Rectangle"&lt;br /&gt;&lt;br /&gt;List1.AddItem "Square"&lt;br /&gt;&lt;br /&gt;List1.AddItem "Oval"&lt;br /&gt;&lt;br /&gt;List1.AddItem "Circle"&lt;br /&gt;&lt;br /&gt;List1.AddItem "Rounded Rectangle"&lt;br /&gt;&lt;br /&gt;List1.AddItem "Rounded Square"&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Private Sub List1_Click()&lt;br /&gt;&lt;br /&gt;Select Case List1.ListIndex&lt;br /&gt;&lt;br /&gt;Case 0&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 0&lt;br /&gt;&lt;br /&gt;Case 1&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 1&lt;br /&gt;&lt;br /&gt;Case 2&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 2&lt;br /&gt;&lt;br /&gt;Case 3&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 3&lt;br /&gt;&lt;br /&gt;Case 4&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 4&lt;br /&gt;&lt;br /&gt;Case 5&lt;br /&gt;&lt;br /&gt;Shape1.Shape = 5&lt;br /&gt;&lt;br /&gt;End Select&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;&lt;br /&gt;CommonDialog1.Flags = &amp;H1&amp;&lt;br /&gt;&lt;br /&gt;CommonDialog1.ShowColor&lt;br /&gt;&lt;br /&gt;Shape1.BackColor = CommonDialog1.Color&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/1703949483545735951-2724814773594901944?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2724814773594901944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2724814773594901944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2724814773594901944'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/code.html' title='The Code'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6958398747697338415</id><published>2009-05-27T00:52:00.000-07:00</published><updated>2009-05-27T00:53:24.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='allows the user to change'/><category scheme='http://www.blogger.com/atom/ns#' term='the shape by selecting a particular shape from a list of options from a list box'/><category scheme='http://www.blogger.com/atom/ns#' term='The program in this example'/><title type='text'>The program in this example allows the user to change the shape by selecting a particular shape from a list of options from a list box</title><content type='html'>Example&lt;br /&gt;&lt;br /&gt;The program in this example allows the user to change the shape by selecting a particular shape from a list of options from a list box, as well as changing its color through a common dialog box. &lt;br /&gt;&lt;br /&gt;The objects to be inserted in the form are a list box, a command button, a shape control and a common dialog box. The common dialog box can be inserted by clicking on ‘project’ on the menu and then select the Microsoft Common Dialog Control 6.0 by clicking the check box. After that, the Microsoft Common Dialog Control 6.0 will appear in the toolbox; and you can drag it into the form. The list of items can be added to the list box through the AddItem method. The procedure for the common dialog box to present the standard colors is as follows:&lt;br /&gt;&lt;br /&gt;CommonDialog1.Flags = &amp;H1&amp;&lt;br /&gt;&lt;br /&gt;CommonDialog1.ShowColor&lt;br /&gt;&lt;br /&gt;Shape1.BackColor = CommonDialog1.Color&lt;br /&gt;&lt;br /&gt;The last line will change the background color of the shape by clicking on a particular color on the common dialog box as shown in the Figure below:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6958398747697338415?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6958398747697338415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/program-in-this-example-allows-user-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6958398747697338415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6958398747697338415'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/program-in-this-example-allows-user-to.html' title='The program in this example allows the user to change the shape by selecting a particular shape from a list of options from a list box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7384456836444297435</id><published>2009-05-27T00:48:00.000-07:00</published><updated>2009-05-27T00:49:40.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='line and Shape controls'/><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='mouse'/><title type='text'>vb 6  The line and Shape controls</title><content type='html'>To draw a straight line, just click on the line control and then use your mouse to draw the line on the form. After drawing the line, you can then change its color, width and style using the BorderColor, BorderWidth and BorderStyle properties.&lt;br /&gt;&lt;br /&gt;Similarly, to draw a shape, just click on the shape control and draw the shape on the form. The default shape is a rectangle, with the shape property set at 0. You can change the shape to square, oval, circle and rounded rectangle by changing the shape property’s value to 1, 2, 3 4, and 5 respectively. In addition, you can change its background color using the BackColor property, its border style using the BorderStyle property, its border color using the BorderColor pproperty as well its border width using the BorderWidth property.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7384456836444297435?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7384456836444297435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/vb-6-line-and-shape-controls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7384456836444297435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7384456836444297435'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/vb-6-line-and-shape-controls.html' title='vb 6  The line and Shape controls'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-81361945478542985</id><published>2009-05-27T00:46:00.001-07:00</published><updated>2009-05-27T00:48:50.933-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Graphics  very important'/><category scheme='http://www.blogger.com/atom/ns#' term='visual basic programming'/><title type='text'>Graphics is a very important part of visual basic programming</title><content type='html'>Graphics is a very important part of visual basic programming as an attractive interface will be appealing to the users. In the old BASIC, drawing and designing graphics are considered as difficult jobs, as they have to be programmed line by line in a text-based environment. However, in Visual Basic, these jobs have been made easy. There are four basic controls in VB that you can use to draw graphics on your form: the line control, the shape control, the image box and the picture box&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-81361945478542985?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/81361945478542985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/graphics-is-very-important-part-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/81361945478542985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/81361945478542985'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/graphics-is-very-important-part-of.html' title='Graphics is a very important part of visual basic programming'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3424240721752740677</id><published>2009-05-27T00:46:00.000-07:00</published><updated>2009-05-27T00:47:00.881-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Sample Program: Reading file'/><category scheme='http://www.blogger.com/atom/ns#' term='Download  source codes vb 6 free'/><title type='text'>Sample Program: Reading file</title><content type='html'>Reading a file&lt;br /&gt;To read a file created in section 17.2,  you can use the input # statement. However, we can only read the file according to the format when it was written. You have to open the file according to its file number and the variable that hold the data. We also need to declare the variable using the DIM command. &lt;br /&gt;&lt;br /&gt;Sample Program: Reading file &lt;br /&gt;&lt;br /&gt;Private Sub Reading_Click() &lt;br /&gt;Dim variable1 As String &lt;br /&gt;Open "c:\My Documents\sample.txt" For Input As #1 &lt;br /&gt;Input #1, variable1 &lt;br /&gt;Text1.Text = variable1 &lt;br /&gt;Close #1 &lt;br /&gt;&lt;br /&gt;End Sub &lt;br /&gt;&lt;br /&gt;* This program will open the sample.txt file and display its contents in the Text1 textbox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3424240721752740677?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3424240721752740677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-program-reading-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3424240721752740677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3424240721752740677'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-program-reading-file.html' title='Sample Program: Reading file'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4533451734861935120</id><published>2009-05-27T00:43:00.001-07:00</published><updated>2009-05-27T00:46:07.113-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Sample Program  Creating a text file'/><title type='text'>Sample Program : Creating a text file</title><content type='html'>Creating files To create a file , we use the following command&lt;br /&gt;Open "fileName" For Output As #fileNumber&lt;br /&gt;Each file created must have a file name and a file number for identification. As for the file name, you must also specify the path where the file will reside.&lt;br /&gt;Examples:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Open "c:\My Documents\sample.txt" For Output As #1&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;will create a text file by the name of sample.txt in My Document folder. The accompany file number is 1. If you wish to create and save the file in A drive, simply change the path, as follows"&lt;br /&gt;&lt;strong&gt;Open "A:\sample.txt" For Output As #1&lt;/strong&gt;&lt;br /&gt;If you wish to create a HTML file , simply change the extension to .html&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Open "c:\My Documents\sample.html" For Output As # 2&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sample Program : Creating a text file&lt;br /&gt;&lt;br /&gt;Private Sub create_Click()&lt;br /&gt;&lt;br /&gt;Dim intMsg As String&lt;br /&gt;Dim StudentName As String&lt;br /&gt;&lt;br /&gt;Open "c:\My Documents\sample.txt" For Output As #1&lt;br /&gt;intMsg = MsgBox("File sample.txt opened")&lt;br /&gt;StudentName = InputBox("Enter the student Name")&lt;br /&gt;Print #1, StudentName&lt;br /&gt;intMsg = MsgBox("Writing a" &amp;amp; StudentName &amp;amp; " to sample.txt ")&lt;br /&gt;&lt;br /&gt;Close #1&lt;br /&gt;&lt;br /&gt;intMsg = MsgBox("File sample.txt closed")&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;* The above program will create a file sample.txt in the My Documents' folder and ready to receive input from users. Any data input by users will be saved in this text file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4533451734861935120?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4533451734861935120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-program-creating-text-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4533451734861935120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4533451734861935120'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-program-creating-text-file.html' title='Sample Program : Creating a text file'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3520895776130773340</id><published>2009-05-27T00:43:00.000-07:00</published><updated>2009-05-27T00:44:42.176-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='VB Program'/><category scheme='http://www.blogger.com/atom/ns#' term='CDRW'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><title type='text'>Working with Files</title><content type='html'>Up until lesson  we are only creating programs that could accept data at runtime, when the program is terminated, the data also disappear. Is it possible to save data accepted by a VB program into a storage device, such as a hard disk or diskette, or even CDRW? The answer is possible. In this chapter, we will learn how to create files by writing them into a storage device and then retrieve the data by reading  the contents of the files using a customized VB program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3520895776130773340?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3520895776130773340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/working-with-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3520895776130773340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3520895776130773340'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/working-with-files.html' title='Working with Files'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5988300588698387176</id><published>2009-05-27T00:39:00.002-07:00</published><updated>2009-05-27T00:42:13.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sample Programs use Array'/><title type='text'>Sample Programs use Array</title><content type='html'>Sample Programs&lt;br /&gt;(i) The code&lt;br /&gt;&lt;br /&gt;Dim studentName(10) As String&lt;br /&gt;Dim num As Integer&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub addName()&lt;br /&gt;For num = 1 To 10&lt;br /&gt;studentName(num) = InputBox("Enter the student name", "Enter Name", "", 1500, 4500)&lt;br /&gt;If studentName(num) &lt;&gt; "" Then&lt;br /&gt;Form1.Print studentName(num)&lt;br /&gt;Else&lt;br /&gt;End&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The above program accepts data entry through an input box and displays the entries in the form itself. As you can see, this program will only allows a user to enter 10 names each time he click on the start button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Code&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Dim studentName(10) As String&lt;br /&gt;Dim num As Integer&lt;br /&gt;&lt;br /&gt;Private Sub addName( )&lt;br /&gt;For num = 1 To 10&lt;br /&gt;studentName(num) = InputBox("Enter the student name")&lt;br /&gt;List1.AddItem studentName(num)&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;br /&gt;Private Sub Start_Click()&lt;br /&gt;addName&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;The above program accepts data entries through an InputBox and displays the items in a list box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5988300588698387176?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5988300588698387176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-programs-use-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5988300588698387176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5988300588698387176'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/sample-programs-use-array.html' title='Sample Programs use Array'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5452367928334237504</id><published>2009-05-27T00:39:00.001-07:00</published><updated>2009-05-27T00:40:35.247-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dim ArrayName'/><category scheme='http://www.blogger.com/atom/ns#' term='Dim Count'/><category scheme='http://www.blogger.com/atom/ns#' term='declares an array'/><title type='text'>Example declares an array that consists of the first element</title><content type='html'>&lt;strong&gt;Example&lt;br /&gt;Dim Count(100 to 500) as Integer&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;declares an array that consists of the first element starting from Count(100) and ends at Count(500)  &lt;br /&gt;The general format to declare a two dimensional array is as follow:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dim ArrayName(Sub1,Sub2) as dataType&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dim StudentName(10,10)&lt;/strong&gt; will declare a 10x10 table make up of 100 students' Names, starting with StudentName(1,1)  and end with StudentName(10,10).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5452367928334237504?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5452367928334237504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-declares-array-that-consists-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5452367928334237504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5452367928334237504'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-declares-array-that-consists-of.html' title='Example declares an array that consists of the first element'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4036316004680783323</id><published>2009-05-27T00:36:00.000-07:00</published><updated>2009-05-27T00:39:06.731-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='one dimensional array'/><category scheme='http://www.blogger.com/atom/ns#' term='general format'/><category scheme='http://www.blogger.com/atom/ns#' term='declare'/><title type='text'>Declaring Arrays  in vb 6 : general format to declare a one dimensional array</title><content type='html'>We could use Public or Dim statement to declare an array just as the way we declare a single variable. The Public statement declares an array that can be used throughout an application while the Dim statement declare an array that could be used only in a local procedure.&lt;br /&gt;&lt;br /&gt;The general format to declare a one dimensional array is as follow:&lt;br /&gt;&lt;br /&gt;Dim arrayName(subs) as dataType&lt;br /&gt;&lt;br /&gt;where subs indicates the last subscript in the array.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;br /&gt;&lt;br /&gt;Dim CusName(10) as String &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;will declare an array that consists of 10 elements if the statement Option Base 1 appear in the declaration area, starting from CusName(1) to CusName(10). Otherwise, there will be 11 elements in the array starting from CusName(0) through to CusName(10)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CusName(1) CusName(2) CusName(3) CusName(4) CusName(5) CusName(6) CusName(7) CusName(8) CusName(9) CusName(10) &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4036316004680783323?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4036316004680783323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/declaring-arrays-in-vb-6-general-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4036316004680783323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4036316004680783323'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/declaring-arrays-in-vb-6-general-format.html' title='Declaring Arrays  in vb 6 : general format to declare a one dimensional array'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3499284169861306324</id><published>2009-05-27T00:35:00.002-07:00</published><updated>2009-05-27T00:37:48.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twodimensional array'/><category scheme='http://www.blogger.com/atom/ns#' term='multidimensional'/><category scheme='http://www.blogger.com/atom/ns#' term='Dimension of an Array'/><title type='text'>Dimension of an Array</title><content type='html'>An array can be one dimensional or multidimensional. One dimensional array is like a list of items or a table that consists of one row of items or one column of items. A twodimensional array will be a table of items that make up of rows and columns. While the format for a one dimensional array is ArrayName(x), the format for a two dimensional array is ArrayName(x,y) while a three dimensional array is ArrayName(x,y,z) . Normally it is sufficient to use one dimensional and two dimensional array ,you only need to use higher dimensional arrays if you need with engineering problems or even some accounting problems.Let me illustrates the the arrays with tables.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;strong&gt;One dimensional Array&lt;br /&gt;&lt;br /&gt;Student Name Name(1) Name(2) Name(3) Name(4) Name(5) Name(6) &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Two Dimensional Array&lt;br /&gt;&lt;br /&gt;Name(1,1) Name(1,2) Name(1,3) Name(1,4)&lt;br /&gt;Name(2,1) Name(2,2) Name(2,3) Name(2,4)&lt;br /&gt;Name(3,1) Name(3,2) Name(3,3) Name(3,4) &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3499284169861306324?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3499284169861306324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/dimension-of-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3499284169861306324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3499284169861306324'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/dimension-of-array.html' title='Dimension of an Array'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6008567727484235488</id><published>2009-05-27T00:35:00.001-07:00</published><updated>2009-05-27T00:35:51.970-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Introduction to Arrays'/><title type='text'>Introduction to Arrays in visual basic</title><content type='html'>Introduction to Arrays&lt;br /&gt;By definition, an array is a list of variables, all with the same data type and name. When we work with a single item, we only need to use one variable. However, if we have a list of items which are of similar type to deal with, we need to declare an array of variables instead of using a variable for each item. For example, if we need to enter one hundred names, we might have difficulty in declaring 100 different names, this is a waste of time and efforts. So,  instead of declaring one hundred different variables, we need to declare only one array.  We differentiate each item in the array by using subscript, the index value of each item, for example name(1), name(2),name(3) .......etc. , which will make declaring variables streamline and much systematic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6008567727484235488?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6008567727484235488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/introduction-to-arrays-in-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6008567727484235488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6008567727484235488'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/introduction-to-arrays-in-visual-basic.html' title='Introduction to Arrays in visual basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-347797581553694586</id><published>2009-05-27T00:31:00.000-07:00</published><updated>2009-05-27T00:35:06.940-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VBA'/><category scheme='http://www.blogger.com/atom/ns#' term='vb'/><category scheme='http://www.blogger.com/atom/ns#' term='Commissions Payment'/><title type='text'>Commissions Payment in VBA when a salesman attain a sale volume</title><content type='html'>when a salesman attain a sale volume of  $6000, he will be paid $6000x15%=$720.00. A visual basic function to calculate the commissions can be written as follows: &lt;br /&gt;&lt;br /&gt;Function Comm(Sales_V  As Variant) as Variant &lt;br /&gt;&lt;br /&gt;If Sales_V &lt;500 Then &lt;br /&gt;Comm=Sales_V*0.03 &lt;br /&gt;Elseif Sales_V&gt;=500 and Sales_V&lt;1000 Then &lt;br /&gt;Comm=Sales_V*0.06 &lt;br /&gt;Elseif Sales_V&gt;=1000 and Sales_V&lt;2000 Then &lt;br /&gt;Comm=Sales_V*0.09 &lt;br /&gt;Elseif Sales_V&gt;=200 and Sales_V&lt;5000 Then &lt;br /&gt;Comm=Sales_V*0.12&lt;br /&gt;Elseif Sales_V&gt;=5000  Then &lt;br /&gt;Comm=Sales_V*0.15 &lt;br /&gt;End If &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/1703949483545735951-347797581553694586?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/347797581553694586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/commissions-payment-in-vba-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/347797581553694586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/347797581553694586'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/commissions-payment-in-vba-when.html' title='Commissions Payment in VBA when a salesman attain a sale volume'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8842569751725888043</id><published>2009-05-27T00:30:00.000-07:00</published><updated>2009-05-27T00:32:42.179-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Need to Creating  VBA  Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='MS Excel'/><title type='text'>Need to Creating  VBA  Functions For MS Excel</title><content type='html'>The Needs to Create VBA Functions in MS-Excel&lt;br /&gt;You can create  your own functions to supplement the  built-in functions in Microsoft Excel spreadsheet, which are quite limited in some aspects. These user-defined  functions are also called  Visual Basic for Applications functions, or simply VBA functions. They are very useful and powerful if you know how to program them properly. One main reason we need to create user defined functions is to enable us to customize our spreadsheet environment for individual needs. For example, we might need a function that could calculate commissions payment based on the sales volume, which is quite difficult if not impossible by using the built-in functions alone. The code for VBA is illustrated on the right.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8842569751725888043?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8842569751725888043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/need-to-creating-vba-functions-for-ms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8842569751725888043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8842569751725888043'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/need-to-creating-vba-functions-for-ms.html' title='Need to Creating  VBA  Functions For MS Excel'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5981135728351169218</id><published>2009-05-23T01:53:00.000-07:00</published><updated>2009-05-23T01:57:06.060-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Your Own Function'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='Creating'/><title type='text'>Creating Your Own Function</title><content type='html'>The general format of a function is as follows:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Public Function functionName (Arg As dataType,..........) As dataType&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;Private Function functionName (Arg As dataType,..........) As dataType&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* Public indicates that the function is applicable to the whole project and&lt;br /&gt;Private indicates that the function is only applicable to a certain module or procedure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example, a user can calculate the future value of a certain amount of money he has today based on the interest rate and the number of years from now, supposing he will invest this amount of money somewhere .The calculation is based on the compound interest rate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 274px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/fv.gif" border="0" /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;The code&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Public Function FV(PV As Variant, i As Variant, n As Variant) As Variant&lt;br /&gt;'Formula to calculate Future Value(FV)&lt;br /&gt;'PV denotes Present Value&lt;br /&gt;FV = PV * (1 + i / 100) ^ n&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Private Sub compute_Click()&lt;br /&gt;&lt;br /&gt;'This procedure will calculate Future Value&lt;br /&gt;Dim FutureVal As Variant&lt;br /&gt;Dim PresentVal As Variant&lt;br /&gt;Dim interest As Variant&lt;br /&gt;Dim period As Variant&lt;br /&gt;PresentVal = PV.Text&lt;br /&gt;interest = rate.Text&lt;br /&gt;period = years.Text&lt;br /&gt;&lt;br /&gt;'calling the funciton&lt;br /&gt;&lt;br /&gt;FutureVal = FV(PresentVal, interest, period)&lt;br /&gt;MsgBox ("The Future Value is " &amp;amp; FutureVal)&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/1703949483545735951-5981135728351169218?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5981135728351169218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-your-own-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5981135728351169218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5981135728351169218'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-your-own-function.html' title='Creating Your Own Function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1312150159842046640</id><published>2009-05-23T01:51:00.000-07:00</published><updated>2009-05-23T02:00:36.967-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='example computes the values of Int(x)'/><category scheme='http://www.blogger.com/atom/ns#' term='User-Defined Functions'/><title type='text'>Creating User-Defined Functions Example program will automatically compute</title><content type='html'>The following program will automatically compute examination grades based on the marks that a student obtained. The code is shown on the right.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 318px; CURSOR: hand; HEIGHT: 242px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/grade.gif" border="0" /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Code&lt;br /&gt;&lt;br /&gt;Public Function grade(mark As Variant) As String&lt;br /&gt;&lt;br /&gt;Select Case mark&lt;br /&gt;Case Is &gt;= 80&lt;br /&gt;grade = "A"&lt;br /&gt;Case Is &gt;= 70&lt;br /&gt;grade = "B"&lt;br /&gt;Case Is &gt;= 60&lt;br /&gt;grade = "C"&lt;br /&gt;Case Is &gt;= 50&lt;br /&gt;grade = "D"&lt;br /&gt;Case Is &gt;= 40&lt;br /&gt;grade = "E"&lt;br /&gt;Case Else&lt;br /&gt;grade = "F"&lt;br /&gt;End Select&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub compute_Click()&lt;br /&gt;&lt;br /&gt;grading.Caption = grade(mark)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1312150159842046640?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1312150159842046640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-user-defined-functions-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1312150159842046640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1312150159842046640'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-user-defined-functions-example.html' title='Creating User-Defined Functions Example program will automatically compute'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3474830028097662461</id><published>2009-05-20T06:22:00.000-07:00</published><updated>2009-05-20T06:24:14.029-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='String Manipulation Functions'/><title type='text'>String Manipulation Functions how to use some of the string manipulation function</title><content type='html'>In this lesson, we will learn how to use some of the string manipulation function such as Len, Right, Left, Mid, Trim, Ltrim, Rtrim, Ucase, Lcase, Instr, Val, Str  ,Chr and Asc.&lt;br /&gt;&lt;br /&gt;The  Len Function&lt;br /&gt;&lt;br /&gt;The length function returns an integer value which is the length of a phrase or a sentence, including the empty spaces. The format is&lt;br /&gt;&lt;br /&gt;Len (“Phrase”)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For example,&lt;br /&gt;&lt;/strong&gt;Len (VisualBasic) = 11 and Len (welcome to VB tutorial) = 22&lt;br /&gt;The Len function can also return the number of digits or memory locations of a number that is stored in the computer. For example,&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private sub Form_Activate ( )&lt;br /&gt;X=sqr (16)&lt;br /&gt;Y=1234&lt;br /&gt;Z#=10#&lt;br /&gt;Print Len(x), Len(y), and Len (z)&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3474830028097662461?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3474830028097662461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/string-manipulation-functions-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3474830028097662461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3474830028097662461'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/string-manipulation-functions-how-to.html' title='String Manipulation Functions how to use some of the string manipulation function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8716625515412554193</id><published>2009-05-20T06:18:00.000-07:00</published><updated>2009-05-20T06:19:52.714-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Format function'/><category scheme='http://www.blogger.com/atom/ns#' term='Download  source codes vb 6 free'/><title type='text'>The Format function</title><content type='html'>The Format function is a very powerful formatting function which can display the numeric values in various forms. There are two types of Format function, one of them is the built-in or predefined format while another one can be defined by the users.&lt;br /&gt;(i) The format of the predefined Format function is&lt;br /&gt;Format (n, “style argument”)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;br /&gt;Private Sub Form_Activate()&lt;br /&gt;Print Format (8972.234, "General Number")&lt;br /&gt;Print Format (8972.2, "Fixed")&lt;br /&gt;Print Format (6648972.265, "Standard")&lt;br /&gt;Print Format (6648972.265, "Currency")&lt;br /&gt;Print Format (0.56324, "Percent")&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8716625515412554193?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8716625515412554193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/format-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8716625515412554193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8716625515412554193'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/format-function.html' title='The Format function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8607963363815466471</id><published>2009-05-20T06:17:00.000-07:00</published><updated>2009-05-20T06:18:31.283-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Space function'/><category scheme='http://www.blogger.com/atom/ns#' term='Download  source codes vb 6 free'/><title type='text'>The Space function</title><content type='html'>&lt;p&gt;&lt;strong&gt;The Space function&lt;br /&gt;&lt;/strong&gt;The Space function is very closely linked to the Tab function. However, there is a minor difference. While Tab (n) means the item is placed n spaces from the left border of the screen, the Space function specifies the number of spaces between two consecutive items. For example, the procedure&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example&lt;br /&gt;Private Sub Form_Activate()&lt;br /&gt;Print "Visual"; Space(10); "Basic"&lt;br /&gt;End Sub&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Means that the words Visual and Basic will be separated by 10 spaces&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8607963363815466471?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8607963363815466471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/space-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8607963363815466471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8607963363815466471'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/space-function.html' title='The Space function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6710174985436933371</id><published>2009-05-20T06:15:00.000-07:00</published><updated>2009-05-20T06:16:28.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='select case example'/><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='Formatting output is a very'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='important part of programming'/><title type='text'>Formatting output is a very important part of programming</title><content type='html'>Formatting output is a very important part of programming so that the data can be presented systematically and clearly to the users. Data in the previous lesson were presented fairly systematically through the use of commas and some of the functions like Int, Fix and Round. However, to have better control of the output format, we can use a number of formatting functions in Visual basic.&lt;br /&gt;The three most common formatting functions in VB are Tab, Space, and Format&lt;br /&gt;(i) The Tab function&lt;br /&gt;Tab (n); x&lt;br /&gt;The item x will be displayed at a position that is n spaces from the left border of the output form. There must be a semicolon in between Tab and the items you intend to display (VB will actually do it for you automatically).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Example&lt;br /&gt;Private Sub Form_Activate&lt;br /&gt;         Print "I"; Tab(5); "like"; Tab(10); "to"; Tab(15); "learn"; Tab(20); "VB"&lt;br /&gt;         Print&lt;br /&gt;         Print Tab(10); "I"; Tab(15); "like"; Tab(20); "to"; Tab(25); "learn"; Tab(20); "VB"&lt;br /&gt;         Print&lt;br /&gt;         Print Tab(15); "I"; Tab(20); ; "like"; Tab(25); "to"; Tab(30); "learn"; Tab(35); “VB"&lt;br /&gt;End sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6710174985436933371?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6710174985436933371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/formatting-output-is-very-important.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6710174985436933371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6710174985436933371'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/formatting-output-is-very-important.html' title='Formatting output is a very important part of programming'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7034544530311098124</id><published>2009-05-20T06:11:00.000-07:00</published><updated>2009-05-20T06:12:18.071-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='example computes the values of Int(x)'/><category scheme='http://www.blogger.com/atom/ns#' term='vbcode.irecog.com'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><title type='text'>example computes the values of Int(x)</title><content type='html'>Example&lt;br /&gt;This example computes the values of Int(x), Fix(x) and Round(x,n) in a table form. It uses the Do Loop statement and the Rnd function to generate 10 numbers. The statement x = Round (Rnd * 7, 7) rounds a random number between 0 and 7 to 7 decimal places. Using commas in between items will create spaces between them and hence a table of values can be created. The program  and output are shown below&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub Form_Activate ()&lt;br /&gt;n = 1&lt;br /&gt;Print " n", "      x", "Int(x)", "Fix(x)", "Round(x, 4)"&lt;br /&gt;Do While n &lt; 11&lt;br /&gt;Randomize Timer&lt;br /&gt;x = Round (Rnd * 7, 7)&lt;br /&gt;Print n, x, Int(x), Fix(x), Round(x, 4)&lt;br /&gt;n = n + 1&lt;br /&gt;Loop&lt;br /&gt;End Sub&lt;br /&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7034544530311098124?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7034544530311098124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-computes-values-of-intx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7034544530311098124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7034544530311098124'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-computes-values-of-intx.html' title='example computes the values of Int(x)'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7626177477328649309</id><published>2009-05-20T06:08:00.000-07:00</published><updated>2009-05-20T06:10:01.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='The Numeric Functions'/><title type='text'>The Numeric Functions in visual basic</title><content type='html'>Example :&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dim num as integer&lt;br /&gt;Private Sub Command1_Click ( )&lt;br /&gt;Randomize Timer&lt;br /&gt;Num=Int(Rnd*6)+1&lt;br /&gt;Label1.Caption=Num&lt;br /&gt;End Sub&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc123994226"&gt;The Numeric Functions&lt;/a&gt;    &lt;br /&gt;The numeric functions are Int, Sqr, Abs, Exp, Fix, Round and Log.&lt;br /&gt;a) Int is the function that converts a number into an integer by truncating its decimal part and the resulting integer is the largest integer that is smaller than the number. For example, Int(2.4)=2, Int(4.8)=4, Int(-4.6)= -5, Int(0.032)=0 and so on.&lt;br /&gt;b) Sqr is the function that computes the square root of a number. For example, Sqr(4)=2, Sqr(9)=2 and etc.&lt;br /&gt;c) Abs is the function that returns the absolute value of a number. So Abs(-8) = 8 and Abs(8)= 8.&lt;br /&gt;d) Exp of a number x is the value of ex. For example, Exp(1)=e1 = 2.7182818284590&lt;br /&gt;e) Fix and Int are the same if the number is a positive number as both truncate the decimal part of the number and return an integer. However, when the number is negative, it will return the smallest integer that is larger than the number. For example, Fix(-6.34)= -6 while Int(-6.34)=-7.&lt;br /&gt;f) Round is the function that rounds up a number to a certain number of decimal places. The Format is Round (n, m) which means to round a number n to m decimal places. For example, Round (7.2567, 2) =7.26&lt;br /&gt;g) Log is the function that returns the natural Logarithm of a number. For example,&lt;br /&gt;Log 10= 2.302585&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7626177477328649309?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7626177477328649309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/numeric-functions-in-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7626177477328649309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7626177477328649309'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/numeric-functions-in-visual-basic.html' title='The Numeric Functions in visual basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-4575024458069297693</id><published>2009-05-20T06:07:00.000-07:00</published><updated>2009-05-20T06:08:13.038-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mathematical Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><title type='text'>mathematical functions Cons.</title><content type='html'>Random numbers in its original form are not very useful in programming until we convert them to integers. For example, if we need to obtain a random output of 6 random integers ranging from 1 to 6, which make the program behave as a virtual die, we need to convert the random numbers using the format  Int(Rnd*6)+1. Let’s study the following example:&lt;br /&gt;In this example, Int(Rnd*6) will generate a random integer between 0 and 5 because the function Int truncates the decimal part of the random number and returns an integer. After adding 1, you will get a random number between 1 and 6 every time you click the command button. For example, let say the random number generated is 0.98, after multiplying it by 6, it becomes 5.88, and using the integer function Int(5.88) will convert the number to 5; and after adding 1 you will get 6. &lt;br /&gt;In this example, you place a command button and change its caption to ‘roll die’. You also need to insert a label into the form and clear its caption at the designing phase and make its font bigger and bold. Then set the border value to 1 so that it displays a border; and after that set the alignment to center. The statement Label1.Caption=Num means the integer generated will be displayed as the caption of the label.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-4575024458069297693?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/4575024458069297693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/mathematical-functions-cons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4575024458069297693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/4575024458069297693'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/mathematical-functions-cons.html' title='mathematical functions Cons.'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6865842153359730876</id><published>2009-05-20T06:03:00.000-07:00</published><updated>2009-05-20T06:06:23.475-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mathematical Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='www.irecog.com'/><title type='text'>visual basic : Mathematical Functions</title><content type='html'>The mathematical functions are very useful and important in programming because very often we need to deal with mathematical concepts in programming such as chance and probability, variables, mathematical logics, calculations, coordinates, time intervals and etc. The common mathematical functions in Visual Basic are Rnd, Sqr, Int, Abs, Exp, Log, Sin, Cos, Tan , Atn, Fix and Round.&lt;br /&gt;&lt;br /&gt;Rnd is very useful when we deal with the concept of chance and probability. The Rnd function returns a random value between 0 and 1. In Example 1. When you run the program, you will get an output of 10 random numbers between 0 and 1. Randomize Timer is a vital statement here as it will randomize the process.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub Form_Activate&lt;br /&gt;&lt;br /&gt;        Randomize Timer&lt;br /&gt;&lt;br /&gt;        For x=1 to 10&lt;br /&gt;&lt;br /&gt;             Print Rnd&lt;br /&gt;&lt;br /&gt;        Next x&lt;br /&gt;&lt;br /&gt;End Sub &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6865842153359730876?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6865842153359730876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/visual-basic-mathematical-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6865842153359730876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6865842153359730876'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/visual-basic-mathematical-functions.html' title='visual basic : Mathematical Functions'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5146036551959943681</id><published>2009-05-15T00:35:00.000-07:00</published><updated>2009-05-15T00:36:58.011-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example: use inputBox'/><title type='text'>The procedure for the OK button</title><content type='html'>The procedure for the OK button&lt;br /&gt;&lt;br /&gt;Private Sub OK_Click()&lt;br /&gt;Dim userMsg As String&lt;br /&gt;userMsg = InputBox("What is your message?", "Message Entry Form", "Enter your messge here", 500, 700)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If userMsg &lt;&gt; "" Then &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;       message.Caption = userMsg &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Else &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;      message.Caption = "No Message" End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;When a user click the OK button, the input box as shown in Figure 10.5 will appear. After user entering the message and click OK, the message will be displayed on the caption, if he click Cancel, "No message" will be displayed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5146036551959943681?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5146036551959943681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/procedure-for-ok-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5146036551959943681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5146036551959943681'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/procedure-for-ok-button.html' title='The procedure for the OK button'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1583386408702026708</id><published>2009-05-15T00:33:00.000-07:00</published><updated>2009-05-15T00:35:07.599-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='vb built in function'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='The InputBox( ) Function'/><title type='text'>The InputBox( ) Function</title><content type='html'>An InputBox( ) function will display a message box where the user can enter a value or a message in the form of text. The format is &lt;br /&gt;&lt;br /&gt;myMessage=InputBox(Prompt, Title, default_text, x-position, y-position)&lt;br /&gt;&lt;br /&gt;myMessage is a variant data type but typically it is declared as string, which accept the message input by the users. The arguments are explained as follows:  &lt;br /&gt;&lt;br /&gt;Prompt       - The message displayed normally as a question asked.&lt;br /&gt;Title            - The title of the Input Box.&lt;br /&gt;default-text  - The default text that appears in the input field where users can use it as his&lt;br /&gt;&lt;br /&gt;intended input or he may change to the message he wish to key in.&lt;br /&gt;x-position and y-position - the position or the coordinate of the input box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1583386408702026708?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1583386408702026708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/inputbox-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1583386408702026708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1583386408702026708'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/inputbox-function.html' title='The InputBox( ) Function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6329602593589971207</id><published>2009-05-15T00:30:00.000-07:00</published><updated>2009-05-15T00:33:36.972-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example: yourMsg'/><category scheme='http://www.blogger.com/atom/ns#' term='Program Example  Use Do Loop'/><category scheme='http://www.blogger.com/atom/ns#' term='test 2'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Example : You draw the same Interface as in example</title><content type='html'>Example&lt;br /&gt;You draw the same Interface as in example but modify the codes as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub test2_Click()&lt;br /&gt;Dim testMsg2 As Integer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;testMsg2 = MsgBox("Click to Test", vbYesNoCancel + vbExclamation, "Test Message")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If testMsg2 = 6 Then&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;display2.Caption = "Testing successful"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ElseIf testMsg2 = 7 Then&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;display2.Caption = "Are you sure?"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Else display2.Caption = "Testing fail"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example, the following message box will be displayed:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 266px; CURSOR: hand; HEIGHT: 119px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/msgbox5_popup.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6329602593589971207?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6329602593589971207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-you-draw-same-interface-as-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6329602593589971207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6329602593589971207'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-you-draw-same-interface-as-in.html' title='Example : You draw the same Interface as in example'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2821857588268611700</id><published>2009-05-15T00:26:00.000-07:00</published><updated>2009-05-15T00:30:11.140-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='vb built in function'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic'/><category scheme='http://www.blogger.com/atom/ns#' term='message box'/><title type='text'>example program use message box in vb</title><content type='html'>Example&lt;br /&gt;&lt;br /&gt;i. The Interface:&lt;br /&gt;&lt;br /&gt;You draw three command buttons and a label as shown in Figure&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 314px; CURSOR: hand; HEIGHT: 239px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/msgbox1.jpg" border="0" /&gt;&lt;br /&gt;The procedure for the test button: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Private Sub Test_Click() &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Dim testmsg As Integer &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;testmsg = MsgBox("Click to test", 1, "Test message") &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;If testmsg = 1 Then &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;     Display.Caption = "Testing Successful" &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Else &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;      Display.Caption = "Testing fail" &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;End If &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;End Sub &lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2821857588268611700?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2821857588268611700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-program-use-message-box-in-vb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2821857588268611700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2821857588268611700'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-program-use-message-box-in-vb.html' title='example program use message box in vb'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3583008947982174106</id><published>2009-05-15T00:24:00.000-07:00</published><updated>2009-05-15T00:25:26.965-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MsgBox ( ) Function'/><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='vb built in function'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><title type='text'>MsgBox ( ) Function</title><content type='html'>MsgBox ( ) Function&lt;br /&gt;&lt;br /&gt;The objective of MsgBox is to produce a pop-up message box and prompt the user to click on a command button before he /she can continues. This  format is as follows: &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;          yourMsg=MsgBox(Prompt, Style Value, Title) &lt;/strong&gt;  &lt;br /&gt;&lt;br /&gt; The first argument, Prompt, will display the message in the message box. The Style Value  will determine what type of command buttons appear on the message box, please refer Table 10.1 for types of command button displayed. The Title argument will display the title of the message board.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3583008947982174106?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3583008947982174106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/msgbox-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3583008947982174106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3583008947982174106'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/msgbox-function.html' title='MsgBox ( ) Function'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-583522363444278762</id><published>2009-05-15T00:18:00.000-07:00</published><updated>2009-05-15T00:24:08.873-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='function in vb 6'/><category scheme='http://www.blogger.com/atom/ns#' term='vb built in function'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>Introduction to VB Built-in Functions</title><content type='html'>A function is similar to a normal procedure but the main purpose of the function is to accept a certain input from the user and return a value which is passed on to the main program to finish the execution. There are two types of functions, the built-in functions (or internal functions) and the functions created by the programmers.&lt;br /&gt;&lt;br /&gt;A function is similar to a normal procedure but the main purpose of the function is to accept a certain input from the user and return a value which is passed on to the main program to finish the execution. There are two types of functions, the built-in functions (or internal functions) and the functions created by the programmers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-583522363444278762?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/583522363444278762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/introduction-to-vb-built-in-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/583522363444278762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/583522363444278762'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/introduction-to-vb-built-in-functions.html' title='Introduction to VB Built-in Functions'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6476502406421999809</id><published>2009-05-14T23:54:00.001-07:00</published><updated>2009-05-15T00:02:16.604-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='for next loop'/><category scheme='http://www.blogger.com/atom/ns#' term='format loop'/><category scheme='http://www.blogger.com/atom/ns#' term='Program Example  Use Do Loop'/><title type='text'>Example (a) For Loop</title><content type='html'>Example (a) For Loop  &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For  counter=1 to 10  &lt;br /&gt;   display.Text=counter &lt;br /&gt;Next &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example (b)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For counter=1 to 1000 step 10  &lt;br /&gt;&lt;br /&gt;  counter=counter+1&lt;br /&gt;&lt;br /&gt;Next &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example (c)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;  For counter=1000 to 5 step -5 &lt;br /&gt;&lt;br /&gt;     counter=counter-10 &lt;br /&gt;&lt;br /&gt;  Next &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;*Notice that increment can be negative&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example (d)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub Form_Activate( )&lt;br /&gt;&lt;br /&gt;   For n=1 to 10&lt;br /&gt;&lt;br /&gt;     If n&gt;6 then&lt;br /&gt;&lt;br /&gt;         Exit For&lt;br /&gt;        &lt;br /&gt;     Else&lt;br /&gt;&lt;br /&gt;       Print n&lt;br /&gt;&lt;br /&gt;      End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6476502406421999809?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6476502406421999809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-for-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6476502406421999809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6476502406421999809'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-for-loop.html' title='Example (a) For Loop'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7579019774646980560</id><published>2009-05-14T23:53:00.000-07:00</published><updated>2009-05-14T23:54:26.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='suffixes for literals'/><category scheme='http://www.blogger.com/atom/ns#' term='Program Example  Use Do Loop'/><title type='text'>Program Example  Use Do Loop</title><content type='html'>Program Example &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Dim sum, n As Integer&lt;br /&gt;&lt;br /&gt; Private Sub Form_Activate()&lt;br /&gt;&lt;br /&gt;List1.AddItem "n" &amp; vbTab &amp; "sum"&lt;br /&gt;&lt;br /&gt;Do&lt;br /&gt;&lt;br /&gt;   n = n + 1&lt;br /&gt;&lt;br /&gt;   Sum = Sum + n&lt;br /&gt;&lt;br /&gt; List1.AddItem n &amp; vbTab &amp; Sum&lt;br /&gt;&lt;br /&gt; If n = 100 Then&lt;br /&gt;&lt;br /&gt; Exit Do&lt;br /&gt;&lt;br /&gt; End If&lt;br /&gt;&lt;br /&gt;  Loop&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/1703949483545735951-7579019774646980560?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7579019774646980560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/program-example-use-do-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7579019774646980560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7579019774646980560'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/program-example-use-do-loop.html' title='Program Example  Use Do Loop'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6963018845946249202</id><published>2009-05-14T23:52:00.000-07:00</published><updated>2009-05-14T23:53:30.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='Download the vbSkinner'/><category scheme='http://www.blogger.com/atom/ns#' term='numeric datatype'/><category scheme='http://www.blogger.com/atom/ns#' term='do loop'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code overwrite field access database'/><title type='text'>Example Do Loop</title><content type='html'>&lt;strong&gt;Example Do Loop&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;       &lt;strong&gt;Do while counter &lt;=1000 &lt;br /&gt;&lt;br /&gt;             num.Text=counter &lt;br /&gt;&lt;br /&gt;             counter =counter+1 &lt;br /&gt;&lt;br /&gt;       Loop &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* The above example will keep on adding until counter &gt;1000. &lt;br /&gt;&lt;br /&gt;The above example can be rewritten as &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;        Do &lt;br /&gt;&lt;br /&gt;               num.Text=counter &lt;br /&gt;               counter=counter+1 &lt;br /&gt;&lt;br /&gt;       Loop until counter&gt;1000 &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6963018845946249202?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6963018845946249202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-do-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6963018845946249202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6963018845946249202'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-do-loop.html' title='Example Do Loop'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3987271759917824142</id><published>2009-05-14T23:49:00.001-07:00</published><updated>2009-05-14T23:52:22.525-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='for next loop'/><category scheme='http://www.blogger.com/atom/ns#' term='format loop'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Exiting the Loop</title><content type='html'>sometime we need exit to exit a loop prematurely because of a certain condition is fulfilled. The syntax to use is known as Exit Do. You can examine Example 9.2 for its usage.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For....Next Loop&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The format is: &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For counter=startNumber to endNumber (Step increment) &lt;br /&gt;&lt;br /&gt;    One or more VB statements &lt;br /&gt;&lt;br /&gt;Next &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Please refer to example 9.3a,9.3b and 9.3 c for its usage.&lt;br /&gt;&lt;br /&gt;Sometimes the user might want to get out from the loop before the whole repetitive process is executed, the command to use is Exit For. To exit a For….Next Loop, you can place the Exit For statement within the loop; and it is normally used together with the If…..Then… statement. Let’s examine example&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3987271759917824142?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3987271759917824142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/exiting-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3987271759917824142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3987271759917824142'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/exiting-loop.html' title='Exiting the Loop'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6407009644017165457</id><published>2009-05-14T23:49:00.000-07:00</published><updated>2009-05-14T23:50:50.566-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic DirectX Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='do loop'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>Do Loop    The formats are</title><content type='html'>Do Loop The formats are&lt;br /&gt;&lt;br /&gt;a)   Do While condition &lt;br /&gt;&lt;br /&gt;            Block of one or more VB statements &lt;br /&gt;&lt;br /&gt;      Loop &lt;br /&gt;&lt;br /&gt;b)   Do &lt;br /&gt;            Block of one or more VB statements &lt;br /&gt;      Loop While condition &lt;br /&gt;&lt;br /&gt;c)    Do Until condition &lt;br /&gt;              Block of one or more VB statements &lt;br /&gt;       Loop &lt;br /&gt;&lt;br /&gt;d)    Do &lt;br /&gt;             Block of one or more VB statements &lt;br /&gt;&lt;br /&gt;       Loop Until condition&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6407009644017165457?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6407009644017165457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/do-loop-formats-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6407009644017165457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6407009644017165457'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/do-loop-formats-are.html' title='Do Loop    The formats are'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5647721132536477182</id><published>2009-05-14T23:43:00.000-07:00</published><updated>2009-05-14T23:49:35.542-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='for next loop'/><category scheme='http://www.blogger.com/atom/ns#' term='Loop'/><category scheme='http://www.blogger.com/atom/ns#' term='do loop'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Loop in Visual Basic</title><content type='html'>Visual Basic allows a procedure to be repeated many times as long as the processor until a condition or a set of conditions is fulfilled. This is generally called looping . Looping is a very useful feature of Visual Basic because it makes repetitive works easier. There are  two kinds of loops in Visual Basic,  the Do...Loop  and the For.......Next loop&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5647721132536477182?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5647721132536477182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/loop-in-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5647721132536477182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5647721132536477182'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/loop-in-visual-basic.html' title='Loop in Visual Basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1916326655315750684</id><published>2009-05-13T00:02:00.000-07:00</published><updated>2009-05-13T00:03:34.939-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code to open any programs'/><category scheme='http://www.blogger.com/atom/ns#' term='suffixes for literals'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Example 3 could be rewritten  as follows</title><content type='html'>&lt;strong&gt;Example 3 could be rewritten  as follows:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Dim mark As Single&lt;br /&gt;&lt;strong&gt;Private Sub Compute_Click()&lt;br /&gt;&lt;/strong&gt;'Examination Marks&lt;br /&gt; mark = mrk.Text   Select Case mark&lt;br /&gt; Case 0 to 49        comment.Caption = "Need to work harder"  &lt;br /&gt;Case 50 to 59       comment.Caption = "Average"  &lt;br /&gt;Case 60 to 69&lt;br /&gt;   comment.Caption = "Above Average"&lt;br /&gt;&lt;br /&gt;Case 70 to 84&lt;br /&gt;comment.Caption = "Good"&lt;br /&gt;&lt;br /&gt;Case Else&lt;br /&gt;comment.Caption = "Excellence"&lt;br /&gt;&lt;br /&gt;End Select&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1916326655315750684?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1916326655315750684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-3-could-be-rewritten-as-follows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1916326655315750684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1916326655315750684'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-3-could-be-rewritten-as-follows.html' title='Example 3 could be rewritten  as follows'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2935649192201300458</id><published>2009-05-13T00:00:00.000-07:00</published><updated>2009-05-13T00:02:16.980-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='suffixes for literals'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>example Select Case expression 2</title><content type='html'>&lt;p&gt;&lt;strong&gt;Example 2&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Dim mark As Single&lt;/em&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Private Sub Compute_Click() 'Examination Marks&lt;br /&gt;&lt;/strong&gt; mark = mrk.Text   Select Case mark&lt;br /&gt; Case Is &gt;= 85        comment.Caption = "Excellence"&lt;br /&gt;Case Is &gt;= 70       comment.Caption = "Good"&lt;br /&gt;&lt;br /&gt;Case Is &gt;= 60&lt;br /&gt;   comment.Caption = "Above Average"&lt;br /&gt;&lt;br /&gt;Case Is &gt;= 50&lt;br /&gt;comment.Caption = "Average"&lt;br /&gt;&lt;br /&gt;Case Else&lt;br /&gt;comment.Caption = "Need to work harder"&lt;br /&gt;&lt;br /&gt;End Select&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;End Sub &lt;/strong&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2935649192201300458?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2935649192201300458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-select-case-expression-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2935649192201300458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2935649192201300458'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-select-case-expression-2.html' title='example Select Case expression 2'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5281036468015402194</id><published>2009-05-12T23:58:00.000-07:00</published><updated>2009-05-13T00:00:21.831-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='select case example'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><title type='text'>example Select Case expression</title><content type='html'>&lt;strong&gt;example 1&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Dim grade As String&lt;br /&gt;&lt;strong&gt;Private Sub Compute_Click( )&lt;br /&gt;&lt;/strong&gt;grade=txtgrade.Text&lt;br /&gt;&lt;strong&gt;Select Case grade&lt;br /&gt;&lt;/strong&gt;  Case  "A"        result.Caption="High  Distinction"&lt;br /&gt;  Case "A-"       result.Caption="Distinction"&lt;br /&gt;  Case "B"         result.Caption="Credit"&lt;br /&gt;  Case "C"         result.Caption="Pass"&lt;br /&gt;  Case Else         result.Caption="Fail"&lt;br /&gt;&lt;strong&gt;  End Select&lt;br /&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5281036468015402194?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5281036468015402194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-select-case-expression.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5281036468015402194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5281036468015402194'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-select-case-expression.html' title='example Select Case expression'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5600962076080207973</id><published>2009-05-12T23:55:00.000-07:00</published><updated>2009-05-12T23:58:23.890-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Select Case'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic games'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>select Control Structure Select Case....End</title><content type='html'>In the previous lesson, we have learned how to control the program flow using the If...ElseIf control structure. In this chapter, you will learn  another way to control the program flow, that is, the Select Case control structure. However, the Select Case control structure is slightly different from the If....ElseIf control structure . The difference is that the Select Case control structure basically only make decision on one expression or dimension (for example the examination grade) while the If ...ElseIf statement control structure may evaluate only one expression, each If....ElseIf statement may also compute entirely different dimensions. Select Case is preferred when there exist many different conditions because using If...Then..ElseIf statements might become too messy.&lt;br /&gt;The format of the Select Case control structure is show below:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Select Case expression &lt;/strong&gt;&lt;br /&gt;            &lt;strong&gt;Case value1     Block of one or more VB statements    &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;            Case value2         Block of one or more VB Statements    &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;            Case value3             .         .    &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;            Case Else         Block of one or more VB Statements&lt;br /&gt;End Select &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5600962076080207973?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5600962076080207973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/select-control-structure-select-caseend.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5600962076080207973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5600962076080207973'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/select-control-structure-select-caseend.html' title='select Control Structure Select Case....End'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-59744212262831927</id><published>2009-05-12T23:50:00.001-07:00</published><updated>2009-05-12T23:54:26.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='value'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code  basic games'/><category scheme='http://www.blogger.com/atom/ns#' term='suffixes for literals'/><category scheme='http://www.blogger.com/atom/ns#' term='non-numeric Data type'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>non-numeric Data type suffixes for literals</title><content type='html'>&lt;div&gt;&lt;strong&gt;Non-numeric Data Types &lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Nonnumeric data types are data that cannot be manipulated mathematically using standard arithmetic operators. The non-numeric data comprises text or string data types, the Date data types, the Boolean data types that store only two values (true or false), Object data type and Variant data type .They are summarized in Table &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335197483775736050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 193px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_tr0XECpUIz0/Sgpt2CsCuPI/AAAAAAAAADE/mHonsaUsaeQ/s400/numericdatatype.jpg" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Suffixes for Literals &lt;/strong&gt;&lt;br /&gt;Literals are values that you assign to data. In some cases, we need to add a suffix behind a literal so that VB can handle the calculation more accurately. For example, we can use num=1.3089# for a Double type data. Some of the suffixes are displayed in Table&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;img id="BLOGGER_PHOTO_ID_5335198170629882226" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 312px; CURSOR: hand; HEIGHT: 117px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_tr0XECpUIz0/SgpueBa1QXI/AAAAAAAAADM/-ZjsadnyAio/s400/suffixforliterals.jpg" border="0" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;In addition, we need to enclose string literals within two quotations and date and time literals within two # sign. Strings can contain any characters, including numbers. The following are few examples:&lt;br /&gt;memberName="Turban, John." TelNumber="1800-900-888-777" LastDay=#31-Dec-00# ExpTime=#12:00 am# &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-59744212262831927?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/59744212262831927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/non-numeric-data-type-suffixes-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/59744212262831927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/59744212262831927'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/non-numeric-data-type-suffixes-for.html' title='non-numeric Data type suffixes for literals'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_tr0XECpUIz0/Sgpt2CsCuPI/AAAAAAAAADE/mHonsaUsaeQ/s72-c/numericdatatype.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-18016875870057401</id><published>2009-05-12T23:25:00.000-07:00</published><updated>2009-05-12T23:50:16.304-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Types'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='numeric datatype'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Visual Basic Data Types Managing Visual Basic Data</title><content type='html'>&lt;div&gt;There are many types of data that we come across in our daily life. For example, we need to handle data such as names, addresses, money, date, stock quotes, statistics and more everyday. Similarly in Visual Basic, we have to deal with all sorts of of data, some can be mathematically calculated while some are in the form of text or other forms. VB divides data into different types so that it is easier to manage when we need to write the code involving those data.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Visual Basic Data Types&lt;br /&gt;&lt;/strong&gt;Visual Basic classifies the information mentioned above into two major data types, they are the numeric data types and the non-numeric data types&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Numeric Data Types&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Numeric data types are types of data that consist of numbers, which can be computed mathematically with various standard operators such as add, minus, multiply, divide and more. Examples of numeric data types are examination marks, height, weight, the number of students in a class, share values, price of goods, monthly bills, fees and others. In Visual Basic, numeric data are divided into 7 types, depending on the range of values they can store. Calculations that only involve round figures or data that does not need precision can use Integer or Long integer in the computation. Programs that require high precision calculation need to use Single and Double decision data types, they are also called floating point numbers. For currency calculation , you can use the currency data types. Lastly, if even more precision is required to perform calculations that involve a many decimal points, we can use the decimal data types. These data types summarized in Table &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5335196913549509810" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 381px; CURSOR: hand; HEIGHT: 173px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_tr0XECpUIz0/SgptU2bhBLI/AAAAAAAAAC8/Uk8klFc9nL0/s320/numericdatatype.jpg" border="0" /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-18016875870057401?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/18016875870057401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/visual-basic-data-types-managing-visual.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/18016875870057401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/18016875870057401'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/visual-basic-data-types-managing-visual.html' title='Visual Basic Data Types Managing Visual Basic Data'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_tr0XECpUIz0/SgptU2bhBLI/AAAAAAAAAC8/Uk8klFc9nL0/s72-c/numericdatatype.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-1355350548546617674</id><published>2009-05-11T06:04:00.000-07:00</published><updated>2009-05-11T06:09:02.472-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='function'/><category scheme='http://www.blogger.com/atom/ns#' term='vb.net'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code to open any programs'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code + basic games'/><category scheme='http://www.blogger.com/atom/ns#' term='ordinary'/><category scheme='http://www.blogger.com/atom/ns#' term='vb codes'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='using if then else'/><category scheme='http://www.blogger.com/atom/ns#' term='how to write vb code to produce barcodes'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code overwrite field access database'/><title type='text'>Download program : Reminder with ordinary functions using vb.net</title><content type='html'>This reminder program has four forms one for updating user details 2nd for reminder details.T his is remind the date, when the use enter his user name password the reminder shows a popup. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.a1vbcode.com/downloads/remind.zip"&gt;Source Code Downloads Hear.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-1355350548546617674?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/1355350548546617674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/download-program-reminder-with-ordinary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1355350548546617674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/1355350548546617674'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/download-program-reminder-with-ordinary.html' title='Download program : Reminder with ordinary functions using vb.net'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6722608885537882182</id><published>2009-05-09T00:05:00.000-07:00</published><updated>2009-05-09T00:13:11.355-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code to open any programs'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code + basic games'/><category scheme='http://www.blogger.com/atom/ns#' term='vb codes'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code'/><category scheme='http://www.blogger.com/atom/ns#' term='using if then else'/><category scheme='http://www.blogger.com/atom/ns#' term='how to write vb code to produce barcodes'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code overwrite field access database'/><title type='text'>Using  If.....Then.....Else  Statements  with Operators</title><content type='html'>To effectively control the VB program flow, we shall use If...Then...Else statement together with the conditional operators and logical operators. The general format for the if...then...else statement is&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If conditions Then&lt;br /&gt;VB expressions&lt;br /&gt;Else&lt;br /&gt;VB expressions&lt;br /&gt;End If&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* any If..Then..Else statement must end with End If. Sometime it is not necessary to use Else.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub OK_Click() &lt;/strong&gt;&lt;br /&gt;firstnum = Val(usernum1.Text)&lt;br /&gt;secondnum = Val(usernum2.Text)&lt;br /&gt;total = Val(sum.Text)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If&lt;/strong&gt; total = firstnum + secondnum And Val(sum.Text) &lt;&gt; 0 &lt;strong&gt;Then &lt;/strong&gt;&lt;br /&gt;correct.Visible = True&lt;br /&gt;wrong.Visible = False&lt;br /&gt;&lt;strong&gt;Else&lt;/strong&gt; correct.Visible = False&lt;br /&gt;wrong.Visible = True&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;End If&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;End Sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6722608885537882182?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6722608885537882182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/using-ifthenelse-statements-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6722608885537882182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6722608885537882182'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/using-ifthenelse-statements-with.html' title='Using  If.....Then.....Else  Statements  with Operators'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3291174595810191131</id><published>2009-05-08T02:20:00.000-07:00</published><updated>2009-05-08T02:24:14.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Download the vbSkinner'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>example for use Operators in Visual Basic</title><content type='html'>&lt;strong&gt;Dim firstName As String&lt;br /&gt;Dim secondName As String&lt;br /&gt;Dim yourName As String&lt;br /&gt;&lt;br /&gt; Private Sub Command1_Click()&lt;br /&gt;          firstName = Text1.Text&lt;br /&gt;          secondName = Text2.Text&lt;br /&gt;          yourName = secondName + "  " + firstName&lt;br /&gt;          Label1.Caption = yourName&lt;br /&gt;End Sub&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In this example, three variables are declared as string. For variables firstName and secondName will receive their data from the user’s input into textbox1 and textbox2, and the variable yourName will be assigned the data by combining the first two variables.  Finally, yourName is displayed on Label1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3291174595810191131?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3291174595810191131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-for-use-operators-in-visual.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3291174595810191131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3291174595810191131'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/example-for-use-operators-in-visual.html' title='example for use Operators in Visual Basic'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8281025031701679978</id><published>2009-05-08T02:18:00.000-07:00</published><updated>2009-05-08T02:20:34.178-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='value'/><category scheme='http://www.blogger.com/atom/ns#' term='vb codes'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic DirectX Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='Assigning values'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><category scheme='http://www.blogger.com/atom/ns#' term='variables'/><title type='text'>Assigning Values to Variables</title><content type='html'>&lt;p&gt;After declaring various variables using the Dim statements, we can assign values to those variables. The general format of an assignment is&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Variable=Expression&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The variable can be a declared variable or a control property value. The expression could be a mathematical expression, a number, a string, a Boolean value (true or false) and more. The following are some examples: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;firstNumber=100 &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;secondNumber=firstNumber-99&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt; userName="John Lyan" &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;userpass.Text = password &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Label1.Visible = True &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Command1.Visible = false &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Label4.Caption = textbox1.Text &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;ThirdNumber = Val(usernum1.Text) &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;total = firstNumber + secondNumber+ThirdNumber   &lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8281025031701679978?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8281025031701679978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/assigning-values-to-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8281025031701679978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8281025031701679978'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/assigning-values-to-variables.html' title='Assigning Values to Variables'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7762200217531119250</id><published>2009-05-05T23:55:00.000-07:00</published><updated>2009-05-06T00:05:57.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='vb codes'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic DirectX Tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'></title><content type='html'>To start writing an event procedure, you need to double-click an object. For example, if you want to write an event procedure when a user clicks   a command button, you double-click on the command button and an event procedure will appear as shown in Figure 2.1. It takes the following format:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub Command1_Click&lt;br /&gt;         (Key in your program code here)&lt;br /&gt;End Sub&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;You then need to key-in the procedure in the space between Private Sub Command1_Click............. End Sub.  Sub actually stands for sub procedure that made up a part of all the procedures in a program. The program code is made up of a number of statements that set certain properties or trigger some actions. The syntax of Visual Basic’s program code is almost like the normal English language though not exactly the same, so it is very easy to learn. &lt;br /&gt;The syntax to set the property of an object or to pass certain value to it is :&lt;br /&gt;&lt;br /&gt;                            &lt;strong&gt;Object.Property&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;where Object and Property is separated by a period (or dot). For example, the statement Form1.Show means to show the form with the name Form1, Iabel1.Visible=true means label1 is set to be visible, Text1.text=”VB” is to assign the text VB to the text box with the name Text1, Text2.text=100 is to pass a value of 100 to the text box with the name text2, Timer1.Enabled=False is to disable the timer with the name Timer1 and so on. Let’s examine a few examples below:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example 1&lt;br /&gt;Private Sub Command1_click&lt;/strong&gt;&lt;br /&gt;        Label1.Visible=false&lt;br /&gt;        Label2.Visible=True&lt;br /&gt;Text1.Text=”You are correct!”&lt;br /&gt;&lt;strong&gt;End sub&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example 2&lt;br /&gt;Private Sub Command1_click&lt;/strong&gt;&lt;br /&gt;    Label1.Caption=” Welcome”&lt;br /&gt;    Image1.visible=true&lt;br /&gt;&lt;strong&gt;End sub&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7762200217531119250?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7762200217531119250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/to-start-writing-event-procedure-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7762200217531119250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7762200217531119250'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/to-start-writing-event-procedure-you.html' title=''/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-7191602075349027310</id><published>2009-05-05T23:43:00.000-07:00</published><updated>2009-05-05T23:53:13.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb source code'/><category scheme='http://www.blogger.com/atom/ns#' term='vb codes'/><category scheme='http://www.blogger.com/atom/ns#' term='vb code for access form'/><category scheme='http://www.blogger.com/atom/ns#' term='open program'/><category scheme='http://www.blogger.com/atom/ns#' term='basic games'/><category scheme='http://www.blogger.com/atom/ns#' term='code in vb'/><title type='text'>Steps in Building a Visual Basic Application</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Step 1 : Design the interface&lt;br /&gt;Step 2 : Set properties of the controls (Objects)&lt;br /&gt;Step 3 : Write the event procedures&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;List of Objects&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 455px; CURSOR: hand; HEIGHT: 287px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/vb_book/images/figure2.2.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;List of Procedures&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 455px; CURSOR: hand; HEIGHT: 287px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/vb_book/images/figure2.3.jpg" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;example Source code&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Private Sub Form_Load ( )&lt;br /&gt;Form1.show&lt;br /&gt;Print “Welcome to Visual Basic tutorial”&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 455px; CURSOR: hand; HEIGHT: 287px; TEXT-ALIGN: center" alt="" src="http://www.vbtutor.net/vb_book/images/figure2.4.jpg" border="0" /&gt; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-7191602075349027310?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/7191602075349027310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/steps-in-building-visual-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7191602075349027310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/7191602075349027310'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/steps-in-building-visual-basic.html' title='Steps in Building a Visual Basic Application'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-2388251647434865292</id><published>2009-05-04T22:49:00.000-07:00</published><updated>2009-05-04T22:56:16.035-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='source code free'/><category scheme='http://www.blogger.com/atom/ns#' term='A simple calculator'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>Creating Your First Application in VB 6</title><content type='html'>Creating Your First Application&lt;br /&gt;In this section, we will not go into the technical aspects of Visual Basic programming yet, what you need to do is just try out the examples below to see how does in VB program look like:&lt;br /&gt;Example 2.1.1 is a simple program. First of all, you have to launch Microsoft Visual Basic 6. Normally, a default form with the name Form1 will be available for you to start your new project. Now, double click on Form1, the source code window for Form1 as shown in figure 2.1 will appear. The top of the source code window consists of a list of objects and their associated events or procedures. In figure 2.1, the object displayed is Form and the associated procedure is Load.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5332214176303908546" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 153px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_tr0XECpUIz0/Sf_UisTlhsI/AAAAAAAAAC0/yNPOMMqe4lU/s200/mainwindows.jpg" border="0" /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;                  When you click on the object box, the drop-down list will display a list of objects you have inserted into your form as shown in figure 2.2. Here, you can see a form with the name Form1, a command button with the name Command1, a Label with the name Label1 and a Picture Box with the name Picture1. Similarly, when you click on the procedure box, a list of procedures associated with the object will be displayed as shown in figure 2.3. Some of the procedures associated with the object Form1 are Activate, Click, DblClick (which means Double-Click) , DragDrop, keyPress and more. Each object has its own set of procedures. You can always select an object and write codes for any of its procedure in order to perform certain tasks.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;            You do not have to worry about the beginning and the end statements (&lt;strong&gt;i.e. Private Sub Form_Load.......End Sub.);&lt;/strong&gt; Just key in the lines in between the above two statements exactly as are shown here. When you press F5 to run the program, you will be surprise that nothing shown up .In order to display the output of the program, you have to add the Form1.show statement like in Example 2.1.1  or you can just use Form_Activate ( )  event procedure as shown in example 2.1.2. The command Print does not mean printing using a printer but it means displaying the output on the computer screen. Now, press F5 or click on the run button to run the program and you will get the output as shown in figure 2.4.&lt;br /&gt; You can also perform arithmetic calculations as shown in example 2.1.2. VB uses * to denote the multiplication operator and / to denote the division operator. The output is shown in figure 2.3, where the results are arranged vertically.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-2388251647434865292?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/2388251647434865292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-your-first-application-in-vb-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2388251647434865292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/2388251647434865292'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/creating-your-first-application-in-vb-6.html' title='Creating Your First Application in VB 6'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_tr0XECpUIz0/Sf_UisTlhsI/AAAAAAAAAC0/yNPOMMqe4lU/s72-c/mainwindows.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-6556663839989969882</id><published>2009-05-03T00:03:00.000-07:00</published><updated>2009-05-03T00:08:43.638-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='The Combo Box'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic DirectX Tutorials'/><title type='text'>The Combo Box</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;The Combo Box &lt;br /&gt;The function of the Combo Box is also to present a list of items where the user can click and select the items from the list. However, the user needs to click on the small arrowhead on the right of the combo box to see the items which are presented in a drop-down list. In order to add items to the list, you can also use the AddItem method. For example, if you wish to add a number of items to Combo box 1, you can key in the following statements&lt;br /&gt;Example 3.3&lt;br /&gt;Private Sub Form_Load ( )&lt;br /&gt;&lt;br /&gt;Combo1.AddItem “Item1”&lt;br /&gt;Combo1.AddItem “Item2”&lt;br /&gt;Combo1.AddItem “Item3”&lt;br /&gt;Combo1.AddItem “Item4”&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-6556663839989969882?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/6556663839989969882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/combo-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6556663839989969882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/6556663839989969882'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/combo-box.html' title='The Combo Box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-8673426108386425795</id><published>2009-05-03T00:02:00.002-07:00</published><updated>2009-05-03T00:07:46.047-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Text Box'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX controls'/><category scheme='http://www.blogger.com/atom/ns#' term='The List Box'/><title type='text'>The List Box</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;The List Box&lt;br /&gt;The function of the List Box is to present a list of items where the user can click and select the items from the list. In order to add items to the list, we can use the AddItem method. For example, if you wish to add a number of items to list box 1, you can key in the following statements&lt;br /&gt;Example 3.2&lt;br /&gt;&lt;br /&gt;Private Sub Form_Load ( )&lt;br /&gt;&lt;br /&gt;List1.AddItem “Lesson1”&lt;br /&gt;List1.AddItem “Lesson2”&lt;br /&gt;List1.AddItem “Lesson3”&lt;br /&gt;List1.AddItem “Lesson4”&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;The items in the list box can be identified by the ListIndex property, the value of the ListIndex for the first item is 0, the second item has a ListIndex 1, and the second item has a ListIndex 2 and so on&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-8673426108386425795?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/8673426108386425795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/list-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8673426108386425795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/8673426108386425795'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/list-box.html' title='The List Box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-3504496443780766580</id><published>2009-05-03T00:02:00.001-07:00</published><updated>2009-05-03T00:05:55.309-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX controls'/><category scheme='http://www.blogger.com/atom/ns#' term='The Picture Box'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>The Picture Box</title><content type='html'>&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;strong&gt;The Picture Box &lt;/strong&gt;&lt;br /&gt;The Picture Box is one of the controls that is used to handle graphics. You can load a picture at design phase by clicking on the picture item in the properties window and select the picture from the selected folder. You can also load the picture at runtime using the LoadPicture method. For example, the statement will load the picture grape.gif into the picture box.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;p&gt;&lt;br /&gt;Picture1.Picture=LoadPicture ("C:\VB program\Images\grape.gif")&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You will learn more about the picture box in future lessons. The image in the picture box is not resizable.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-3504496443780766580?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/3504496443780766580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/picture-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3504496443780766580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/3504496443780766580'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/picture-box.html' title='The Picture Box'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1703949483545735951.post-5580999237544940467</id><published>2009-05-03T00:02:00.000-07:00</published><updated>2009-05-03T00:04:46.177-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='k1 vbcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Label'/><category scheme='http://www.blogger.com/atom/ns#' term='Command Button'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX controls'/><category scheme='http://www.blogger.com/atom/ns#' term='vb 6 code'/><title type='text'>Command Button and Label</title><content type='html'>&lt;span style="font-family:arial;font-size:78%;"&gt;&lt;strong&gt;The Label &lt;/strong&gt;&lt;br /&gt;The label is a very useful control for Visual Basic, as it is not only used to provide instructions and guides to the users, it can also be used to display outputs. One of its most important properties is Caption. Using the syntax label.Caption, it can display text and numeric data . You can change its caption in the properties window and also at runtime. Please refer to Example 3.1 and Figure 3.1 for the usage of label.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:78%;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:78%;"&gt;&lt;strong&gt;The Command Button &lt;/strong&gt;&lt;br /&gt;The command button is one of the most important controls as it is used to execute commands. It displays an illusion that the button is pressed when the user click on it. The most common event associated with the command button is the Click event, and the syntax for the procedure is&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click ()&lt;br /&gt;&lt;br /&gt;Statements&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:78%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1703949483545735951-5580999237544940467?l=k1vbcode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://k1vbcode.blogspot.com/feeds/5580999237544940467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/command-button-and-label.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5580999237544940467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1703949483545735951/posts/default/5580999237544940467'/><link rel='alternate' type='text/html' href='http://k1vbcode.blogspot.com/2009/05/command-button-and-label.html' title='Command Button and Label'/><author><name>asia-hotels</name><uri>http://www.blogger.com/profile/00812922683595643648</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
