<?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-1513307506744653367</id><updated>2011-11-27T17:21:50.895-08:00</updated><category term='Tools'/><category term='Samples Projects'/><category term='Beginner Programming'/><category term='Code Sample'/><category term='Advance Programming'/><category term='Download'/><category term='Tips and Tricks'/><title type='text'>Visual Basic 6.0 Tutorial Tips and Tricks</title><subtitle type='html'>Visual Basic 6.0 Programming, Tutorial, Tips and Tricks</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7178332334624841759</id><published>2011-01-13T19:08:00.000-08:00</published><updated>2011-01-13T19:13:53.152-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samples Projects'/><title type='text'>Download Inventory and Delivery Sistem Source Code</title><content type='html'>Download Inventory and Delivery Sistem Source Code, this project using &lt;a href="http://basicprograming.blogspot.com/2009/08/visual-basic-programing.html"&gt;Visual Basic 6.0&lt;/a&gt; and MySql database.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_lzdaYtqTMFU/TS-8sCzMYZI/AAAAAAAAAQ4/jHzqdPmHkgg/s1600/cats.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://2.bp.blogspot.com/_lzdaYtqTMFU/TS-8sCzMYZI/AAAAAAAAAQ4/jHzqdPmHkgg/s320/cats.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_lzdaYtqTMFU/TS-84sCZ1BI/AAAAAAAAAQ8/p0ChZco-pxg/s1600/pengiriman.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="http://3.bp.blogspot.com/_lzdaYtqTMFU/TS-84sCZ1BI/AAAAAAAAAQ8/p0ChZco-pxg/s320/pengiriman.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Download Source : &lt;a href="http://www.megaupload.com/?d=1AZF2PEE"&gt;Delivery.rar&lt;/a&gt;&lt;br /&gt;Download Database : &lt;a href="http://www.megaupload.com/?d=UE90XHFL"&gt;Database.rar&lt;/a&gt;&lt;br /&gt;Download Ocx&amp;nbsp; : &lt;a href="http://www.megaupload.com/?d=LWJ0318S"&gt;Ocx.rar&lt;/a&gt;&lt;br /&gt;Download &lt;a href="http://www.megaupload.com/?d=7235R0YV"&gt;MySql Connector&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;username="username"&lt;br /&gt;password="password"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7178332334624841759?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7178332334624841759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7178332334624841759&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7178332334624841759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7178332334624841759'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2011/01/download-inventory-and-delivery-sistem.html' title='Download Inventory and Delivery Sistem Source Code'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_lzdaYtqTMFU/TS-8sCzMYZI/AAAAAAAAAQ4/jHzqdPmHkgg/s72-c/cats.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2823822632779669259</id><published>2011-01-06T17:59:00.000-08:00</published><updated>2011-01-06T17:59:30.932-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samples Projects'/><title type='text'>POS Aplication Ver 3.1</title><content type='html'>&lt;a href="http://berita-koe.blogspot.com/2011/01/program-penjualan-toko-atau-minimarket.html"&gt;POS Aplication Ver 3.1&lt;/a&gt; &lt;span class="long_text" id="result_box"&gt;&lt;span onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ebeff9'" style="background-color: white;" title="ini dibuat dengan bahasa pemrograman Visual Basic 6.0 dan database MySql."&gt;was made with Visual  Basic 6.0 programming language and MySQL database. &lt;/span&gt;&lt;span onmouseout="this.style.backgroundColor='#fff'" onmouseover="this.style.backgroundColor='#ebeff9'" style="background-color: white;" title="Program ini dapat digunakan sebagai referensi bagi para programmer pemula khususnya bagi yang menyukai Visual basic 6.0 , atau bisa juga langsung digunakan untuk toko atau minimarket anda"&gt;This program can be used  as a reference for beginner programmers, especially those like Visual  Basic 6.0, or can be directly used to store or your minimarket..&amp;nbsp; &lt;a href="http://berita-koe.blogspot.com/2011/01/program-penjualan-toko-atau-minimarket.html"&gt;read more&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2823822632779669259?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2823822632779669259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2823822632779669259&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2823822632779669259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2823822632779669259'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2011/01/pos-aplication-ver-31.html' title='POS Aplication Ver 3.1'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4131423748509388488</id><published>2009-10-28T18:45:00.000-07:00</published><updated>2009-10-28T18:45:13.360-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>InputBox Function in Visual Basic 6 (VB6)</title><content type='html'>InputBox Function in Visual Basic 6 (VB6). Displays a prompt in a dialog box, waits for the user to input text or click  a button, and returns a String containing the contents of the text box.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img2.uploadhouse.com/fileuploads/4777/47772014fd6aa21e90d25df5ffc332244100c94.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://img2.uploadhouse.com/fileuploads/4777/47772014fd6aa21e90d25df5ffc332244100c94.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Syntax :&lt;/b&gt; &lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;memory_variable = InputBox (prompt[,title][,default])&lt;br /&gt;&lt;/div&gt;memory_variable 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;ul&gt;&lt;li&gt;  &lt;b&gt;Prompt &lt;/b&gt;- String expression displayed as the message in the dialog box.  If prompt consists of more than one line, you can separate the lines using the  vbCrLf constant&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Title &lt;/b&gt;- String expression displayed in the title bar of the dialog box.  If you omit the title, the application name is displayed in the title bar&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;default-text&lt;/b&gt; - The default text that appears in the input field where  users can use it as his intended input or he may change to the message he wish  to key in. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;x-position and y-position &lt;/b&gt;- the position or the coordinate of the input  box. &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="left"&gt;Following example demonstrates the use of InputBox function&lt;br /&gt;&lt;br /&gt;* Open a new project and save the Form as InputBox.frm and save the Project as  InputBox.vbp &lt;br /&gt;&lt;/div&gt;* Design the application as shown below.&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr bgcolor="#cccccc" class="text"&gt;  &lt;td width="30%"&gt;&lt;div align="center"&gt;&lt;b&gt;Object &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="35%"&gt;&lt;div align="center"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="35%"&gt;&lt;div align="center"&gt;&lt;b&gt;Setting&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td width="30%"&gt;&lt;b&gt;Form&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;Caption&lt;br /&gt;Name&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;InputBox test&lt;br /&gt;frmInputBox&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td width="30%"&gt;&lt;b&gt;Label&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;Caption&lt;br /&gt;Name&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;You entered&lt;br /&gt;lbl1&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td width="30%"&gt;&lt;b&gt;Label&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;Caption&lt;br /&gt;Name&lt;br /&gt;BorderStyle&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;( empty)&lt;br /&gt;lbl2&lt;br /&gt;1-Fixed Single &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td width="30%"&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;Caption&lt;br /&gt;Name&lt;br /&gt;&lt;/td&gt; &lt;td width="35%"&gt;OK&lt;br /&gt;cmdOK&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img7.uploadhouse.com/fileuploads/4777/4777198a5a783ff5a29911e4e508970f2749a22.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="223" src="http://img7.uploadhouse.com/fileuploads/4777/4777198a5a783ff5a29911e4e508970f2749a22.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Following code is entered in &lt;b&gt;cmdOK_Click ( )&lt;/b&gt; event&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdok_Click()&lt;br /&gt;Dim ans As String&lt;br /&gt;ans = InputBox("Enter something to be displayed in the label", "Testing",  0)&lt;br /&gt;If ans = "" Then&lt;br /&gt;lbl2.Caption = "No message"&lt;br /&gt;Else&lt;br /&gt;lbl2.Caption = ans&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/div&gt;Save and run the application. As soon as you click the OK button you will get  the following InputBox&lt;br /&gt;&lt;a href="http://www.uploadhouse.com/viewfile.php?id=4777199&amp;amp;showlnk=0" target="_blank"&gt;&lt;img alt="Image Hosted by UploadHouse.com" border="0" src="http://img6.uploadhouse.com/fileuploads/4777/4777199fbd1e4ed544d7650a158adf575c7487c.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;Here I have entered "Hello World" in text field. As soon as you click  OK the output is shown as shown below&lt;br /&gt;&lt;a href="http://www.uploadhouse.com/viewfile.php?id=4777200&amp;amp;showlnk=0" target="_blank"&gt;&lt;img alt="Image Hosted by UploadHouse.com" border="0" src="http://img6.uploadhouse.com/fileuploads/4777/47772006307861b07c2cef56bd887ef24520690.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=Y2L0CM4Y"&gt;&lt;b&gt;Download Sourcecode&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4131423748509388488?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4131423748509388488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4131423748509388488&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4131423748509388488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4131423748509388488'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/inputbox-function-in-visual-basic-6-vb6.html' title='InputBox Function in Visual Basic 6 (VB6)'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-6651672720745235517</id><published>2009-10-26T00:26:00.000-07:00</published><updated>2009-10-26T00:26:12.229-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Visual Basic 6.0 Portable Edition Free Download</title><content type='html'>Visual Basic 6.0 Portable Edition Free Download here&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img9.uploadhouse.com/fileuploads/4765/476528969b636b9802407a41550e66884365ea9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://img9.uploadhouse.com/fileuploads/4765/476528969b636b9802407a41550e66884365ea9.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://freesoftwareme.blogspot.com/2009/10/download-visual-basic-60-portable.html"&gt;Link Download Here &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-6651672720745235517?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/6651672720745235517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=6651672720745235517&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6651672720745235517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6651672720745235517'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/visual-basic-60-portable-edition-free.html' title='Visual Basic 6.0 Portable Edition Free Download'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3022052522640169169</id><published>2009-10-20T18:51:00.000-07:00</published><updated>2009-10-20T18:51:12.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samples Projects'/><title type='text'>Sample Project Simple Celluler</title><content type='html'>&lt;div style="text-align: justify;"&gt;The sample project simple celluler is mini aplication for mobile shop, this aplication made in Indonesian version using &lt;a href="http://basicprograming.blogspot.com/2009/08/visual-basic-programing.html"&gt;Visual Basic 6.0 programming language&lt;/a&gt; and &lt;a href="http://basicprograming.blogspot.com/2009/10/crystal-report-85-runtimes.html"&gt;crystal report 8.5&lt;/a&gt;. Database using Microsoft Access 2003. and Data Source Name (DSN) connection &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; using ODBC. &lt;a href="http://basicprograming.blogspot.com/2009/10/create-data-source-name-dsn-using-odbc.html"&gt;How to create DSN read here&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img5.uploadhouse.com/fileuploads/4741/4741135240536ceb88d22922f9946f66046cd11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://img5.uploadhouse.com/fileuploads/4741/4741135240536ceb88d22922f9946f66046cd11.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=ZBKWNO67"&gt;Download Source Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.megaupload.com/?d=9LN6BOAY"&gt;Download Ocx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3022052522640169169?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3022052522640169169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3022052522640169169&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3022052522640169169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3022052522640169169'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/sample-project-simple-celluler.html' title='Sample Project Simple Celluler'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2712445416403725591</id><published>2009-10-20T18:49:00.000-07:00</published><updated>2009-10-20T18:52:22.006-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Create Data Source Name (DSN) Using ODBC and Microsoft Access</title><content type='html'>How to Create Data Source Name Using ODBC and Microsoft Access, follow this intruction below:&lt;br /&gt;1. Open Control Panel - Administrative Tools - Data Sources (ODBC).&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img9.uploadhouse.com/fileuploads/4741/4741238f0079f1a9341a7669e79b3c11f589085.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://img9.uploadhouse.com/fileuploads/4741/4741238f0079f1a9341a7669e79b3c11f589085.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;2. Choose File DSN Tab - Click Add - Choose Microsoft Access Driver(*.mdb) - Click Next - Then Click browse - Make the name of DSN File - Click Save&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img3.uploadhouse.com/fileuploads/4741/4741239e6bf4eac9d386cca07798c96c0137ed1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://img3.uploadhouse.com/fileuploads/4741/4741239e6bf4eac9d386cca07798c96c0137ed1.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img4.uploadhouse.com/fileuploads/4741/47412406573d9a220f5f58b45b2eb49edc2b085.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://img4.uploadhouse.com/fileuploads/4741/47412406573d9a220f5f58b45b2eb49edc2b085.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;3. Click Next - Click Finish&lt;br /&gt;&lt;br /&gt;4. Cick select button and choose where you store the microsoft access databse&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img7.uploadhouse.com/fileuploads/4741/4741241ea71b14b09b164c548ed1a4a3b67078b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://img7.uploadhouse.com/fileuploads/4741/4741241ea71b14b09b164c548ed1a4a3b67078b.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;5. Finish&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2712445416403725591?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2712445416403725591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2712445416403725591&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2712445416403725591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2712445416403725591'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/create-data-source-name-dsn-using-odbc.html' title='Create Data Source Name (DSN) Using ODBC and Microsoft Access'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1747651517077772162</id><published>2009-10-20T05:07:00.000-07:00</published><updated>2009-10-20T05:07:00.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Piecing Separate Numbers Together to Form a Date or Time Value</title><content type='html'>Piecing Separate Numbers Together to Form a Date or Time Value.&lt;br /&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Arial;"&gt;In the previous examples, we   saw ways to isolate parts of a date/time value. What if you need to go the   "other way"? If you have the separate parts of a date/time value in   different variables and want to piece them together to formulate a date or   time, there are two functions you can use to do this: &lt;b&gt;DateSerial&lt;/b&gt; and &lt;b&gt;TimeSerial&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The &lt;b&gt;DateSerial&lt;/b&gt; takes   three numeric arguments: year, month, and day respectively. It returns a date   based on those values.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intYear    As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intMonth   As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intDay     As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   dtmNewDate As Date&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intYear   = 2001&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intMonth   = 9&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intDay   = 2&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;dtmNewDate   = DateSerial(intYear, intMonth, intDay) &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;'   returns 9/2/2001&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The &lt;b&gt;TimeSerial&lt;/b&gt; takes   three numeric arguments: hour, minute, and second respectively. It returns a   time based on those values.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intHour    As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intMinute  As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   intSecond  As Integer&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim   dtmNewTime As Date&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intHour   = 11 &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intMinute   = 34&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intSecond   = 44 &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;dtmNewTime   = TimeSerial(intHour, intMinute, intSecond) &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;'returns   11:34:44 (AM)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-1747651517077772162?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1747651517077772162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1747651517077772162&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1747651517077772162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1747651517077772162'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/piecing-separate-numbers-together-to.html' title='Piecing Separate Numbers Together to Form a Date or Time Value'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3848890184644102214</id><published>2009-10-20T05:05:00.001-07:00</published><updated>2009-10-20T05:05:45.067-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>The DatePart Function</title><content type='html'>The DatePart Function in VB6, &lt;br /&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family: Arial;"&gt;The generic &lt;b&gt;DatePart&lt;/b&gt; function returns an Integer containing the specified part of  a given date/time   value. Thus, it incorporates the functionality of the Weekday, Month, Day,   Year, Hour, Minute, and Second functions. In addition, it can used to get the   quarter of a given date (1 through 4) , the "Julian" date (the day of   the year from 1 to 366), and the week number (1 through 53).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Syntax:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;DatePart(&lt;i&gt;interval,   date[,firstdayofweek[, firstweekofyear]]&lt;/i&gt;)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="font-family: Arial;"&gt;The   DatePart function syntax has these parts:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td valign="top" width="132"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;Part&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="547"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="132"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Arial;"&gt;interval&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="547"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Required. String         expression that is the interval of time you want to return.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The string expression can         be any of the following:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Expression&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Possible Range of               Values&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"yyyy"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Year&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;100 to 9999&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"q"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Quarter&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;1 to 4&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"m"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Month&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;1 to 12&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"y"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Day of year&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;1 to 366 (a               "Julian" date)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"d"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Day&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;1 to 31&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"w"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Weekday&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;1 to 7&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt;"ww"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt;Week&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt;1 to 53&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"h"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Hour&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;0 to 23&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"n"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Minute&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;0 to 59&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;tr&gt;           &lt;td valign="top" width="117"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;"s"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="168"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Second&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;           &lt;td valign="top" width="228"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;0 to 59&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="132"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Arial;"&gt;date&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="547"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Required. Date value that         you want to evaluate.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="132"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Arial;"&gt;firstdayofweek&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="547"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Optional. A constant that         specifies the first day of the week. If not specified, Sunday is assumed.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="132"&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Arial;"&gt;firstweekofyear&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="547"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Optional. A constant that         specifies the first week of the year. If not specified, the first week is         assumed to be the week in which January 1 occurs.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3848890184644102214?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3848890184644102214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3848890184644102214&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3848890184644102214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3848890184644102214'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/datepart-function.html' title='The DatePart Function'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3150875518383834800</id><published>2009-10-20T05:03:00.000-07:00</published><updated>2009-10-20T05:03:50.491-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Date Time Functions In Visual Basic 6.0</title><content type='html'>&lt;div class="MsoNormal"&gt;Date Time Functions In Visual Basic 6.0.&lt;span style="font-family: Arial;"&gt;Recall the VB keywords that   reference the current date and/or time:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;Now&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt; Returns   the current date and time together&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;Date&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt; Returns   the current date&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Arial;"&gt;Time &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial;"&gt;Returns   the current time&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The following functions   isolate the date portion and time portion, respectively, of a Date/Time value:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Function&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;DateValue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns the date portion         of a Date/Time value, with the time portion "zeroed out". (Note:         When the time portion of a date/time variable is "zeroed out", the         time would be interpreted as &lt;/span&gt;&lt;span style="font-family: Arial;"&gt;12:00 AM&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;.)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim dtmTest As         Date&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;dtmTest =         DateValue(Now)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;At this point, the date         portion of dtmTest is &lt;/span&gt;&lt;span style="font-family: Arial;"&gt;8/31/2001&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;, with a time portion of 0 (&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;12:00 AM&lt;/span&gt;&lt;span style="font-family: Arial;"&gt; &lt;/span&gt;&lt;span style="font-family: Arial;"&gt;midnight&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;TimeValue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns the time portion         of a Date/Time value, with the date portion "zeroed out". (Note:         When a date/time variable is "zeroed out", the date will actually         be interpreted as December 30, 1899.)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Dim dtmTest As         Date&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;dtmTest =         TimeValue(Now) &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;At this point, the time         portion of dtmTest is &lt;/span&gt;&lt;span style="font-family: Arial;"&gt;9:15:20 PM&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;, with a date portion of 0 (&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;12/30/1899&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoHeader"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The following functions are   used to isolate a particular part of a date:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Function&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Weekday&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a number from 1 to         7 indicating the day of the week for a given date, where 1 is Sunday and 7 is         Saturday.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intDOW =         Weekday(Now)         ' intDOW = 6 &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt;When necessary to refer to         a day of the week in code, VB has a set of built-in constants that can be         used instead of the hard-coded values 1 thru 7:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; &lt;u&gt;Constant&lt;/u&gt; &lt;u&gt;Value&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbSunday                      1&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbMonday                      2&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbTuesday                     3&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbWednesday    4&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbThursday                    5&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbFriday                        6&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: Arial;"&gt; vbSaturday                    7&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Function&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;WeekdayName&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a string containing         the weekday name ("Sunday" thru "Saturday"), given a         numeric argument with the value 1 through 7.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strDOW =         WeekdayName(6)       ' strDOW = "Friday"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The WeekdayName function         takes an optional, second argument (Boolean) indicating whether or not to         abbreviate the weekday name. By default, the second argument is False,         meaning do not abbreviate and return the full name. If True, the first three         letters of the weekday name will be returned:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strDOW =         WeekdayName(6, True) ' strDOW = "Fri"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;You can nest the Weekday         function within the WeekdayName function to get the weekday name for a given         date:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strDOW =         WeekdayName(Weekday(Now))  ' strDOW = "Friday"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Month&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a number from 1 to         12 indicating the month portion of a given date.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intMonth =         Month(Now)               ' intMonth = 8&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;MonthName&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a string         containing the month name ("January" thru "December"),         given a numeric argument with the value 1 through 12.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strMoName =         MonthName(8)            ' strMoName = "August"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The MonthName function         takes an optional, second argument (Boolean) indicating whether or not to         abbreviate the month name. By default, the second argument is False, meaning         do not abbreviate and return the full name. If True, the first three letters         of the month name will be returned:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strMoName =         MonthName(8, True)      ' strMoName = "Aug"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;You can nest the Month         function within the MonthName function to get the month name for a given         date:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;strMoName =         MonthName(Month(Now))   ' strMoName = "August"&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Day&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a number from 1 to         31 indicating the day portion of a given date.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intDay = Day(Now)             '         intDay = 31&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Year&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns a number from 100         to 9999 indicating the year portion of a given date.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intYear =         Year(Now)                 ' intYear = 2001&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;The following functions are   used to isolate a particular part of a time:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Function&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;h4&gt;&lt;span style="font-family: Arial;"&gt;Description&lt;/span&gt;&lt;/h4&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Hour&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns an integer         specifying a whole number between 0 and 23 representing the hour of the day.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intHour =         Hour(Now)                 ' intHour = 21 (for 9 PM)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Minute&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns an integer         specifying a whole number between 0 and 59 representing the minute of the         hour.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intMinute =         Minute(Now)             ' intMinute = 15&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td valign="top" width="139"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Second&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td valign="top" width="595"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Returns an integer         specifying a whole number between 0 and 59 representing the second of the         minute.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family: Arial;"&gt;Example&lt;/span&gt;&lt;/u&gt;&lt;span style="font-family: Arial;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoHeader"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;intSecond =         Second(Now)             ' intSecond = 20&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3150875518383834800?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3150875518383834800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3150875518383834800&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3150875518383834800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3150875518383834800'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/date-time-functions-in-visual-basic-60.html' title='Date Time Functions In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1582844772116970668</id><published>2009-10-19T02:26:00.000-07:00</published><updated>2009-10-19T02:26:22.728-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Fix and Handle Error License Information Activex Control (Ocx files)</title><content type='html'>Fix and Handle Error License Information Activex Control (Ocx files) using VB6Cli.exe&lt;br /&gt;&lt;h3 id="tocHeadRef"&gt;What is VB6Cli.exe?&lt;/h3&gt;&lt;script type="text/javascript"&gt;                loadTOCNode(2, 'moreinformation');            &lt;/script&gt;&lt;div style="text-align: justify;"&gt; VB6Cli.exe is a utility that is designed to fix design-time     license problems with ActiveX Controls that ship with Microsoft Visual Basic     6.0. The utility does not fix third-party controls or controls that are not     normally installed by Microsoft Visual Basic 6.0, nor does it enable the use of     Remote Data Object (RDO) objects in Visual Basic 6.0 Professional Edition. If     you try to use RDO in Visual Basic 6.0 Professional Edition, you may also     encounter symptoms II and IV below. The only way to enable RDO is to install     Visual Basic 6.0 Enterprise Edition. &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;VB6Cli.exe will help correct     problems with the following symptoms: &lt;h4 id="tocHeadRef"&gt;Symptom I&lt;/h4&gt;&lt;script type="text/javascript"&gt;            loadTOCNode(3, 'moreinformation');        &lt;/script&gt;&lt;div style="text-align: justify;"&gt; When trying to site a control within a project, Microsoft Visual     Basic raises the following error dialog: &lt;/div&gt;&lt;div class="kb_errormsgbody"&gt;&lt;div class="kb_errorcontent"&gt;&lt;div class="errormsg"&gt; "License     Information For This Component Not Found. You Do Not Have An Appropriate     License To Use This Functionality In The Design Environment." &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 id="tocHeadRef"&gt;Symptom II&lt;/h4&gt;&lt;script type="text/javascript"&gt;            loadTOCNode(3, 'moreinformation');        &lt;/script&gt; When trying to compile a project, Microsoft Visual Basic raises     the following error dialog: &lt;div class="kb_errormsgbody"&gt;&lt;div class="kb_errorcontent"&gt;&lt;div class="errormsg"&gt; Compile Error : Permission     Denied &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 id="tocHeadRef"&gt;Symptom III&lt;/h4&gt;&lt;script type="text/javascript"&gt;            loadTOCNode(3, 'moreinformation');        &lt;/script&gt; When using the Application Wizard, Microsoft Visual Basic raises     an error dialog similar to: &lt;div class="kb_errormsgbody"&gt;&lt;div class="kb_errorcontent"&gt;&lt;div class="errormsg"&gt; 60: Method ~ of Object ~     failed &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 id="tocHeadRef"&gt;Symptom IV&lt;/h4&gt;&lt;script type="text/javascript"&gt;            loadTOCNode(3, 'moreinformation');        &lt;/script&gt; When trying to run a project, Microsoft Visual Basic raises the     following error dialog: &lt;div class="kb_errormsgbody"&gt;&lt;div class="kb_errorcontent"&gt;&lt;div class="errormsg"&gt; Runtime Error '429' : ActiveX     Component Can't Create Object&amp;nbsp;&lt;/div&gt;&lt;div class="errormsg"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="errormsg"&gt;&lt;a href="http://www.megaupload.com/?d=HLH9K7DN"&gt;&lt;b&gt;Download VB6Cli.EXE &lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&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/1513307506744653367-1582844772116970668?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1582844772116970668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1582844772116970668&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1582844772116970668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1582844772116970668'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/fix-and-handle-error-license.html' title='Fix and Handle Error License Information Activex Control (Ocx files)'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-5105680090255518192</id><published>2009-10-14T02:06:00.000-07:00</published><updated>2009-10-14T02:06:12.717-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Using DriveListBox, DirListBox and FileListBox Control in Vb6.0</title><content type='html'>How to using DriveListBox, DirListBox and FileListBox control in Vb6.0.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img3.uploadhouse.com/fileuploads/4712/471240309df8a9f16652eb18328a4ebcd921762.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://img3.uploadhouse.com/fileuploads/4712/471240309df8a9f16652eb18328a4ebcd921762.jpg" width="420" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;  &lt;b&gt;DriveListBox&lt;/b&gt; : 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;/li&gt;&lt;li style="text-align: justify;"&gt;   &lt;b&gt;DirListBox &lt;/b&gt;: 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;/li&gt;&lt;li&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;FileListBox&lt;/b&gt; : 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;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;"&gt;&lt;b&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;amp; ":\"&lt;br /&gt;End Sub&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;"&gt;&lt;b&gt;Private Sub Dir1_Change()&lt;br /&gt;File1.Path = Dir1.Path&lt;br /&gt;End Sub&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;"&gt;&lt;b&gt;Filename = File1.Path &lt;br /&gt;If Right$(Filename, 1) &amp;lt;&amp;gt; "\" Then Filename = Filename &amp;amp; "\"&lt;br /&gt;Filename = Filename &amp;amp; File1.Filename&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&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;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-5105680090255518192?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/5105680090255518192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=5105680090255518192&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5105680090255518192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5105680090255518192'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/using-drivelistbox-dirlistbox-and.html' title='Using DriveListBox, DirListBox and FileListBox Control in Vb6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3364063100471939757</id><published>2009-10-12T03:43:00.000-07:00</published><updated>2009-10-12T03:43:45.942-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Access to MySQL Converter</title><content type='html'>&lt;div style="text-align: justify;"&gt;Access to MySQL Converter is a small program that will convert Microsoft Access  &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;Databases&lt;/a&gt; to &lt;a href="http://basicprograming.blogspot.com/2009/09/database-tools-mysql-connector-odbc-515.html"&gt;MySQL&lt;/a&gt;. &lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Wizard interface.&lt;/li&gt;&lt;li&gt;Transfer data directly from one server to another.&lt;/li&gt;&lt;li&gt;Create a dump file.&lt;/li&gt;&lt;li&gt;Select tables to transfer.&lt;/li&gt;&lt;li&gt;Select fields to transfer.&lt;/li&gt;&lt;li&gt;Transfer password protected databases.&lt;/li&gt;&lt;li&gt;Supports both shared security and user-level security.&lt;/li&gt;&lt;li&gt;Optional transfer of indexes.&lt;/li&gt;&lt;li&gt;Optional transfer of records.&lt;/li&gt;&lt;li&gt;Optional transfer of default values in field definitions.&lt;/li&gt;&lt;li&gt;Identifies and transfers auto number field types.&lt;/li&gt;&lt;li&gt;Command line interface.&lt;/li&gt;&lt;li&gt;Easy install, uninstall and upgrade.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;&lt;span style="font-size: large;"&gt;Using Access to MySQL&lt;/span&gt;&lt;/h1&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img7.uploadhouse.com/fileuploads/4704/47040901f54f41c709f15e5930376ef60ab94b3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="154" src="http://img7.uploadhouse.com/fileuploads/4704/47040901f54f41c709f15e5930376ef60ab94b3.png" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;When you start the program it will run you through a wizard. The wizard will  ask you all the necessary questions to setup the database transfer. In the first  step you are asked to supply the file name of the Microsoft Access Database to  convert.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; If your Access database requires you to log in you can specify a user name, password and a system database.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://www.ziddu.com/download/6883065/msa2mys_3_0_0_117.zip.html"&gt;&lt;b&gt;Download Access to Mysql &lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3364063100471939757?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3364063100471939757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3364063100471939757&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3364063100471939757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3364063100471939757'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/access-to-mysql-converter.html' title='Access to MySQL Converter'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7380128288216527795</id><published>2009-10-10T21:34:00.000-07:00</published><updated>2009-10-10T21:34:58.050-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>"Unrecognized Database Format" Error Message</title><content type='html'>&lt;div style="text-align: justify;"&gt;"Unrecognized Database Format" Error Message. If you got "Uncrecognized Database" Format"  error message, it's probably because the access database version that you  work with isn't compatible with your DAO reference.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To add the  compatible reference  to DAO: &lt;br /&gt;from VB menu choose  Project-&amp;gt; References, mark the Microsoft DAO 3.6 Object Library&lt;br /&gt;check box, and press OK.&lt;br /&gt;&lt;br /&gt;If you Don't have  Microsoft DAO 3.6 Object Library reference, click on browse, &lt;br /&gt;and select the  file C:\Program Files\Common Files\Microsoft Shared\Dao\dao360.dll &lt;br /&gt;(If you  have Access 2000 installed in your computer you have this file.)&lt;br /&gt;This will add Microsoft DAO 3.6 Object Library reference to  your project. &lt;br /&gt;Now mark it and press OK. or &lt;a href="http://basicprograming.blogspot.com/2009/09/non-ado-problems-data-access-visual.html"&gt;see about ADO&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7380128288216527795?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7380128288216527795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7380128288216527795&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7380128288216527795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7380128288216527795'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/unrecognized-database-format-error.html' title='&quot;Unrecognized Database Format&quot; Error Message'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4005807034372650575</id><published>2009-10-05T22:37:00.000-07:00</published><updated>2009-10-05T22:38:11.689-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Clear All TextBoxes In A Form</title><content type='html'>Tips and Tricks Visual Basic 6.0 Clear All TextBoxes In A Form.&lt;br /&gt;&lt;span style="color: black;"&gt;'Add 1 CommandButton and few TextBoxes To Your Form.&lt;br /&gt;'Insert the following code to your form:&lt;/span&gt;&lt;br /&gt;&lt;div style="background-color: #0b5394; color: white;"&gt;&lt;b&gt;Code&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Command1_Click()&lt;br /&gt;Dim Contrl As Control&lt;br /&gt;For Each Contrl In Form1.Controls&lt;br /&gt;If (TypeOf Contrl Is TextBox) Then Contrl.Text = ""&lt;br /&gt;Next Contrl&lt;br /&gt;End Sub&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4005807034372650575?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4005807034372650575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4005807034372650575&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4005807034372650575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4005807034372650575'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/tips-and-tricks-visual-basic-60-clear.html' title='Tips and Tricks Visual Basic 6.0 Clear All TextBoxes In A Form'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3747524165230116138</id><published>2009-10-05T00:13:00.000-07:00</published><updated>2009-10-05T00:35:10.650-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Allow Only UpperCase Letters In TextBox</title><content type='html'>&lt;span style="font-family: Verdana,sans-serif;"&gt;Tips and Tricks Visual Basic 6.0 Allow only uppercase in textbox.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;'Add 1 TextBox To Your Form.&lt;br /&gt;'Insert the following code to your form:&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;Private Sub Text1_Change()&lt;br /&gt;old = Text1.SelStart&lt;br /&gt;Text1.Text = UCase(Text1.Text)&lt;br /&gt;Text1.SelStart = old&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;or&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Private Sub Text1_KeyPress(KeyAscii As Integer)&lt;br /&gt;KeyAscii = Asc(UCase(Chr(KeyAscii)))&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3747524165230116138?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3747524165230116138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3747524165230116138&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3747524165230116138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3747524165230116138'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/tips-and-tricks-visual-basic-60-allow.html' title='Tips and Tricks Visual Basic 6.0 Allow Only UpperCase Letters In TextBox'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-6261841821579145720</id><published>2009-10-03T01:48:00.000-07:00</published><updated>2009-10-03T02:57:10.131-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Crystal Report 8.5 Runtimes</title><content type='html'>Crystal Report 8.5 Runtimes is tool for run the crystal report file in a application without install Crystal Report Isntaller.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img7.uploadhouse.com/fileuploads/4666/4666227e63c05f89e20a9ca226997be5f5dd1c9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="420" src="http://img7.uploadhouse.com/fileuploads/4666/4666227e63c05f89e20a9ca226997be5f5dd1c9.jpg" width="340" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Download Crystal Report 8.5 Runtimes&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt; Mega Upload : &lt;a href="http://www.megaupload.com/?d=YYCZZ3KW"&gt;&lt;b&gt;Download Cristal Report&amp;nbsp; 8.+ Runtimes&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ziddu : &lt;a href="http://www.ziddu.com/download/2258453/cr85setup.rar.html"&gt;&lt;b&gt;Download cr85setup here&lt;/b&gt;&lt;/a&gt; &amp;nbsp; note : password for installer is "pw".&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-6261841821579145720?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/6261841821579145720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=6261841821579145720&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6261841821579145720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6261841821579145720'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/crystal-report-85-runtimes.html' title='Crystal Report 8.5 Runtimes'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-50911478299255416</id><published>2009-10-02T20:15:00.000-07:00</published><updated>2009-10-02T20:19:43.020-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Delete File Using Visual Basic 6.0 Code</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="color: #000099;"&gt;Delete File Using Visual Basic 6.0 Code&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #000099;"&gt;Private&lt;/span&gt; &lt;span style="color: #000099;"&gt;Sub&lt;/span&gt; filedelete&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;filename &lt;span style="color: #000099;"&gt;As&lt;/span&gt; &lt;span style="color: #000099;"&gt;String&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #66cc66;"&gt;&lt;/span&gt;&lt;span style="color: #000099;"&gt; Dim&lt;/span&gt; filesystemobject &lt;span style="color: #000099;"&gt;As&lt;/span&gt; Object&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #000099;"&gt; Set&lt;/span&gt; filesystemobject = &lt;span style="color: #000099;"&gt;CreateObject&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #7f5f00;"&gt;"Scripting.filesystemobject"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #66cc66;"&gt;&lt;/span&gt;filesystemobject.deletefile filename, &lt;span style="color: #000099;"&gt;True&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #000099;"&gt;End&lt;/span&gt; &lt;span style="color: #000099;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #000099;"&gt;Private&lt;/span&gt; &lt;span style="color: #000099;"&gt;Sub&lt;/span&gt; Command1_Click&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #66cc66;"&gt;&lt;/span&gt;filedelete &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;filename&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"&gt;&lt;span style="color: #66cc66;"&gt;&lt;/span&gt;&lt;span style="color: #000099;"&gt;End&lt;/span&gt; &lt;span style="color: #000099;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #000099;"&gt;Note : &lt;i&gt;(filename) is location and file name of the file you will deleted &lt;/i&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-50911478299255416?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/50911478299255416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=50911478299255416&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/50911478299255416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/50911478299255416'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/delete-file-using-visual-basic-60-code.html' title='Delete File Using Visual Basic 6.0 Code'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1781604262841518708</id><published>2009-10-01T21:05:00.000-07:00</published><updated>2009-10-01T21:07:12.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Connection Visual Basic 6.0 With MySql Database</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;Connection Visual Basic 6.0 With MySql Database.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;First step you must &lt;a href="http://basicprograming.blogspot.com/2009/09/database-tools-mysql-connector-odbc-515.html"&gt;download MySql ODBC 5.15&lt;/a&gt;, and istall it. after it i&lt;a href="http://basicprograming.blogspot.com/2009/09/insert-ado-data-control-component-into.html"&gt;nsert ADO Data Control Component in to your project&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;Then create a form , add a adodc component and a command button, see picture below.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_lzdaYtqTMFU/SsV3XDUzQII/AAAAAAAAAMQ/E83k4AKf45k/s1600-h/MYsqlconn.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_lzdaYtqTMFU/SsV3XDUzQII/AAAAAAAAAMQ/E83k4AKf45k/s320/MYsqlconn.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="background-color: #0b5394; clear: both; color: white; font-family: Verdana,sans-serif; text-align: left;"&gt;Write this code to command button procedure.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Command1_Click()&lt;br /&gt;Dim myConnection As New ADODB.Connection&lt;br /&gt;Set myConnection = New ADODB.Connection&lt;br /&gt;myConnection.ConnectionString = "Provider=MSDASQL.1;" &amp;amp; _&lt;br /&gt;"Persist Security Info=False;Data Source=yourdatasourcename"&lt;br /&gt;myConnection.Open&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If myConnection.State = adStateOpen Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox "Connection Success"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox "Connection Failed"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myConnection.Close&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.megaupload.com/?d=PAVWQRZ2"&gt;&lt;b&gt;Download source&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;For any question comment &lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;this post..!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-1781604262841518708?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1781604262841518708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1781604262841518708&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1781604262841518708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1781604262841518708'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/10/connection-visual-basic-60-with-mysql.html' title='Connection Visual Basic 6.0 With MySql Database'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_lzdaYtqTMFU/SsV3XDUzQII/AAAAAAAAAMQ/E83k4AKf45k/s72-c/MYsqlconn.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-5821527670097552405</id><published>2009-09-30T19:55:00.001-07:00</published><updated>2009-09-30T19:56:31.230-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Make A Resizeable Text Box</title><content type='html'>&lt;span style="color: black;"&gt;&lt;b&gt;Tips and Tricks Visual Basic 6.0 Make A Resizeable Text Box&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;'Add a module to your project (In the menu choose Project -&amp;gt;  Add Module, Then click Open)&lt;br /&gt;'Add 1 Text Box and 2 Command Buttons to your form.&lt;br /&gt;'Insert this code to the module :&lt;/span&gt;&lt;br /&gt;Public Const SWP_DRAWFRAME = &amp;amp;H20&lt;br /&gt;Public Const SWP_NOMOVE = &amp;amp;H2&lt;br /&gt;Public Const SWP_NOSIZE = &amp;amp;H1&lt;br /&gt;Public Const SWP_NOZORDER = &amp;amp;H4&lt;br /&gt;Public Const SWP_FLAGS = SWP_NOZORDER Or SWP_NOSIZE Or _&lt;br /&gt;SWP_NOMOVE Or SWP_DRAWFRAME&lt;br /&gt;Public Const GWL_STYLE = (-16)&lt;br /&gt;Public Const WS_THICKFRAME = &amp;amp;H40000&lt;br /&gt;Public Declare Function GetWindowLong Lib "user32" Alias  "GetWindowLongA" _&lt;br /&gt;(ByVal hwnd As Long, ByVal nIndex As Long) As Long&lt;br /&gt;Public Declare Function SetWindowLong Lib "user32" Alias  "SetWindowLongA" _&lt;br /&gt;(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long&lt;br /&gt;Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal _&lt;br /&gt;hWndInsertAfter As Long, 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;&lt;span style="color: black;"&gt;'Insert the following code to your form:&lt;/span&gt;&lt;br /&gt;Dim initBoxStyle As Long&lt;br /&gt;&lt;br /&gt;Private Sub Command2_Click()&lt;br /&gt;SetControlStyle initBoxStyle, Text1&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Form_Load()&lt;br /&gt;Command1.Caption = "Start Resizing"&lt;br /&gt;Command2.Caption = "Complete Resizing"&lt;br /&gt;initBoxStyle = GetWindowLong(Text1.hwnd, GWL_STYLE)&lt;br /&gt;SetControlStyle initBoxStyle, Text1&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Form_Unload(Cancel As Integer)&lt;br /&gt;SetControlStyle initBoxStyle, Text1&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;Dim style As Long&lt;br /&gt;style = GetWindowLong(Text1.hwnd, GWL_STYLE)&lt;br /&gt;style = style Or WS_THICKFRAME&lt;br /&gt;SetControlStyle style, Text1&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Private Sub SetControlStyle(style, X As Control)&lt;br /&gt;Dim r&lt;br /&gt;If style Then&lt;br /&gt;Call SetWindowLong(X.hwnd, GWL_STYLE, style)&lt;br /&gt;Call SetWindowPos(X.hwnd, Form1.hwnd, 0, 0, 0, 0, SWP_FLAGS)&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-5821527670097552405?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/5821527670097552405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=5821527670097552405&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5821527670097552405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5821527670097552405'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/tips-and-tricks-visual-basic-60-make.html' title='Tips and Tricks Visual Basic 6.0 Make A Resizeable Text Box'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7256729378119180158</id><published>2009-09-29T19:08:00.000-07:00</published><updated>2009-09-29T19:19:25.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Samples Projects'/><title type='text'>Sample Projects CallWindowProc_Demo.Zip</title><content type='html'>&lt;a href="http://img9.uploadhouse.com/fileuploads/4652/46524297bbd53fcb2f0a6e2e7a9ea8232c0f3be.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="140" src="http://img9.uploadhouse.com/fileuploads/4652/46524297bbd53fcb2f0a6e2e7a9ea8232c0f3be.jpg" width="200" /&gt;&lt;/a&gt;&lt;span style="font-family: inherit;"&gt;&lt;i&gt;&lt;b&gt;CallWindowProc_Demo&lt;/b&gt;&lt;/i&gt;.&lt;/span&gt; &lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;This project shows how you can call VB functions using a memory pointer with the CallWindowProc API function.&amp;nbsp; Not particularly useful in every day coding but there are situations where this technique could be just the ticket!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;&lt;a href="http://www.megaupload.com/?d=JKZF9MPP"&gt;Download&amp;nbsp; CallWindowProc_Demo.Zip&lt;/a&gt;&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/1513307506744653367-7256729378119180158?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7256729378119180158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7256729378119180158&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7256729378119180158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7256729378119180158'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/sample-projects-callwindowprocdemozip.html' title='Sample Projects CallWindowProc_Demo.Zip'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-6789786636098490489</id><published>2009-09-28T21:04:00.000-07:00</published><updated>2009-09-28T21:04:35.930-07:00</updated><title type='text'>App Activate Demo.zip (12KB)</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt;App Activate Demo.zip    (12KB)&amp;nbsp; This project shows how to activate a previous instance of an application.&amp;nbsp; It works even if the previous instance is minimized &lt;i&gt;OR&lt;/i&gt; if it has a variable title (like Notepad or Word) &lt;i&gt;OR&lt;/i&gt; if the exe being started lives in a different directory than    the original instance.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://www.megaupload.com/?d=0ED4DHLF"&gt;Download App Activate Demo.zip    (12KB)&lt;/a&gt;&lt;span style="font-family: Verdana,Arial,Helvetica;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-6789786636098490489?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/6789786636098490489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=6789786636098490489&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6789786636098490489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6789786636098490489'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/app-activate-demozip-12kb.html' title='App Activate Demo.zip (12KB)'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-977597112916182438</id><published>2009-09-28T20:49:00.000-07:00</published><updated>2009-09-28T20:57:19.064-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Database tools mysql-connector-odbc-5.1.5-win32.</title><content type='html'>&lt;div style="text-align: justify;"&gt;Database tools mysql-connector-odbc-5.1.5-win32. MySQL provides standards-based drivers for JDBC, ODBC, and .Net enabling developers to build database applications in their language of choice. In addition, a native C library allows developers to embed MySQL directly into their applications.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img4.uploadhouse.com/fileuploads/4649/4649314f8676593704293ed6f6c675582c9424f.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="153" src="http://img4.uploadhouse.com/fileuploads/4649/4649314f8676593704293ed6f6c675582c9424f.jpg" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://www.megaupload.com/?d=CRVMI0KA"&gt;Download mysql-connector-odbc-5.1.5-win32.msi&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-977597112916182438?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/977597112916182438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=977597112916182438&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/977597112916182438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/977597112916182438'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/database-tools-mysql-connector-odbc-515.html' title='Database tools mysql-connector-odbc-5.1.5-win32.'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8118642713815792263</id><published>2009-09-27T19:13:00.000-07:00</published><updated>2009-09-28T20:58:48.251-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code Sample'/><category scheme='http://www.blogger.com/atom/ns#' term='Download'/><category scheme='http://www.blogger.com/atom/ns#' term='Samples Projects'/><title type='text'>Download Source Code  Solitaire</title><content type='html'>Download Source Code Solitaire.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This example show how to drag a card across the screen and drop it on           its destination. The card sticks there if appropriate but           automatically walks back to its original location if not (like in solitaire)&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://www.megaupload.com/?d=SJRK88XB"&gt;Download here &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-8118642713815792263?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8118642713815792263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8118642713815792263&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8118642713815792263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8118642713815792263'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/download-source-code-solitaire.html' title='Download Source Code  Solitaire'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1962825716329111390</id><published>2009-09-26T23:23:00.000-07:00</published><updated>2009-09-26T23:23:30.304-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Move To The Next TextBox When Enter Pressed</title><content type='html'>&lt;span style="color: black;"&gt;'Add 2 TextBoxes to your form.&lt;br /&gt;'Insert the following code to your form:&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)&lt;br /&gt;&lt;/b&gt;  &lt;b&gt;If KeyCode = 13 Then Text2.SetFocus&lt;br /&gt;End Sub&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-1962825716329111390?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1962825716329111390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1962825716329111390&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1962825716329111390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1962825716329111390'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/tips-and-tricks-visual-basic-60-move-to.html' title='Tips and Tricks Visual Basic 6.0 Move To The Next TextBox When Enter Pressed'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3030448182700947300</id><published>2009-09-25T05:42:00.000-07:00</published><updated>2009-09-25T21:12:13.208-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Mark All Characters In TextBox</title><content type='html'>&lt;span style="color: black;"&gt;'Add 1 TextBox to your form (named Text1)&lt;br /&gt;'When the user will press on the TextBox, all the characters in the TextBox will be  marked.&lt;br /&gt;'Insert the following code to your form:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Private Sub Text1_GotFocus()&lt;br /&gt;Text1.SelStart = 0&lt;br /&gt;Text1.SelLength = Len(Text1)&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3030448182700947300?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3030448182700947300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3030448182700947300&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3030448182700947300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3030448182700947300'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/mark-all-characters-in-textbox.html' title='Tips and Tricks Visual Basic 6.0 Mark All Characters In TextBox'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8705645411249977087</id><published>2009-09-23T19:58:00.000-07:00</published><updated>2009-09-25T21:12:28.390-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Add A New Line To Existing Text Box Text</title><content type='html'>Add new text line to multiline text box through  code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="TipsHeadline" style="background-color: #3d85c6; color: white;"&gt;&lt;b&gt;Preparations&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Add 1  Command Button to your form (named Command1)&lt;br /&gt;&lt;br /&gt;&lt;div class="TipsHeadline" style="background-color: #3d85c6; color: white;"&gt;&lt;b&gt;Form Code&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;tt&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;Private  Sub &lt;/span&gt;   Command1_Click()&lt;br /&gt;&lt;span style="color: blue;"&gt;Dim  &lt;/span&gt;NewText &lt;span style="color: blue;"&gt;  As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; With&lt;/span&gt; Text1&lt;br /&gt;&lt;span style="color: green;"&gt;'replace&amp;nbsp;'My New Text' with the&amp;nbsp;Text you want to  add&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;NewText =    "My New  Text"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .SelStart =  Len(.Text)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .SelText =     vbNewLine  &amp;amp; NewText&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt; End With&lt;br /&gt;End Sub&lt;/span&gt; &lt;br /&gt;&lt;span style="color: blue;"&gt;Private Sub  &lt;/span&gt;  Form_Load()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  Text1.Text = "My Initial Text"&lt;br /&gt;&lt;span style="color: blue;"&gt;End Sub&lt;/span&gt; &lt;br /&gt;&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-8705645411249977087?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8705645411249977087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8705645411249977087&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8705645411249977087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8705645411249977087'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/add-new-line-to-existing-text-box-text.html' title='Tips and Tricks Visual Basic 6.0 Add A New Line To Existing Text Box Text'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4094807926086231227</id><published>2009-09-22T20:22:00.000-07:00</published><updated>2009-09-25T21:12:40.717-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Force The User To Enter Valid Value In Text Box</title><content type='html'>Using the Validate event,  you can assure that the user will enter valid value in the text box. "Valid  Value" can be anything you define: Phone Number, date, number in certain range,  certain strings, and so.&lt;br /&gt;Until he done so, all the other controls are  disabled, and he cannot exit the text box.&lt;br /&gt;In this example, the user will not  be able to exit the first Text Box, until he type "abc".&lt;br /&gt;To check this  code, try  to press the button or enter to the second text box.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #3d85c6; color: white;"&gt;&lt;b&gt;&amp;nbsp; Preparations&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Add 1 Command Button and  two Text Boxes to your form.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #3d85c6; color: white;"&gt;&lt;b&gt;&amp;nbsp; Form Code&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;Private Sub  Text1_Validate(Cancel As Boolean)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cancel =  Text1.Text &amp;lt;&amp;gt; "abc"&lt;br /&gt;End Sub&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4094807926086231227?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4094807926086231227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4094807926086231227&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4094807926086231227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4094807926086231227'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/force-user-to-enter-valid-value-in-text.html' title='Tips and Tricks Visual Basic 6.0 Force The User To Enter Valid Value In Text Box'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-543240529846756773</id><published>2009-09-17T22:59:00.000-07:00</published><updated>2009-09-25T21:12:53.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Undo The Last User Action In Text Box</title><content type='html'>&lt;span style="color: black;"&gt;Add 1 Text Box and 1 Command Button to your form.&lt;br /&gt;Press  the button to undo the last user action.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #0b5394; color: white;"&gt;&lt;b&gt;Module Code&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: black;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;tt&gt;Declare Function SendMessageBynum&amp;amp; Lib  "user32" Alias "SendMessageA" _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ByVal hwnd As Long, ByVal  wMsg As Long, ByVal wParam As Long, _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal lparam As  Long)&lt;br /&gt;Public Const EM_UNDO = &amp;amp;HC7&amp;amp;&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;div style="background-color: #0b5394; color: white;"&gt;&lt;span style="font-size: small;"&gt;&lt;tt&gt;&lt;b&gt;Form Code&lt;/b&gt;&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;tt&gt; P&lt;span style="font-size: small;"&gt;rivate Sub TextUndo(T As TextBox)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SendMessageBynum  T.hwnd, EM_UNDO, 0, 0&lt;br /&gt;End Sub&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;&lt;/span&gt; &lt;span style="color: green; font-size: small;"&gt;'replace the "Text1"  below with the name of the Text Box you want to &lt;br /&gt;'apply the Undo on  it.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;Call TextUndo(Text1)&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/tt&gt;&lt;tt&gt;&lt;b style="background-color: #0b5394; color: black;"&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp;&lt;/span&gt; &lt;/b&gt; &lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-543240529846756773?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/543240529846756773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=543240529846756773&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/543240529846756773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/543240529846756773'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/undo-last-user-action-in-text-box.html' title='Tips and Tricks Visual Basic 6.0 Undo The Last User Action In Text Box'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4334367833200269377</id><published>2009-09-17T22:55:00.001-07:00</published><updated>2009-09-25T21:13:11.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips and Tricks'/><title type='text'>Tips and Tricks Visual Basic 6.0 Set The Text Box Cursor Position</title><content type='html'>&lt;tt&gt;&lt;tt&gt;Private Sub Form_Load()&lt;br /&gt;&lt;span style="color: green;"&gt;' the  following line will place the cursor after the&lt;br /&gt;' 4th  character&lt;br /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text1.SelStart = 4&lt;br /&gt;End Sub&lt;/tt&gt;&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4334367833200269377?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4334367833200269377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4334367833200269377&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4334367833200269377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4334367833200269377'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/set-text-box-cursor-position.html' title='Tips and Tricks Visual Basic 6.0 Set The Text Box Cursor Position'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1246311356647901448</id><published>2009-09-15T23:40:00.000-07:00</published><updated>2009-09-22T20:25:51.729-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>How To Connection ADO Components</title><content type='html'>&lt;div style="text-align: justify;"&gt;After you install the &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;ADO&lt;/a&gt; components, it's time to learn how to connect a &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; with these components.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;For that follow the steps below: &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt; Select and click on the toolbox Adodc object, then draw the object on the form.&lt;/li&gt;&lt;li&gt;Select and right click Adodc object in the form, then the popup menu will appear. select it and click with the left mouse button ADODC Properties. Property pages dialog box will appear.&lt;/li&gt;&lt;li&gt;Click the Build button, the Data Link dialog box will be displayed properties. This dialog box contains a list of the connection provider. Select "&lt;i&gt;&lt;b&gt;Microsoft Jet 4.0 OLE DB Provider&lt;/b&gt;&lt;/i&gt;".&lt;/li&gt;&lt;li&gt;Then click the Next button or the Connection tab. In select or enter a database name: you just click the button (...), then point dialog box displayed select Access Database. In this box where you navigate a database stored position.&lt;/li&gt;&lt;li&gt;You can test whether the database is connected or not, that is by clicking the Test Connection button.&lt;/li&gt;&lt;li&gt; Then click Ok button, then click OK one more time. The next step is determine the use of Recordsource Database Nwind.mdb examples. Click Recordsource tab, select the Command Type &lt;i&gt;2-adCmdTable&lt;/i&gt;, and the Table or the stored procedure name select Customers, then click Ok.&lt;/li&gt;&lt;li&gt;Up here you have successfully created a database connection with controls Nwind ADO Objects.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-1246311356647901448?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1246311356647901448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1246311356647901448&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1246311356647901448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1246311356647901448'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/how-to-connection-ado-components.html' title='How To Connection ADO Components'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8093519036189250163</id><published>2009-09-11T22:05:00.000-07:00</published><updated>2009-09-11T22:11:53.121-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Insert ADO Data Control Component Into Your Project</title><content type='html'>&lt;div style="text-align: justify;"&gt;To use the &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;ADO Data Control&lt;/a&gt; first you have to install the ADO components to your project, follow the steps below:  &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; As a first step, select it and click the menu &lt;b&gt;Project&lt;/b&gt; | &lt;b&gt;Components&lt;/b&gt;, the components dialog box will appear. This way you will often do to add a component that is not in the standard toolbox.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh6.ggpht.com/_lzdaYtqTMFU/SqsrkhkgpSI/AAAAAAAAAG8/ZcBg87Shjys/s1600/Ado%20Component.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_lzdaYtqTMFU/SqsrkhkgpSI/AAAAAAAAAG8/ZcBg87Shjys/s320/Ado%20Component.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;On the Controls tab, move the &lt;b&gt;scrollbar down&lt;/b&gt;, locate and mark the check box on the &lt;b&gt;Microsoft ADO Data Control 6.0 (OLEDB)&lt;/b&gt;. This control is MSADODC.ocx&amp;nbsp; files contained in the location C: \ Windows \ System32.&lt;/li&gt;&lt;li&gt;Then click the Apply button, then an object or control Adodc name will be added in the toolbox boards, such as the following picture: &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh3.ggpht.com/_lzdaYtqTMFU/SqsrkotVXcI/AAAAAAAAAHA/h4LpXJEH7rM/s1600/Ado%20Component1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh3.ggpht.com/_lzdaYtqTMFU/SqsrkotVXcI/AAAAAAAAAHA/h4LpXJEH7rM/s320/Ado%20Component1.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-8093519036189250163?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8093519036189250163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8093519036189250163&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8093519036189250163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8093519036189250163'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/insert-ado-data-control-component-into.html' title='Insert ADO Data Control Component Into Your Project'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_lzdaYtqTMFU/SqsrkhkgpSI/AAAAAAAAAG8/ZcBg87Shjys/s72-c/Ado%20Component.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-631554197260943889</id><published>2009-09-09T22:24:00.000-07:00</published><updated>2009-09-09T22:27:20.252-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Know the ActiveX Data Objects (ADO)</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;&lt;b&gt;Microsoft ActiveX Data Objects&lt;/b&gt;&lt;/a&gt; (ADO) enables us to build a client /server application , that can access and manipulate data from a server to determine in advance its OLE DB. With ADO, which made the application program to communicate with &lt;b&gt;&lt;i&gt;Object Linking and Embeded Database (OLE DB)&lt;/i&gt;&lt;/b&gt; which memingkinkan we read and process the data directly without the need to convert it first.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In this article, you are expected to understand how to use ADO for database interfaces, whether sourced from the Jet Microsoft Access&amp;nbsp; engine and the SQL Server.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-631554197260943889?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/631554197260943889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=631554197260943889&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/631554197260943889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/631554197260943889'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html' title='Know the ActiveX Data Objects (ADO)'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-5346103953216336360</id><published>2009-09-08T22:48:00.000-07:00</published><updated>2009-09-08T22:48:49.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Non-ADO Problems Data Access Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;Control Data in &lt;a href="http://basicprograming.blogspot.com/2009/08/visual-basic-programing.html"&gt;Visual Basic 6.0&lt;/a&gt;, is basically designed for the Jet 3.51 database engine, the Microsoft Access 97. But now Microsoft Access database has been enhanced by the passing of Microsoft Access 2000 and XP with Jet 4.0 engine. Control data were not able to handle the connection r&lt;a href="http://basicprograming.blogspot.com/2009/09/relationship-of-visual-basic-with.html"&gt;elationship&lt;/a&gt; with the Jet 4.0 &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; engine or any other type.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh6.ggpht.com/_lzdaYtqTMFU/Sqc_bTb5ItI/AAAAAAAAAFc/BvNexuEfy48/s1600/DAO.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_lzdaYtqTMFU/Sqc_bTb5ItI/AAAAAAAAAFc/BvNexuEfy48/s320/DAO.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Error message will appear if you are using Data Control by setting the record source property window with the Jet 4.0 engine is as follows:&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh6.ggpht.com/_lzdaYtqTMFU/Sqc_bbQpKTI/AAAAAAAAAFg/qsek-GETKNM/s1600/Message.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_lzdaYtqTMFU/Sqc_bbQpKTI/AAAAAAAAAFg/qsek-GETKNM/s320/Message.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; The above error message appears because of differences in the database engine used. Microsoft Access 97 is made by using the Jet 3.51/3.6 database engine. While Microsoft Access 2000 uses Jet 4.0 database engine. Capabilities of the DAO, which is the standard data controls in Visual Basic, just to access the database engine with engine&amp;nbsp; Jet 3.51/3.6 not for Jet 4.0 engine.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-5346103953216336360?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/5346103953216336360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=5346103953216336360&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5346103953216336360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5346103953216336360'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/non-ado-problems-data-access-visual.html' title='Non-ADO Problems Data Access Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_lzdaYtqTMFU/Sqc_bTb5ItI/AAAAAAAAAFc/BvNexuEfy48/s72-c/DAO.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3562568676962162967</id><published>2009-09-07T17:00:00.000-07:00</published><updated>2009-09-09T22:28:41.097-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Relationship Of Visual Basic With Source Database (2)</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh6.ggpht.com/_lzdaYtqTMFU/SqWbUvACnFI/AAAAAAAAAFE/feMuwgW9bUo/s1600/Database%20Relationship.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_lzdaYtqTMFU/SqWbUvACnFI/AAAAAAAAAFE/feMuwgW9bUo/s400/Database%20Relationship.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;Microsoft ActiveX Data Objects &lt;/a&gt;(ADO) enables us to build a client application / server that can access and manipulate data from a server by first determining the OLE DB Provider him. In addition, &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;ADO&lt;/a&gt; support in making the Web-based applications. Its main advantage is easy to use, high speed and small memory usage. &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;ADO&lt;/a&gt; another specialty of the &lt;b&gt;Remote Data Service (RDS)&lt;/b&gt;, where you can move data from a server to a client application or Web page, &lt;a href="http://basicprograming.blogspot.com/2009/09/relationship-of-visual-basic-with.html"&gt;manipulate&lt;/a&gt; the data from the client and return it to the server.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;With ADO, which made the application program to communicate with &lt;b&gt;Object Linking and Embeded Database (OLE DB)&lt;/b&gt; that allows us to read and process the data directly without the need to convert it first. ADO is a &lt;b&gt;Component Object Model (COM)&lt;/b&gt; is an automated interface components that can be used in several programming languages including Microsoft Visual Basic 6.0, VBScript, JScript, Visual C + +, and Visual J + +. Most of the existing version of ADO separate from the Microsoft Data Access Components.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3562568676962162967?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3562568676962162967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3562568676962162967&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3562568676962162967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3562568676962162967'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/relationship-of-visual-basic-with_07.html' title='Relationship Of Visual Basic With Source Database (2)'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_lzdaYtqTMFU/SqWbUvACnFI/AAAAAAAAAFE/feMuwgW9bUo/s72-c/Database%20Relationship.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-5152193338330235651</id><published>2009-09-06T22:24:00.000-07:00</published><updated>2009-09-09T22:29:09.423-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Relationship Of Visual Basic With Source Database</title><content type='html'>&lt;div style="text-align: justify;"&gt;Microsoft Visual Basic 6.0 is one of the visual-based programming language is popular and sophisticated in the Windows environment. As a Software DBMS, we can design, create or build a &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; application programs and other programs. &lt;a href="http://basicprograming.blogspot.com/2009/08/visual-basic-programing.html"&gt;Microsoft Visual Basic 6.0&lt;/a&gt; is the development of Microsoft's previous versions of Visual Basic. Data access technology that is owned by the Visual Basic 6.0 &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;&lt;b&gt;ActiveX Data Object&lt;/b&gt;&lt;/a&gt; technology, better known by the name of the &lt;b&gt;ADO&lt;/b&gt;. &lt;a href="http://basicprograming.blogspot.com/2009/09/know-activex-data-objects-ado.html"&gt;ADO&lt;/a&gt; is Microsoft's latest technology to manipulate information from relational databases and non-relational. ADO able to integrate database applications you build with a variety of data sources such as Microsoft Access, SQL Server, ODBC, Oracle and other.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-5152193338330235651?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/5152193338330235651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=5152193338330235651&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5152193338330235651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5152193338330235651'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/relationship-of-visual-basic-with.html' title='Relationship Of Visual Basic With Source Database'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-281184796806971134</id><published>2009-09-04T22:20:00.001-07:00</published><updated>2009-09-09T22:30:27.262-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance Programming'/><title type='text'>Know Database In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;If we build a house, you need to design a direct result of the end of the house and determine the steps - steps of development. Without the design, development outcomes will not match the desired results. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Similarly, by creating a &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; application, you need a good design if you want a good end product. This is very important especially in making a &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; application.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Database itself is basically a collection of information, usually in a particular order. A common example is a database phone book. This book contains a collection of names, addresses, and phone number. However, the database you will use in this article is the &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; of the database presented in the form of tables consisting of fields and records. &lt;i&gt;&lt;b&gt;Filed&lt;/b&gt;&lt;/i&gt; is the smallest part of a record, usually presented in the form of columns. For example the &lt;a href="http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html"&gt;database&lt;/a&gt; name in the address book above. While the &lt;i&gt;&lt;b&gt;record&lt;/b&gt;&lt;/i&gt; is a collection of fields that are presented in the form of lines, such as name, address and phone number.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_lzdaYtqTMFU/SqH7i_tDBMI/AAAAAAAAACg/bfzFFSLujOg/s1600-h/Database.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_lzdaYtqTMFU/SqH7i_tDBMI/AAAAAAAAACg/bfzFFSLujOg/s320/Database.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;From the picture above, the information in the record to 4, namely: 4 Dinda Bandung 0226523212 &lt;br /&gt;While the information in the field names, namely: &lt;br /&gt;Fariz, Lomri, Dede, Dinda, Susi &lt;br /&gt;A table can be linked with other tables filed corresponding key, which is used to connect the information in one table with some other tables. This &lt;a href="http://basicprograming.blogspot.com/2009/09/relationship-of-visual-basic-with.html"&gt;relationship&lt;/a&gt; in a database known as the Relationship Table (Relationship Table).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-281184796806971134?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/281184796806971134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=281184796806971134&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/281184796806971134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/281184796806971134'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/know-database-in-visual-basic-60.html' title='Know Database In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_lzdaYtqTMFU/SqH7i_tDBMI/AAAAAAAAACg/bfzFFSLujOg/s72-c/Database.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2519778559295825687</id><published>2009-09-03T19:35:00.000-07:00</published><updated>2009-09-03T23:16:54.573-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Create Multiple Document Interface (MDI) Form In visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;The Multiple Document Interface (MDI) was designed to simplify the exchange of  information among documents, all under the same roof. With the main application,  you can maintain multiple open windows, but not multiple copies of the application.  Data exchange is easier when you can view and compare many documents simultaneously. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;You almost certainly use Windows applications that can open multiple documents  at the same time and allow the user to switch among them with a mouse-click. Multiple  Word is a typical example, although most people use it in single document mode.  Each document is displayed in its own window, and all document windows have the  same behavior. The main Form, or MDI Form, isn't duplicated, but it acts as a  container for all the windows, and it is called the parent window. The windows  in which the individual documents are displayed are called Child windows. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;An MDI application must have at least two Form, the parent Form and one or  more child Forms. Each of these Forms has certain properties. There can be many  child forms contained within the parent Form, but there can be only one parent  Form. &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The parent Form may not contain any controls. While the parent Form is open  in design mode, the icons on the ToolBox are not displayed, but you can't place  any controls on the Form. The parent Form can, and usually has its own menu.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; To create an MDI application, follow these steps:&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt; Start a new project and then choose Project &amp;gt;&amp;gt;&amp;gt; Add MDI Form to add  the parent Form.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Set the Form's caption to MDI Window&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Choose Project &amp;gt;&amp;gt;&amp;gt; Add Form to add a SDI Form.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Make this Form as child of MDI Form by setting the MDI Child property of the  SDI Form to True. Set the caption property to MDI Child window.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a class="down6" href="http://domains.googlesyndication.com/apps/domainpark/results.cgi?client=ca-afdo-pub-3366691112917527&amp;amp;url=http://freetutes.us/&amp;amp;hl=en&amp;amp;ac=r&amp;amp;q=Visual%20Basic&amp;amp;afdt=pnCHggu8yLUKEwiv7IP30--YAhUCWnoKHYNK1TwQAxgBIAIwx6f2DjgeUMen9g5Qy7qLD1DVrK8PUNq3tRFQquj_E1DfoK8pUP3IidUB" target="_blank"&gt;Visual  Basic&lt;/a&gt; automatically associates this new Form with the parent Form. This child  Form can't exist outside the parent Form; in the words, it can only be opened  within the parent Form.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img height="202" src="http://visualbasic.freetutes.com/learn-vb6/images/MDI.JPG" width="392" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Parent and Child Menus&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;MDI Form cannot contain objects other than child Forms, but MDI Forms can have  their own menus. However, because most of the operations of the application have  meaning only if there is at least one child Form open, there's a peculiarity about  the MDI Forms. The MDI Form usually has a menu with two commands to load a new  child Form and to quit the application. The child Form can have any number of  commands in its menu, according to the application. When the child Form is loaded,  the child Form's menu replaces the original menu on the MDI Form&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Following example illustrates the above explanation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;* Open a new Project and name the Form as Menu.frm and save the Project as  Menu.vbp&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;* Design a menu that has the following structure.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;lt;&amp;gt; MDIMenu Menu caption&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;MDIOpen opens a new child Form&lt;/li&gt;&lt;li&gt;MDIExit terminates the application &lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;* Then design the following menu for the child Form&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;lt;&amp;gt; ChildMenu Menu caption&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;  Child Open opens a new child Form&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Child Save saves the document in the active child Form&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Child Close Closes the active child Form&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;At design time double click on MDI Open and add the following code in the click  event of the open menu.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;Form1.Show&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;And so double click on MDI Exit and add the following code in the click event&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;End&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Double click on Child Close and enter the following code in the click event&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="text2" style="text-align: justify;"&gt;Unload Me&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Before run the application in the project properties set MDI Form as the start-up  Form. Save and run the application. Following output will be displayed.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img height="144" src="http://visualbasic.freetutes.com/learn-vb6/images/MDI2.JPG" width="243" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;And as soon as you click MDI Open you can notice that the main menu of the  MDI Form is replaced with the Menu of the Child Form. The reason for this behavior  should be obvious. The operation available through the MDI Form are quite different  from the operations of the child window. Moreover, each child Form shouldn't have  it's own menu. &lt;b&gt;&lt;a href="http://www.ziddu.com/download/6348317/mdi.zip.html"&gt;( &lt;i&gt;Download the source code&lt;/i&gt; )&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2519778559295825687?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2519778559295825687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2519778559295825687&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2519778559295825687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2519778559295825687'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/create-multiple-document-interface-mdi.html' title='Create Multiple Document Interface (MDI) Form In visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-6836990801364352753</id><published>2009-09-02T22:51:00.000-07:00</published><updated>2009-09-03T23:16:54.573-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Menus In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;Visual  Basic provides an easy way to create menus with the modal Menu Editor dialog.  The below dialog is displayed when the Menu Editor is selected in the Tool Menu.  The Menu Editor command is grayed unless the form is visible. And also you can  display the Menu Editor window by right clicking on the Form and selecting Menu  Editor. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Basically, each menu item has a &lt;b&gt;Caption&lt;/b&gt; property (possibly  with an embedded &amp;amp; character to create an access key) and a &lt;b&gt;Name&lt;/b&gt;.  Each item also exposes three Boolean properties, Enabled, Visible, and Checked,  which you can set both at design time and at run time. At design time, you can  assign the menu item a shortcut key so that your end users don't have to go through  the menu system each time they want to execute a frequent command. (Do you really  like pulling down the Edit menu any time you need to clear some text or copy it  to the Clipboard?) The assigned shortcut key can't be queried at run time, much  less modified.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Building a menu is a simple, albeit more tedious, job: You enter the item's  Caption and Name, set other properties (or accept the default values for those  properties), and press Enter to move to the next item. When you want to create  a submenu, you press the Right Arrow button (or the Alt+R hot key). When you want  to return to work on top-level menus—those items that appear in the menu  bar when the application runs—you click the Left Arrow button (or press  Alt+L). You can move items up and down in the hierarchy by clicking the corresponding  buttons or the hot keys Alt+U and Alt+B, respectively.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can create up to five levels of submenus (six including the menu bar),  which are too many even for the most patient user. If you find yourself working  with more than three menu levels, think about trashing your specifications and  redesigning your application from the ground up.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can insert a separator bar using the hypen (-) character for the Caption  property. But even these separator items must be assigned a unique value for the  Name property, which is a real nuisance. If you forget to enter a menu item's  Name, the Menu Editor complains when you decide to close it. The convention used  in this book is that all menu names begin with the three letters mnu.&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;An expanded Menu Editor window.&lt;/b&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;img height="278" src="http://visualbasic.freetutes.com/learn-vb6/images/M003.JPG" width="437" /&gt;&lt;/div&gt;&lt;b&gt;An expanded menu&lt;/b&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;img alt="An expanded menu" height="140" src="http://visualbasic.freetutes.com/learn-vb6/images/M002.JPG" width="370" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;One of the most annoying defects of the Menu Editor tool is that it doesn't  permit you to reuse the menus you have already written in other applications.  It would be great if you could open another instance of the Visual Basic IDE,  copy one or more menu items to the clipboard, and then paste those menu items  in the application under development. You can do that with controls and with pieces  of code, but not with menus! The best thing you can do in Visual Basic is load  the FRM file using an editor such as Notepad, find the portion in the file that  corresponds to the menu you're interested in, load the FRM file you're developing  (still in Notepad), and paste the code there. This isn't the easiest operation,  and it's also moderately dangerous: If you paste the menu definition in the wrong  place, you could make your FRM form completely unreadable. Therefore, always remember  to make backup copies of your forms before trying this operation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Better news is that you can add a finished menu to a form in your application  with just a few mouse clicks. All you have to do is activate the Add-In Manager  from the Add-Ins menu, choose the VB 6 Template Manager, and tick the Loaded/Unloaded  check box. After you do that, you'll find three new commands in the Tools menu:  Add Code Snippet, Add Menu, and Add Control Set. Visual Basic 6 comes with a few  menu templates, as you can see in the following figure, that you might find useful  as a starting point for building your own templates. To create your menu templates,  you only have to create a form with the complete menu and all the related code  and then store this form in the \Templates\Menus directory. (The complete path,  typically c:\Program Files\Microsoft Visual Studio\VB98\Template, can be found  in the Environment tab of the Options dialog box on the Tools menu. The Template  Manager was already available with Visual Basic 5, but it had to be installed  manually and relatively few programmers were aware of its existence.&lt;/div&gt;&lt;img alt="The Template Manager in action" height="233" src="http://visualbasic.freetutes.com/learn-vb6/images/vb-menu-template-manager.gif" width="350" /&gt;&lt;br /&gt;&lt;i&gt;The Template Manager in action&lt;/i&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The programmer can create menu control arrays. The Index TextBox specifies  the menu's index in the control array.&lt;/div&gt;The Menu Editor dialog also provides several CheckBoxes to control the appearance  of the Menu.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Checked&lt;/b&gt;&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;: This is unchecked by default and allows the  programmer the option of creating a checked menu item( a menu item that act as  a toggle and displays a check mark when selected. The following is a Check Menu  items. &lt;/div&gt;&lt;img height="117" src="http://visualbasic.freetutes.com/learn-vb6/images/M001.JPG" width="143" /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Enabled&lt;/b&gt; : specifies whether a menu is disabled or not. If you see a  disabled command in a menu that means that feature is not available. The Visible  checkbox specifies whether the menu is visible or not.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;To add commands to the Form's menu bar, enter a caption and a name for each  command. As soon as you start typing the command's caption, it also appears in  a new line in the list at the bottom of the Menu Editor window. To add more commands  click Enter and type the Caption and the Name.&lt;/div&gt;&lt;h2 align="left"&gt;Creating Menus&lt;/h2&gt;Open a new Project and save the form as menu.frm and save the project as menu.vbp.&lt;br /&gt;Choose &lt;b&gt;Tools ››› Menu Editor &lt;/b&gt;and type the menu items  as shown below.&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td class="text" width="34%"&gt;&lt;div align="center"&gt;&lt;b&gt;&lt;i&gt;Caption&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td class="text" width="66%"&gt;&lt;div align="center"&gt;&lt;i&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;File&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuFile&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt; Open&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuOpen&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Save&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuSave&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Exit&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuExit&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Edit&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuEdit&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Copy&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuCopy&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Cut&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuCut&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="34%"&gt;&lt;b&gt;Paste&lt;/b&gt;&lt;/td&gt; &lt;td width="66%"&gt;mnuPaste&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img height="294" src="http://visualbasic.freetutes.com/learn-vb6/images/M004.JPG" width="292" /&gt;&lt;br /&gt;&lt;div align="left"&gt;Run the application by pressing F5. You can see that you can select  a menu.&lt;b&gt;&lt;a href="http://visualbasic.freetutes.com/learn-vb6/images/menu.zip"&gt;&lt;i&gt; &lt;/i&gt;&lt;/a&gt;&lt;a href="http://www.ziddu.com/download/6335361/menu.zip.html"&gt;(Download the source code)&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-6836990801364352753?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/6836990801364352753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=6836990801364352753&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6836990801364352753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6836990801364352753'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/menus-in-visual-basic-60.html' title='Menus In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2588393756159892129</id><published>2009-09-02T00:46:00.000-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Know Form In Visual Basic 6.0</title><content type='html'>&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;The Appearance of Forms&lt;/span&gt;&lt;/h2&gt;&lt;div align="justify" style="float: right;"&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The main characteristic of a Form is the title bar on which the Form's caption  is displayed. On the left end of the title bar is the Control Menu icon. Clicking  this icon opens the Control Menu. Maximize, Minimize and Close buttons can be  found on the right side of the Form. Clicking on these buttons performs the associated  function.  &lt;/div&gt;The following figure illustrates the appearance of a Form&lt;br /&gt;&lt;img height="211" src="http://visualbasic.freetutes.com/learn-vb6/images/F0001.JPG" width="352" /&gt;&lt;br /&gt;The control menu contains the following commands :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  &lt;b&gt;Restore &lt;/b&gt;: Restores a maximized Form to the size it was before it was  maximized; available only if the Form has been maximized.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Move&lt;/b&gt; : Lets the user moves the Form around with the mouse&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Size &lt;/b&gt;: Lets the user resizes the control with the mouse&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Minimize&lt;/b&gt;: Minimizes the Form&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Maximize&lt;/b&gt; : Maximizes the Form&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  &lt;b&gt;Close&lt;/b&gt; : Closes the Form&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 align="left" style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Setting the Start-Up Form&lt;/span&gt;&lt;/h2&gt;A typical application has more than a single Form. When an application runs  the main Form is loaded. By setting the Project properties you can control which  Form is to be displayed in the Start-Up of the application. Following figure illustrates  the Project property window.&lt;br /&gt;&lt;img height="156" src="http://visualbasic.freetutes.com/learn-vb6/images/F0003.JPG" width="257" /&gt;&lt;br /&gt;By default, &lt;a class="down6" href="http://domains.googlesyndication.com/apps/domainpark/results.cgi?client=ca-afdo-pub-3366691112917527&amp;amp;url=http://freetutes.us/&amp;amp;hl=en&amp;amp;ac=r&amp;amp;q=Visual%20Basic&amp;amp;afdt=pnCHggu8yLUKEwiv7IP30--YAhUCWnoKHYNK1TwQAxgBIAIwx6f2DjgeUMen9g5Qy7qLD1DVrK8PUNq3tRFQquj_E1DfoK8pUP3IidUB" target="_blank"&gt;Visual  Basic&lt;/a&gt; suggests the name of the first Form created when the project started.&lt;br /&gt;&lt;br /&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Loading and Unloading Forms&lt;/span&gt;&lt;/h2&gt;In order to load and unload the forms, Load and Unload statements are used.  The Load statement has the following syntax :&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Load FormName&lt;/div&gt;And the Unload statement has the following syntax :&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Unload FormName&lt;/div&gt;The FormName variable is the name of the Form to be loaded or unloaded. Unlike  the Show method which cares of both loading and displaying the Form, the load  statement doesn't show the Form. You have to call the Form's Show method to display  it on the desktop.&lt;br /&gt;&lt;br /&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Showing and Hiding Forms&lt;/span&gt;&lt;/h2&gt;Show method is used to Show a Form. If the Form is loaded but invisible, the  Show method is used to bring the Form on Top every other window. If the Form is  not loaded, the Show method loads it and then displays it. &lt;br /&gt;Syntax of the Show method of the Form&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FormName.Show mode&lt;/div&gt;The FormName variable is the Form's name&lt;b&gt;, &lt;/b&gt;and the optional argument  mode determines whether the Form will be Modal or not. It can have one of the  following syntax : &lt;b&gt;&lt;br /&gt;&lt;br /&gt;* &lt;/b&gt;0-Modeless (default)&lt;br /&gt;&lt;div class="text2"&gt;* 1-Modal&lt;/div&gt;Modeless Forms are the normal Forms. Modeless Forms interact with the user  and the user allowed to switch to any other Form of the application. If you do  not specify the optional mode argument, by default the mode is set to modeless.  &lt;br /&gt;The Modal Forms takes the total control of the application where user cannot  switch to any other Forms in the application unless the Form is closed. A modal  Form, thus, must have a Close button or some means to close the Form in order  to return to the Form where the Modal Form was loaded.&lt;br /&gt;&lt;br /&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Hiding Forms&lt;/span&gt;&lt;/h2&gt;The Hide method is used to hide a Form. The following is the syntax of the  Hide Method.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FormName.Hide&lt;/div&gt;To hide a Form from within its own code, the following code can be used. &lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Me.Hide&lt;/div&gt;You must understand that the Forms that are hidden are not unloaded ; they  remains in the memory and can be displayed instantly with the Show Method. When  a Form is hidden, you can still access its properties and code. For instance,  you can change the settings of its Control Properties or call any Public functions  in the Form.&lt;br /&gt;The following is an example illustrates the Show method and Mode statement  &lt;br /&gt;* Open a new Project and save the Project&lt;br /&gt;Design the application as shown below&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr class="text"&gt;  &lt;td width="24%"&gt;&lt;div align="center"&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="39%"&gt;&lt;div align="center"&gt;&lt;b&gt;Property &lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="37%"&gt;&lt;div align="center"&gt;&lt;b&gt;Setting&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Form&lt;/b&gt;&lt;/td&gt; &lt;td width="39%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="37%"&gt;Form1&lt;br /&gt;frm1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Form&lt;/b&gt;&lt;/td&gt; &lt;td width="39%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="37%"&gt;Form2&lt;br /&gt;frm2&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Form&lt;/b&gt;&lt;/td&gt; &lt;td width="39%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="37%"&gt;Form3&lt;br /&gt;frm3&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Label&lt;/b&gt;&lt;/td&gt; &lt;td width="39%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="37%"&gt;Click on a button to display a Form&lt;br /&gt;Label1&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img height="156" src="http://visualbasic.freetutes.com/learn-vb6/images/F0003.JPG" width="257" /&gt;&lt;br /&gt;The following code is typed in the Click event of the command buttons&lt;br /&gt;&lt;img height="153" src="http://visualbasic.freetutes.com/learn-vb6/images/F0004.JPG" width="311" /&gt;&lt;br /&gt;Run the application. Clicking on the buttons will display the Forms respectively.  But you can see that in the cmd2_Click( ) event additionally VbModal argument  has been added. You can see the difference after you display the forms by clicking  on the command buttons. You can notice that you cannot switch to any other Forms  in the application unless you close the Form3.&lt;br /&gt;&lt;br /&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Finding out the difference between Unload and Hide method&lt;/span&gt;&lt;/h2&gt;To know what the difference is between Unload and Hide methods we will do an  example. Open a new project and save the project. Draw two buttons on the form  and name those as shown above.&lt;br /&gt;&lt;img height="167" src="http://visualbasic.freetutes.com/learn-vb6/images/F0005.JPG" width="225" /&gt;&lt;br /&gt;In the click event of the Hide button Following code is entered.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Me.Hide&lt;/div&gt;In the click event of the Unload button following code is entered.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Unload Me&lt;/div&gt;Save the project and run the application. Once you click on Hide button you  can note that the Form is invisible but the application is still running. But  when you click on Unload button you can see that the application is terminated.  &lt;a href="http://www.ziddu.com/download/6335407/forms.zip.html"&gt;&lt;b&gt;(Download  the source code)&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2588393756159892129?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2588393756159892129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2588393756159892129&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2588393756159892129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2588393756159892129'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/know-form-in-visual-basic-60.html' title='Know Form In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2967659807416004231</id><published>2009-09-01T00:29:00.000-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Combobox and Listbox Control In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;ListBox and ComboBox controls present a set of choices that are displayed vertically  in a column. If the number of items exceed the value that be displayed, scroll  bars will automatically appear on the control. These scroll bars can be scrolled  up and down or left to right through the list. &lt;/div&gt;The following Fig lists some of the common &lt;b&gt;ComboBox&lt;/b&gt; properties and methods.&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr bgcolor="#eeeeee"&gt;  &lt;td width="24%"&gt; &lt;div align="center"&gt;&lt;b&gt;Property/Method&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="76%"&gt; &lt;div align="center"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td colspan="2"&gt; &lt;b&gt; Properties &lt;br /&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Enabled&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;By setting this property to True or False user can decide whether  user can interact with this control or not&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Index&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Specifies the Control array index&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;List&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;String array. Contains the strings displayed in the drop-down  list. Starting array index is 0.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;ListCount&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Integer. Contains the number of drop-down list items&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" height="30" width="24%"&gt;&lt;b&gt;ListIndex&lt;/b&gt;&lt;/td&gt; &lt;td height="30" width="76%"&gt;Integer. Contains the index of the selected ComboBox  item. If an item is not selected, ListIndex is -1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Locked&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Boolean. Specifies whether user can type or not in the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;MousePointer&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Integer. Specifies the shape of the mouse pointer when over the  area of the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;NewIndex&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Integer. Index of the last item added to the ComboBox. If the  ComboBox does not contain any items , NewIndex is -1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Sorted&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Boolean. Specifies whether the ComboBox's items are sorted or  not.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Style&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Integer. Specifies the style of the ComboBox's appearance&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;TabStop&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Boolean. Specifies whether ComboBox receives the focus or not.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Text&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;String. Specifies the selected item in the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;ToolTipIndex&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;String. Specifies what text is displayed as the ComboBox's tool  tip&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="24%"&gt;&lt;b&gt;Visible&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Boolean. Specifies whether ComboBox is visible or not at run time&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td colspan="2"&gt; &lt;b&gt; Methods&lt;/b&gt;&amp;nbsp; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;AddItem&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Add an item to the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Clear&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Removes all items from the ComboBox &lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;RemoveItem&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Removes the specified item from the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;SetFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Transfers focus to the ComboBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td colspan="2"&gt;  &lt;b&gt;Event Procedures &lt;br /&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;Change&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Called when text in ComboBox is changed&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;DropDown&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Called when the ComboBox drop-down list is displayed&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td height="20" width="24%"&gt;&lt;b&gt;GotFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Called when ComboBox receives the focus&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="24%"&gt;&lt;b&gt;LostFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="76%"&gt;Called when ComboBox loses it focus&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Adding items to a List&lt;/span&gt;&lt;/h2&gt;It is possible to populate the list at design time or run time&lt;br /&gt;&lt;b&gt;Design Time&lt;/b&gt; : To add items to a list at design time, click on List property  in the property box and then add the items. Press CTRL+ENTER after adding each  item as shown below.&lt;br /&gt;&lt;div align="left"&gt;&lt;img height="114" src="http://visualbasic.freetutes.com/learn-vb6/images/005.JPG" width="152" /&gt;&lt;/div&gt;&lt;b&gt;Run Time : &lt;/b&gt;The AddItem method is used to add items to a list at run  time. The AddItem method uses the following syntax.&lt;br /&gt;&lt;div class="text2"&gt;Object.AddItemitem, Index&lt;/div&gt;The&lt;i&gt; &lt;b&gt;item&lt;/b&gt;&lt;/i&gt; argument is a string that represents the text to add  to the list&lt;br /&gt;The&lt;i&gt; &lt;b&gt;index&lt;/b&gt; &lt;/i&gt;argument is an integer that indicates where in the  list to add the new item. Not giving the index is not a problem, because by default  the index is assigned. &lt;br /&gt;Following is an example to add item to a combo box. The code is typed in the  Form_Load event&lt;br /&gt;&lt;div align="left" class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Form_Load()&lt;/div&gt;&lt;div align="left" class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Combo1.AddItem 1&lt;br /&gt;Combo1.AddItem 2&lt;br /&gt;Combo1.AddItem 3&lt;br /&gt;Combo1.AddItem 4&lt;br /&gt;Combo1.AddItem 5&lt;br /&gt;Combo1.AddItem 6&lt;/div&gt;&lt;div align="left" class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Sub&lt;/div&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Removing Items from a List &lt;/span&gt;&lt;/h2&gt;The RemoveItem method is used to remove an item from a list. The syntax for  this is given below.&lt;br /&gt;&lt;div class="text2"&gt;Object.RemoveItem index&lt;/div&gt;The following code verifies that an item is selected in the list and then removes  the selected item from the list.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdRemove_Click()&lt;br /&gt;If List1.ListIndex &amp;gt; -1 Then&lt;br /&gt;List1.RemoveItem List1. ListIndex&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;/div&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Sorting the List&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;The Sorted property is set to True to enable a list to appear in alphanumeric  order and False to display the list items in the order which they are added to  the list.&lt;/div&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Using the ComboBox&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;A ComboBox combines the features of a TextBox and a ListBox. This enables the  user to select either by typing text into the ComboBox or by selecting an item  from the list. There are three types of ComboBox styles that are represented as  shown below.&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td height="85" width="33%"&gt; &lt;img height="81" src="http://visualbasic.freetutes.com/learn-vb6/images/008.JPG" width="86" /&gt;&lt;br /&gt;Dropdown combo&lt;/td&gt; &lt;td height="85" width="29%"&gt; &lt;img height="23" src="http://visualbasic.freetutes.com/learn-vb6/images/009.JPG" width="86" /&gt;&lt;br /&gt;&lt;br /&gt;Simple combo&lt;/td&gt; &lt;td height="85" width="38%"&gt; &lt;img height="78" src="http://visualbasic.freetutes.com/learn-vb6/images/010.JPG" width="86" /&gt;&lt;br /&gt;Dropdown list&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul&gt;&lt;li&gt;  Dropdown Combo (style 0)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Simple Combo (style 1)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Dropdown List (style 2)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;The Simple Combo box displays an edit area with an attached list box always  visible immediately below the edit area. A simple combo box displays the contents  of its list all the time. The user can select an item from the list or type an  item in the edit box portion of the combo box. A scroll bar is displayed beside  the list if there are too many items to be displayed in the list box area.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The Dropdown Combo box first appears as only an edit area with a down arrow  button at the right. The list portion stays hidden until the user clicks the down-arrow  button to drop down the list portion. The user can either select a value from  the list or type a value in the edit area. &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The Dropdown list combo box turns the combo box into a Dropdown list box. At  run time , the control looks like the Dropdown combo box. The user could click  the down arrow to view the list. The difference between Dropdown combo &amp;amp; Dropdown  list combo is that the edit area in the Dropdown list combo is disabled. The user  can only select an item and cannot type anything in the edit area. Anyway this  area displays the selected item. &lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;Example &lt;/b&gt;&lt;/div&gt;This example is to Add , Remove, Clear the list of items and finally close  the application. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;  Open a new Standard EXE project is opened an named the Form as Listbox.frm  and save the project as Listbox.vbp&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Design the application as shown below.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td&gt; &lt;div align="center"&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt; &lt;div align="center"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt; &lt;div align="center"&gt;&lt;b&gt;Settings&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;Form&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; ListBox&lt;br /&gt;frmListBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;TextBox &lt;/b&gt;&lt;/td&gt; &lt;td&gt; Text&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; (empty)&lt;br /&gt;txtName&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;Label&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Enter a name&lt;br /&gt;lblName&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;ListBox&lt;/b&gt;&lt;/td&gt; &lt;td&gt;Name&lt;/td&gt; &lt;td&gt;lstName&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;Label&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Amount Entered&lt;br /&gt;lblAmount&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;Label&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;br /&gt;Border Style&lt;/td&gt; &lt;td&gt; (empty)&lt;br /&gt;lblDisplay&lt;br /&gt;1 Fixed Single&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Add&lt;br /&gt;cmdAdd&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Remove&lt;br /&gt;cmdRemove&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Clear&lt;br /&gt;cmdClear&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;/td&gt; &lt;td&gt; Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td&gt; Exit&lt;br /&gt;cmdExit&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div align="left"&gt;&lt;img height="192" src="http://visualbasic.freetutes.com/learn-vb6/images/011.JPG" width="258" /&gt;&lt;/div&gt;The following event procedures are entered for the TextBox and CommandButton  controls.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub txtName_Change()&lt;br /&gt;If (Len(txtName.Text) &amp;gt; 0) Then 'Enabling the Add button&lt;br /&gt;'if atleast one character&lt;br /&gt;'is entered&lt;br /&gt;cmdAdd.Enabled = True&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;/div&gt;&lt;div align="left" class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdAdd_Click()&lt;br /&gt;lstName.AddItem txtName.Text 'Add the entered the characters to the list box&lt;br /&gt;&lt;br /&gt;txtName.Text = "" 'Clearing the text box&lt;br /&gt;&lt;br /&gt;txtName.SetFocus 'Get the focus back to the&lt;br /&gt;'text box&lt;br /&gt;&lt;br /&gt;lblDisplay.Caption = lstName.ListCount 'Display the number of items in the list  box&lt;br /&gt;&lt;br /&gt;cmdAdd.Enabled = False ' Disabling the Add button&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Sub&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The click event of the Add button adds the text to the list box  that was typed in the Text box. Then the text box is cleared and the focus is  got to the text box. The number of entered values will is increased according  to the number of items added to the listbox. &lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdClear_Click()&lt;br /&gt;lstName.Clear&lt;br /&gt;lblDisplay.Caption = lstName.ListCount&lt;br /&gt;End Sub&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdExit_Click()&lt;br /&gt;Unload Me&lt;br /&gt;End Sub&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdRemove_Click()&lt;br /&gt;Dim remove As Integer&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;remove = lstName.ListIndex 'Getting the index&lt;/div&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;If remove &amp;gt;= 0 Then 'make sure an item is selected&lt;/span&gt;&lt;br /&gt;'in the list box&lt;/div&gt;&lt;div class="text2"&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;lstName.RemoveItem remove 'Remove item from the list box&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt; &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;lblDisplay.Caption = lstName.ListCount&lt;/span&gt; 'Display the number of items&lt;br /&gt;'in the listbox&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End If&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Sub&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Remove button removes the selected item from the list as soon as you pressed  the Remove button. The number of items is decreased in the listbox and the value  is displayed in the label.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The code for the clear button clears the listbox when you press it. And the  number of items shown in the label becomes 0.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2967659807416004231?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2967659807416004231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2967659807416004231&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2967659807416004231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2967659807416004231'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/09/combobox-and-listbox-control-in-visual.html' title='Combobox and Listbox Control In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-2141593063039886673</id><published>2009-08-31T00:22:00.000-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Timer Control In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;A Timer control is invisible at run time, and its purpose is to send a periodic  pulse to the current application. You can trap this pulse by writing code in the  Timer's Timer event procedure and take advantage of it to execute a task in the  background or to monitor a user's actions. This control exposes only two meaningful  properties: Interval and Enabled. Interval stands for the number of milliseconds  between subsequent pulses (Timer events), while Enabled lets you activate or deactivate  events. When you place the Timer control on a form, its Interval is 0, which means  no events. Therefore, remember to set this property to a suitable value in the  Properties window or in the Form_Load event procedure:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Form_Load()&lt;br /&gt;Timer1.Interval = 500 ' Fire two Timer events per second.&lt;br /&gt;End Sub&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Timer controls let you write interesting programs with just a few lines of  code. The typical (and abused) example is a digital clock. Just to make things  a bit more compelling, I added flashing colons:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Timer1_Timer()&lt;br /&gt;Dim strTime As String&lt;br /&gt;strTime = Time$&lt;br /&gt;If Mid$(lblClock.Caption, 3, 1) = ":" Then&lt;br /&gt;Mid$(strTime, 3, 1)= " "&lt;br /&gt;Mid$(strTime, 6, 1) = " "&lt;br /&gt;End If&lt;br /&gt;lblClock.Caption = strTime&lt;br /&gt;End Sub&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You must be careful not to write a lot of code in the Timer event procedure  because this code will be executed at every pulse and therefore can easily degrade  your application's performance. Just as important, never execute a DoEvents statement  inside a Timer event procedure because you might cause the procedure to be reentered,  especially if the Interval property is set to a small value and there's a lot  of code inside the procedure.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Timer controls are often useful for updating status information on a regular  basis. For example, you might want to display on a status bar a short description  of the control that currently has the input focus. You can achieve that by writing  some code in the GotFocus event for all the controls on the form, but when you  have dozens of controls this will require a lot of code (and time). Instead, at  design time load a short description for each control in its Tag property, and  then place a Timer control on the form with an Interval setting of 500. This isn't  a time-critical task, so you can use an even larger value. Finally add two lines  of code to the control's Timer event:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Timer1_Timer()&lt;br /&gt;On Error Resume Next&lt;br /&gt;lblStatusBar.Caption = ActiveControl.Tag&lt;br /&gt;End Sub&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-2141593063039886673?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/2141593063039886673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=2141593063039886673&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2141593063039886673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/2141593063039886673'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/timer-control-in-visual-basic-60.html' title='Timer Control In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4715122345481240295</id><published>2009-08-29T17:26:00.001-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Picture Box Control In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;PictureBox controls are among the most powerful and complex items in the Visual  Basic Toolbox window. In a sense, these controls are more similar to forms than  to other controls. For example, PictureBox controls support all the properties  related to graphic output, including AutoRedraw, ClipControls, HasDC, FontTransparent,  CurrentX, CurrentY, and all the Drawxxxx, Fillxxxx, and Scalexxxx properties.  PictureBox controls also support all graphic methods, such as Cls, PSet, Point,  Line, and Circle and conversion methods, such as ScaleX, ScaleY, TextWidth, and  TextHeight. In other words, all the techniques that I described for forms can  also be used for PictureBox controls (and therefore won't be covered again in  this section).&lt;/div&gt;&lt;h3 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Loading images&lt;/span&gt;&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;Once you place a PictureBox on a form, you might want to load an image in it,  which you do by setting the Picture property in the Properties window. You can  load images in many different graphic formats, including bitmaps (BMP), device  independent bitmaps (DIB), metafiles (WMF), enhanced metafiles (EMF), GIF and  JPEG compressed files, and icons (ICO and CUR). You can decide whether a control  should display a border, resetting the BorderStyle to 0-None if necessary. Another  property that comes handy in this phase is AutoSize: Set it to True and let the  control automatically resize itself to fit the assigned image.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You might want to set the Align property of a PictureBox control to something  other than the 0-None value. By doing that, you attach the control to one of the  four form borders and have Visual Basic automatically move and resize the PictureBox  control when the form is resized. PictureBox controls expose a Resize event, so  you can trap it if you need to move and resize its child controls too.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can do more interesting things at run time. To begin with, you can programmatically  load any image in the control using the LoadPicture function:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Picture1.Picture = LoadPicture("c:\windows\setup.bmp")&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;and you can clear the current image using either one of the following statements:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' These are equivalent.&lt;br /&gt;Picture1.Picture = LoadPicture("")&lt;br /&gt;Set Picture1.Picture = Nothing&lt;/div&gt;The LoadPicture function has been extended in Visual Basic 6 to support icon  files containing multiple icons. The new syntax is the following:&lt;br /&gt;&lt;div class="text2"&gt;LoadPicture(filename, [size], [colordepth], [x], [y])&lt;/div&gt;&lt;div style="text-align: justify;"&gt;where values in square brackets are optional. If filename is an icon file,  you can select a particular icon using the size or colordepth arguments. Valid  sizes are 0-vbLPSmall, 1-vbLPLarge (system icons whose sizes depend on the video  driver), 2-vbLPSmallShell, 3-vbLPLargeShell (shell icons whose dimensions are  affected by the Caption Button property as set in the Appearance tab in the screen's  Properties dialog box), and 4-vbLPCustom (size is determined by x and y). Valid  color depths are 0-vbLPDefault (the icon in the file that best matches current  screen settings), 1-vbLPMonochrome, 2-vbLPVGAColor (16 colors), and 3-vbLPColor  (256 colors).&lt;/div&gt;You can copy an image from one PictureBox control to another by assigning the  target control's Picture property:&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Picture2.Picture = Picture1.Picture&lt;/div&gt;&lt;h3 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;The PaintPicture method&lt;/span&gt;&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;PictureBox controls are equipped with a very powerful method that enables the  programmer to perform a wide variety of graphic effects, including zooming, scrolling,  panning, tiling, flipping, and many fading effects: This is the PaintPicture method.  (This method is also exposed by form objects, but it's most often used with PictureBox  controls.) In a nutshell, this method performs a pixel-by-pixel copy from a source  control to a destination control. The complete syntax of this method is complex  and rather confusing:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DestPictBox.PaintPicture SrcPictBox.Picture, destX, destY, [destWidth], _&lt;br /&gt;[destHeight], [srcX], [srcY2], [srcWidth], [srcHeight], [Opcode])&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The only required arguments are the source PictureBox control's Picture property  and the coordinates inside the destination control where the image must be copied.  The destX / destY arguments are expressed in the ScaleMode of the destination  control; by varying them, you can make the image appear exactly where you want.  For example, if the source PictureBox control contains a bitmap 3000 twips wide  and 2000 twips tall, you can center this image on the destination control with  this command:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;picDest.PaintPicture picSource.Picture, (picDest.ScaleWidth - 3000) / 2, _&lt;br /&gt;(picDest.ScaleHeight - 2000) / 2&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In general, Visual Basic doesn't provide a way to determine the size of a bitmap  loaded into a PictureBox control. But you can derive this information if you set  the control's AutoSize property to True and then read the control's ScaleWidth  and ScaleHeight properties. If you don't want to resize a visible control just  to learn the dimensions of a bitmap, you can load it into an invisible control,  or you can use this trick, based on the fact that the Picture property returns  an StdPicture object, which in turn exposes the Height and Width properties:&lt;/div&gt;' StdPicture's Width and Height properties are expressed in&lt;br /&gt;' Himetric units. &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;With Picture1&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; width = CInt(.ScaleX(.Picture.Width, vbHimetric, vbPixels))&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; height = CInt(.ScaleY(.Picture.Height, vbHimetric, _&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; vbPixels))&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; End With&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;By the way, in all subsequent code examples I assume that the source PictureBox  control's ScaleWidth and ScaleHeight properties match the actual bitmap's size.  By default, the PaintPicture method copies the entire source bitmap. But you can  copy just a portion of it, passing a value for srcWidth and srcHeight:&lt;/div&gt;&lt;div class="text2"&gt;' Copy the upper left portion of the source image.&lt;br /&gt;picDest.PaintPicture picSource.Picture, 0, 0, , , , , _&lt;br /&gt;picSource.ScaleWidth / 2, picSource.ScaleHeight / 2&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If you're copying just a portion of the source image, you probably want to  pass a specific value for the srcX and srcY values as well, which correspond to  the coordinates of the top-left corner of the area that will be copied from the  source control:&lt;/div&gt;&lt;div class="text2"&gt;' Copy the bottom-right portion of the source image&lt;br /&gt;' in the corresponding corner in the destination. &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;wi = picSource.ScaleWidth / 2&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; he = picSource.ScaleHeight / 2&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; picDest.PaintPicture picSource.Picture, wi, he, , , wi, he, wi, he&lt;/span&gt;&lt;/div&gt;You can use this method to tile a target PictureBox control (or form) with  multiple copies of an image stored in another control:&lt;br /&gt;&lt;div class="text2"&gt;' Start with the leftmost column.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;x = 0&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Do While x &amp;lt; picDest.ScaleWidth&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; y = 0&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; ' For each column, start at the top and work downward.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Do While y &amp;lt; picDest.ScaleHeight&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; picDest.PaintPicture picSource.Picture, x, y, , , 0, 0&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; ' Next row&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; y = y + picSource.ScaleHeight&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Loop&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; ' Next column&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; x = x + picSource.ScaleWidth&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Loop&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Another great feature of the PaintPicture method lets you resize the image  while you transfer it, and you can even specify different zoom-in and zoom-out  factors for the x- and y-axes independently. You just have to pass a value to  the destWidth and destHeight arguments: If these values are greater than the source  image's corresponding dimensions, you achieve a zoom-in effect, and if they are  less you get a zoom-out effect. For example, see how you can double the size of  the original image:&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;picDest.PaintPicture picSource.Picture, 0, 0, _&lt;br /&gt;picSource.ScaleWidth * 2, picSource.ScaleHeight * 2&lt;/div&gt;As a special case of the syntax of the PaintPicture method, the source image  can even be flipped along its x-axis, y-axis, or both by passing negative values  for these arguments:&lt;br /&gt;&lt;div class="text2"&gt;' Flip horizontally.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;picDest.PaintPicture picSource.Picture, _&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; picSource.ScaleWidth, 0, -picSource.ScaleWidth&lt;/span&gt;&lt;br /&gt;' Flip vertically.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;picDest.PaintPicture picSource.Picture, 0, _&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; picSource.ScaleHeight, , -picSource.ScaleHeight&lt;/span&gt;&lt;br /&gt;' Flip the image on both axes.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;picDest.PaintPicture picSource.Picture, picSource.ScaleWidth, _&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; picSource.ScaleHeight, -picSource.ScaleWidth, -picSource.ScaleHeight&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As you might expect, you can combine all these effects together, magnifying,  reducing, or flipping just a portion of the source image, and have the result  appear in any point of the destination PictureBox control (or form). You should  find no problem in reusing all those routines in your own applications.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As if all these capabilities weren't enough, we haven't covered the last argument  of the PaintPicture method yet. The opcode argument lets you specify which kind  of Boolean operation must be performed on pixel bits as they're transferred from  the source image to the destination. The values you can pass to this argument  are the same that you assign to the DrawMode property. The default value is 13-vbCopyPen,  which simply copies the source pixels in the destination control. By playing with  the other settings, you can achieve many interesting graphical effects, including  simple animations.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4715122345481240295?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4715122345481240295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4715122345481240295&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4715122345481240295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4715122345481240295'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/picture-box-control-in-visual-basic-60.html' title='Picture Box Control In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-1663180879134250778</id><published>2009-08-28T19:43:00.000-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Label and Frame Controls in Visual Basic 6</title><content type='html'>&lt;div style="text-align: justify;"&gt;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;/div&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Label Controls&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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&gt;&lt;img alt="Different settings for the Alignment property of Label controls." height="185" src="http://visualbasic.freetutes.com/learn-vb6/images/vb-label-alignment-property.gif" width="300" /&gt;&lt;br /&gt;&lt;em&gt;Different settings for the Alignment property of Label controls.&lt;/em&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;You can insert a literal &amp;amp; character in a Label control's Caption property  by doubling it. For example, to see Research &amp;amp; Development you have to type  &amp;amp;Research &amp;amp;&amp;amp; Development. Note that if you have multiple but isolated  &amp;amp;s, the one that selects the hot key is the last one and all others are ignored.  This tip applies to all the controls that expose a Caption property. (The &amp;amp;  has no special meaning in forms' Caption properties, however.) &lt;/div&gt;&lt;div style="text-align: justify;"&gt;If the caption string is a long one, you might want to set the Label's WordWrap  property to True so that it will extend for multiple lines instead of being truncated  by the right border of the control. Alternatively, you might decide to set the  AutoSize property to True and let the control automatically resize itself to accommodate  longer caption strings.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You sometimes need to modify the default value of a Label's BackStyle property.  Label controls usually cover what's already on the form's surface (other lightweight  controls, output from graphic methods, and so on) because their background is  considered to be opaque. If you want to show a character string somewhere on the  form but at the same time you don't want to obscure underlying objects, set the  BackStyle property to 0-Transparent.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If you're using the Label control to display data read from elsewhere—for  example, a database field or a text file—you should set its UseMnemonics  property to False. In this case, &amp;amp; characters have no special meaning to the  control, and so you indirectly turn off the control's hot key capability. I mention  this property because in older versions of Visual Basic, you had to manually double  each &amp;amp; character to make the ampersand appear in text. I don't think all developers  are aware that you can now treat ampersands like regular characters.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;As I said before, you don't usually write code in Label control event procedures.  This control exposes only a subset of the events supported by other controls.  For example, because Label controls can never get the input focus, they don't  support GotFocus, LostFocus, or any keyboard-related events. In practice, you  can take advantage only of their mouse events: Click, DblClick, MouseDown, MouseMove,  and MouseUp. If you're using a Label control to display data read from a database,  you might sometimes find it useful to write code in its Change event. A Label  control doesn't expose a specific event that tells programmers when users press  its hot keys.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can do some interesting tricks with Label controls. For example, you can  use them to provide rectangular hot spots for images loaded onto the form. To  create that context-sensitive ToolTip, I loaded the image on the form using the  form's Picture property and then I placed a Label control over the Microsoft BackOffice  logo, setting its Caption property to an empty string and the BackStyle property  to 0-Transparent. These properties make the Label invisible, but it correctly  shows its ToolTip when necessary. And because it still receives all mouse events,  you can use its Click event to react to users' actions.&lt;/div&gt;&lt;h2 style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Frame Controls&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-1663180879134250778?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/1663180879134250778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=1663180879134250778&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1663180879134250778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/1663180879134250778'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/label-and-frame-controls-in-visual.html' title='Label and Frame Controls in Visual Basic 6'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-5247005025787770977</id><published>2009-08-27T20:17:00.000-07:00</published><updated>2009-09-03T23:16:54.574-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>VB6 CommandButton and OptionButton Controls - Visual Basic 6</title><content type='html'>&lt;div style="text-align: justify;"&gt;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;/div&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;CommandButton Controls in VB6&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&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;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;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;This fires the button's Click event.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; Command1.Value = True&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&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&gt;&lt;h3 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;Properties of a CommandButton control&lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;  To display text on a CommandButton control, set its &lt;i&gt;Caption&lt;/i&gt; property.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  An event can be activated by clicking on the CommandButton.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  To set the background colour of the CommandButton, select a colour in the BackColor  property.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  To set the text colour set the Forecolor property.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Font for the CommandButton control can be selected using the Font property.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  To enable or disable the buttons set the Enabled property to True or False&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  To make visible or invisible the buttons at run time, set the Visible property  to True or False.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Tooltips can be added to a button by setting a text to the Tooltip property  of the CommandButton.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; A button click event is handled whenever a command button is clicked. To  add a click event handler, double click the button at design time, which adds  a subroutine like the one given below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Command1_Click( )&lt;br /&gt;..................&lt;br /&gt;End Sub&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style="color: blue;"&gt;&lt;span style="font-size: small;"&gt;OptionButton Controls in VB6&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div style="text-align: justify;"&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&gt;&lt;div id="EchoTopic"&gt;&lt;b&gt;Example&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Open a new Standard EXE project and the save the Form as Option.frm and save  the project as Option.vbp.&lt;/div&gt;Design the Form as per the following specifications table.&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;div align="center"&gt;&lt;b&gt;Object &lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="30%"&gt;&lt;div align="center"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="39%"&gt;&lt;div align="center"&gt;&lt;b&gt;Settings&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt; Label&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;Enter a Number&lt;br /&gt;Label1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt;TextBox&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Text&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;(empty)&lt;br /&gt;Text1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt;CommandButton&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;&amp;amp;Close&lt;br /&gt;Command1&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt;OptionButton&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;&amp;amp;Octal&lt;br /&gt;optOct&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt;OptionButton&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;&amp;amp;Hexadecimal&lt;br /&gt;optHex&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="31%"&gt;&lt;b&gt;OptionButton&lt;/b&gt;&lt;/td&gt; &lt;td width="30%"&gt;Caption&lt;br /&gt;Name&lt;/td&gt; &lt;td width="39%"&gt;&amp;amp;Decimal&lt;br /&gt;optDec&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The application responds to the following events&lt;/div&gt;&lt;ul&gt;&lt;li&gt;  &lt;br /&gt;&lt;div&gt;The change event of the TextBox reads the value and stores it in a form-level  numeric variable.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;  The click event of optOct button returns curretval in octal.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  The click event of the optHex button curerntval in hexadecimal&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  The click event of the optDec button returns the decimal equivalent of the  value held currentval.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;The following code is entered in the general declarations section of the Form.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim currentval as variant&lt;/div&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;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub Text1_Change()&lt;br /&gt;If optOct.Value = True Then&lt;br /&gt;currentval = Val ("&amp;amp;O" &amp;amp; LTrim (Text1.Text) &amp;amp; "&amp;amp;")&lt;br /&gt;Elseif optDec.value = True Then&lt;br /&gt;currentval = Val (LTrim (Text1.Text) &amp;amp; "&amp;amp;")&lt;br /&gt;Else&lt;br /&gt;currentval = Val ("&amp;amp;H" &amp;amp; LTrim (Text1.Text) &amp;amp; "&amp;amp;")&lt;br /&gt;End if&lt;br /&gt;End Sub&lt;/div&gt;&lt;div align="center"&gt;&lt;div align="left"&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;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub optOct_Click()&lt;br /&gt;Text1.Text = Oct(currentval)&lt;br /&gt;End Sub&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub optHex_Click()&lt;br /&gt;Text1.Text = Hex(currentval)&lt;br /&gt;End Sub&lt;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub optDec_Click()&lt;br /&gt;Text1.Text = Format(currentval)&lt;br /&gt;End Sub&lt;/div&gt;The follwoing code is entered in the click event of teh Close button.&lt;br /&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Private Sub cmdClose_Click()&lt;br /&gt;Unlod Me&lt;br /&gt;End Sub&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&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&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-5247005025787770977?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/5247005025787770977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=5247005025787770977&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5247005025787770977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/5247005025787770977'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/vb6-commandbutton-and-optionbutton.html' title='VB6 CommandButton and OptionButton Controls - Visual Basic 6'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7217999657613836644</id><published>2009-08-26T23:33:00.000-07:00</published><updated>2009-09-03T23:16:54.575-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>TextBox Control In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&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;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;The &lt;em&gt;SelStart&lt;/em&gt; property&lt;/strong&gt; 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;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;The &lt;em&gt;SelLength&lt;/em&gt; property&lt;/strong&gt; 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;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;The &lt;em&gt;SelText&lt;/em&gt; property&lt;/strong&gt; 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;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Text1.SelStart = Len(Text1.Text)&lt;br /&gt;Text1.SelText = StringToBeAdded&lt;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;&lt;div class="text2" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&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;/div&gt;&lt;div style="text-align: justify;"&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;/div&gt;The selected text can be copied to the Clipboard by using SelText:&lt;br /&gt;&lt;span class="text2"&gt;Clipboard.SelText text, [format]&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In the above syntax, text is the text that has to be placed into the Clipboard,  and format has three possible values.&lt;/div&gt;1. VbCFLink - conversation information&lt;br /&gt;2. VbCFRTF - Rich Text Format&lt;br /&gt;3. VbCFText - Text&lt;br /&gt;We can get text from the clipboard using the GetText() function this way:&lt;br /&gt;&lt;div class="text2"&gt;Clipboard.GetText ([format])&lt;/div&gt;The following Figure summarizes the common TextBox control's properties and  methods.&lt;br /&gt;&lt;table align="center" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td width="23%"&gt; &lt;div align="center"&gt;&lt;b&gt;Property/ Method&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="77%"&gt; &lt;div align="center"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td bgcolor="#ffffff" width="23%"&gt; &lt;div align="left"&gt;  &lt;br /&gt;&lt;b&gt;&lt;i&gt;Properties&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td bgcolor="#ffffff" width="77%"&gt; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Enabled&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;specifies whether user can interact with this control or not&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Index&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Specifies the control array index&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Locked&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;If this control is set to True user can use it else if this control  is set to false the control cannot be used &lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;MaxLength&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Specifies the maximum number of characters to be input. Default  value is set to 0 that means user can input any number of characters &lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;MousePointer&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Using this we can set the shape of the mouse pointer when over  a TextBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Multiline&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;By setting this property to True user can have more than one line  in the TextBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;PasswordChar&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;This is to specify mask character to be displayed in the TextBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt; &lt;b&gt;ScroolBars&lt;/b&gt;&lt;br /&gt;&lt;/td&gt; &lt;td width="77%"&gt;This to set either the vertical scrollbars or horizontal scrollbars  to make appear in the TextBox. User can also set it to both vertical and horizontal.  This property is used with the Multiline property.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Text&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Specifies the text to be displayed in the TextBox at runtime&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;ToolTipIndex&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;This is used to display what text is displayed or in the control&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Visible&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;By setting this user can make the Textbox control visible or invisible  at runtime &lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt; &lt;br /&gt;&lt;b&gt;&lt;i&gt;Method&lt;/i&gt;&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;SetFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Transfers focus to the TextBox&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt; &lt;br /&gt;&lt;b&gt;Event procedures&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Change&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Action happens when the TextBox changes&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;Click&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Action happens when the TextBox is clicked&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;GotFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Action happens when the TextBox receives the active focus&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;LostFocus&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Action happens when the TextBox loses it focus&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;KeyDown&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Called when a key is pressed while the TextBox has the focus&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td width="23%"&gt;&lt;b&gt;KeyUp&lt;/b&gt;&lt;/td&gt; &lt;td width="77%"&gt;Called when a key is released while the TextBox has the focus&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7217999657613836644?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7217999657613836644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7217999657613836644&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7217999657613836644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7217999657613836644'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/textbox-control-in-visual-basic-60.html' title='TextBox Control In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8391920131072032575</id><published>2009-08-25T20:11:00.000-07:00</published><updated>2009-09-03T23:16:54.575-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Know About Arrays In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;An arrays is a consecutive group of memory locations that all have the same name and the same type. To refer to a particular location or element in the array, we specify the array name and the array element position number.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The Individual elements of an array are identified using an index. Arrays have upper and lower bounds and the elements have to lie within those bounds. Each index number in an array is allocated individual memory space and therefore users must evade declaring arrays of larger size than required. We can declare an array of any of the basic data types including variant, user-defined-types and object variables. The individual elements of an array are all of the same data type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Declaring arrays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;Arrays occupy space in memory. The &lt;a href="http://domains.googlesyndication.com/apps/domainpark/results.cgi?client=ca-afdo-pub-3366691112917527&amp;amp;url=http://freetutes.us/&amp;amp;hl=en&amp;amp;ac=r&amp;amp;q=programmer&amp;amp;afdt=pnCHggu8yLUKEwiv7IP30--YAhUCWnoKHYNK1TwQAxgBIAIwx6f2DjgeUMen9g5Qy7qLD1DVrK8PUNq3tRFQquj_E1DfoK8pUP3IidUB" target="_blank"&gt;&lt;/a&gt;programmer specifies the array type and the number of elements required by the array so that the compiler may reserve the appropriate amount of memory. Arrays may be declared as Public (in a code module), module or local. Module arrays are declared in the general declarations using keyword Dim or Private. Local arrays are declared in a procedure using Dim or Static. Array must be declared explicitly with keyword "As".&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;There are two types of arrays in Visual Basic namely:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Fixed-size array :&lt;/b&gt; The size of array always remains the same-size doesn't change during the program execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Dynamic array :&lt;/b&gt; The size of the array can be changed at the run time- size changes during the program execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Fixed-sized Arrays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;When an upper bound is specified in the declaration, a Fixed-array is created. The upper limit should always be within the range of long data type. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;Declaring a fixed-array&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text2"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim numbers(5) As Integer&lt;/div&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In the above illustration, numbers is the name of the array, and the number 6 included in the parentheses is the upper limit of the array. The above declaration creates an array with 6 elements, with index numbers running from 0 to 5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If we want to specify the lower limit, then the parentheses should include both the lower and upper limit along with the To keyword. An example for this is given below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim numbers (1 To 6 ) As Integer&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;In the above statement, an array of 10 elements is declared but with indexes running from 1 to 6. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;A public array can be declared using the keyword Public instead of Dim as shown below.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Public numbers(5) As Integer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Multidimensional Arrays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;Arrays can have multiple dimensions. A common use of multidimensional arrays is to represent tables of values consisting of information arranged in rows and columns. To identify a particular table element, we must specify two indexes: The first (by convention) identifies the element's row and the second (by convention) identifies the element's column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Tables or arrays that require two indexes to identify a particular element are called two dimensional arrays. Note that multidimensional arrays can have more than two dimensions. Visual Basic supports at least 60 array dimensions, but most people will need to use more than two or three dimensional-arrays.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;The following statement declares a two-dimensional array 50 by 50 array within a procedure.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim AvgMarks ( 50, 50)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;It is also possible to define the lower limits for one or both the dimensions as for fixed size arrays. An example for this is given here. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim Marks ( 101 To 200, 1 To 100)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;An example for three dimensional-array with defined lower limits is given below.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim Details( 101 To 200, 1 To 100, 1 To 100)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Static and dynamic arrays&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;Basically, you can create either static or dynamic arrays. Static arrays must include a fixed number of items, and this number must be known at compile time so that the compiler can set aside the necessary amount of memory. You create a static array using a Dim statement with a constant argument:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;' This is a static array. &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim Names(100) As String&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Visual Basic starts indexing the array with 0. Therefore, the preceding array actually holds 101 items.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Most programs don't use static arrays because programmers rarely know at compile time how many items you need and also because static arrays can't be resized during execution. Both these issues are solved by dynamic arrays. You declare and create dynamic arrays in two distinct steps. In general, you declare the array to account for its visibility (for example, at the beginning of a module if you want to make it visible by all the procedures of the module) using a Dim command with an empty pair of brackets. Then you create the array when you actually need it, using a ReDim statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;' An array defined in a BAS module (with Private scope)&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim Customers() As String&lt;/div&gt;...&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Sub Main()&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' Here you create the array.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Customer(1000) As String&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;If you're creating an array that's local to a procedure, you can do everything with a single ReDim statement: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Sub PrintReport()&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' This array is visible only to the procedure.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Customers(1000) As String&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' ...&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Sub&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If you don't specify the lower index of an array, Visual Basic assumes it to be 0, unless an Option Base 1 statement is placed at the beginning of the module. My suggestion is this: Never use an Option Base statement because it makes code reuse more difficult. (You can't cut and paste routines without worrying about the current Option Base.) If you want to explicitly use a lower index different from 0, use this syntax instead: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Customers(1 To 1000) As String&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Dynamic arrays can be re-created at will, each time with a different number of items. When you re-create a dynamic array, its contents are reset to 0 (or to an empty string) and you lose the data it contains. If you want to resize an array without losing its contents, use the ReDim Preserve command:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Preserve Customers(2000) As String&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;When you're resizing an array, you can't change the number of its dimensions nor the type of the values it contains. Moreover, when you're using ReDim Preserve on a multidimensional array, you can resize only its last dimension:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Cells(1 To 100, 10) As Integer&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;...&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Preserve Cells(1 To 100, 20) As Integer ' This works.&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim Preserve Cells(1 To 200, 20) As Integer ' This doesn't.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Finally, you can destroy an array using the Erase statement. If the array is dynamic, Visual Basic releases the memory allocated for its elements (and you can't read or write them any longer); if the array is static, its elements are set to 0 or to empty strings. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can use the LBound and UBound functions to retrieve the lower and upper indices. If the array has two or more dimensions, you need to pass a second argument to these functions to specify the dimension you need:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="text2"&gt;Print LBound(Cells, 1) ' Displays 1, lower index of 1st dimension&lt;br /&gt;Print LBound(Cells) ' Same as above&lt;br /&gt;Print UBound(Cells, 2) ' Displays 20, upper index of 2nd dimension&lt;br /&gt;' Evaluate total number of elements.&lt;br /&gt;NumEls = (UBound(Cells) _ LBound(Cells) + 1) * _&lt;br /&gt;(UBound(Cells, 2) _ LBound(Cells, 2) + 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: small;"&gt;Arrays within UDTs&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;UDT structures can include both static and dynamic arrays. Here's a sample structure that contains both types: &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text2"&gt;T&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ype MyUDT&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;StaticArr(100) As Long&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DynamicArr() As Long&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;End Type&lt;/div&gt;...&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Dim udt As MyUDT&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' You must DIMension the dynamic array before using it.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReDim udt.DynamicArr(100) As Long&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;' You don't have to do that with static arrays.&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;udt.StaticArr(1) = 1234&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The memory needed by a static array is allocated within the UDT structure; for example, the StaticArr array in the preceding code snippet takes exactly 400 bytes. Conversely, a dynamic array in a UDT takes only 4 bytes, which form a pointer to the memory area where the actual data is stored. Dynamic arrays are advantageous when each individual UDT variable might host a different number of array items. As with all dynamic arrays, if you don't dimension a dynamic array within a UDT before accessing its items, you get an error 9—"&lt;b&gt;Subscript out of range&lt;/b&gt;." &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-8391920131072032575?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8391920131072032575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8391920131072032575&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8391920131072032575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8391920131072032575'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/know-about-arrays-in-visual-basic-60.html' title='Know About Arrays In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-438959207359715737</id><published>2009-08-25T03:45:00.003-07:00</published><updated>2009-09-03T23:16:54.575-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Do And For Statement</title><content type='html'>&lt;div style="text-align: justify;"&gt;A &lt;b&gt;For...Next&lt;/b&gt; loop condition can be terminated by an &lt;b&gt;Exit For &lt;/b&gt;statement.  Consider the following statement block.  &lt;/div&gt;&lt;i&gt;Dim x As Integer&lt;br /&gt;For x = 1 To 10&lt;br /&gt;Print x&lt;br /&gt;If x = 5 Then&lt;br /&gt;Print "The program exited at x=5"&lt;br /&gt;End If&lt;br /&gt;Next&lt;/i&gt; &lt;br /&gt;&lt;div style="text-align: justify;"&gt;The preceding code increments the value of x by 1 until it reaches  the condition x = 5. The &lt;b&gt;Exit For&lt;/b&gt; statement is executed and it terminates  the &lt;b&gt;For...Next&lt;/b&gt; loop. The Following statement block containing &lt;b&gt;Do...While&lt;/b&gt;  loop is terminated using &lt;b&gt;Exit Do&lt;/b&gt; statement.&lt;/div&gt;&lt;i&gt;Dim x As Integer&lt;br /&gt;Do While x &amp;lt; 10&lt;br /&gt;Print x&lt;br /&gt;x = x + 1&lt;br /&gt;If x = 5 Then&lt;br /&gt;Print "The program is exited at x=5"&lt;br /&gt;Exit Do&lt;br /&gt;End If&lt;br /&gt;Loop&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-438959207359715737?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/438959207359715737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=438959207359715737&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/438959207359715737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/438959207359715737'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/do-and-for-statement_25.html' title='Do And For Statement'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4598884410186444384</id><published>2009-08-25T03:44:00.003-07:00</published><updated>2009-09-03T23:16:54.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Do And For Statement</title><content type='html'>&lt;div style="text-align: justify;"&gt;A &lt;b&gt;For...Next&lt;/b&gt; loop condition can be terminated by an &lt;b&gt;Exit For &lt;/b&gt;statement.  Consider the following statement block.  &lt;/div&gt;&lt;i&gt;&lt;span class="text2"&gt;Dim x As Integer&lt;br /&gt;For x = 1 To 10&lt;br /&gt;Print x&lt;br /&gt;If x = 5 Then&lt;br /&gt;Print "The program exited at x=5"&lt;br /&gt;End If&lt;br /&gt;Next&lt;/span&gt;&lt;/i&gt; &lt;div style="text-align: justify;"&gt;The preceding code increments the value of x by 1 until it reaches  the condition x = 5. The &lt;b&gt;Exit For&lt;/b&gt; statement is executed and it terminates  the &lt;b&gt;For...Next&lt;/b&gt; loop. The Following statement block containing &lt;b&gt;Do...While&lt;/b&gt;  loop is terminated using &lt;b&gt;Exit Do&lt;/b&gt; statement.&lt;/div&gt;&lt;i&gt;&lt;span class="text2"&gt;Dim x As Integer&lt;br /&gt;Do While x &amp;lt; 10&lt;br /&gt;Print x&lt;br /&gt;x = x + 1&lt;br /&gt;If x = 5 Then&lt;br /&gt;Print "The program is exited at x=5"&lt;br /&gt;Exit Do&lt;br /&gt;End If&lt;br /&gt;Loop&lt;/span&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4598884410186444384?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4598884410186444384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4598884410186444384&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4598884410186444384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4598884410186444384'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/do-and-for-statement.html' title='Do And For Statement'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-613017132281851887</id><published>2009-08-23T23:16:00.000-07:00</published><updated>2009-09-03T23:16:54.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Loops Statements In VIsual Basic 6.0</title><content type='html'>&lt;div class="MsoNormal" style="text-align: justify;"&gt;A repetition structure allows the programer to that an action is to be repeated until given condition is true.&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;/div&gt;&lt;h2&gt;&lt;u&gt;&lt;span style="font-size: 12pt;"&gt;Do While... &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt; Statement &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;&lt;div class="MsoNormal"&gt;The &lt;b&gt;Do While...&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;/b&gt; is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;i&gt;Dim number As Integer&lt;/i&gt;&lt;i&gt;&lt;br /&gt;number = 1&lt;br /&gt;Do While number &amp;lt;= 100&lt;br /&gt;number = number + 1&lt;br /&gt;&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&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 &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt; it goes back to the Do and tests condition again. If condition is False on the first pass, the statements are never executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;h2&gt;&lt;u&gt;&lt;span style="font-size: 12pt;"&gt;While... Wend Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;A &lt;b&gt;While...Wend&lt;/b&gt; statement behaves like the &lt;b&gt;Do While...&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;/b&gt; statement. The following &lt;b&gt;While...Wend&lt;/b&gt; counts from 1 to 100&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;i&gt;Dim number As Integer&lt;/i&gt;&lt;i&gt;&lt;br /&gt;&lt;br /&gt;number = 1&lt;br /&gt;While number &amp;lt;=100&lt;br /&gt;number = number + 1&lt;br /&gt;Wend&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;&lt;h2&gt;&lt;u&gt;&lt;span style="font-size: 12pt;"&gt;Do...Loop While Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;The &lt;b&gt;Do...&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;/b&gt; While statement first executes the statements and then test the condition after each execution. The following program block illustrates the structure:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;Dim number As Long&lt;br /&gt;number = 0&lt;br /&gt;Do &lt;br /&gt;number = number + 1&lt;br /&gt;&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt; While number &amp;lt; 201&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&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 &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;h2&gt;&lt;u&gt;&lt;span style="font-size: 12pt;"&gt;Do Until...&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt; Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;Unlike the &lt;b&gt;Do While...Loop&lt;/b&gt; and &lt;b&gt;While...Wend&lt;/b&gt; repetition structures, the &lt;b&gt;Do Until... &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;/b&gt; structure tests a condition for falsity. Statements in the body of a &lt;b&gt;Do Until...&lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;/b&gt; are executed repeatedly as long as the loop-continuation test evaluates to False.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;An example for &lt;b&gt;Do Until...Loop&lt;/b&gt; statement. The coding is typed inside the click event of the command button&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;Dim number As Long&lt;br /&gt;number=0&lt;br /&gt;Do Until number &amp;gt; 1000&lt;br /&gt;number = number + 1&lt;br /&gt;Print number&lt;br /&gt;Loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;Numbers between 1 to 1000 will be displayed on the form as soon as you click on the command button.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;h2&gt;&lt;u&gt;&lt;span style="font-size: 12pt;"&gt;The For...Next &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;The &lt;b&gt;For...Next&lt;/b&gt; &lt;st1:place w:st="on"&gt;Loop&lt;/st1:place&gt; is another way to make loops in Visual Basic. &lt;b&gt;For...Next&lt;/b&gt; repetition structure handles all the details of counter-controlled repetition. The following loop counts the numbers from 1 to 100:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;Dim x As Integer&lt;br /&gt;For x = 1 To 50&lt;br /&gt;Print x&lt;br /&gt;Next&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;In order to count the numbers from 1 yo 50 in steps of 2, the following loop can be used&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;For x = 1 To 50 Step 2&lt;br /&gt;Print x&lt;br /&gt;Next&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&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;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;i&gt;For x = 1 To 50&lt;/i&gt;&lt;i&gt;&lt;br /&gt;Print x &amp;amp; Space$ (2);&lt;br /&gt;Next &lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;To increase the space between the numbers increase the value inside the brackets after the &amp;amp; Space$.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Following example is a &lt;b&gt;For...Next&lt;/b&gt; repetition structure which is with the If condition used.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;i&gt;Dim number As Integer&lt;/i&gt;&lt;i&gt;&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;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;In the output instead of number 4 you will get the "This is number 4".&lt;o:p&gt;&lt;/o:p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-613017132281851887?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/613017132281851887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=613017132281851887&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/613017132281851887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/613017132281851887'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/loops-statements-in-visual-basic-60.html' title='Loops Statements In VIsual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8146573098332742540</id><published>2009-08-23T23:08:00.000-07:00</published><updated>2009-09-03T23:16:54.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Control Structures in Visual Basic 6.0</title><content type='html'>&lt;div class="MsoNormal" style="text-align: justify;"&gt;Control Statements are used to control the flow of program's execution. Visual Basic supports control structures such as if... Then, if...Then ...Else, Select...Case, and Loop structures such as Do While...Loop, While...Wend, For...Next etc method.&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;If...Then selection structure&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;The If...Then selection structure performs an indicated action only when the condition is True; otherwise the action is skipped.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;Syntax of the If...Then selection&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;If &lt;condition&gt; Then&lt;br /&gt;statement&lt;br /&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/condition&gt;&lt;/i&gt;&lt;/div&gt;&lt;i&gt;e.g.: If average&amp;gt;75 Then&lt;/i&gt;&lt;i&gt;&lt;br /&gt;txtGrade.Text = "A"&lt;br /&gt;End If&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;If...Then...Else selection structure&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;The If...Then...Else selection structure allows the programmer to specify that a different action is to be performed when the condition is True than when the condition is False. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Syntax of the If...Then...Else selection&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;If &lt;condition&gt; Then&lt;br /&gt;statements&lt;br /&gt;Else&lt;br /&gt;statements&lt;br /&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/condition&gt;&lt;/i&gt;&lt;/div&gt;e.g.: If average&amp;gt;50 Then&lt;br /&gt;txtGrade.Text = "Pass"&lt;br /&gt;Else&lt;br /&gt;txtGrade.Text = "Fail"&lt;br /&gt;End If&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Nested If...Then...Else selection structure&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;Nested If...Then...Else selection structures test for multiple cases by placing If...Then...Else selection structures inside If...Then...Else structures.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Syntax of the Nested If...Then...Else selection structure&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;You can use Nested If either of the methods as shown above&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;b&gt;Method 1&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;If &amp;lt; condition 1 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;ElseIf &amp;lt; condition 2 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;ElseIf &amp;lt; condition 3 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;Else&lt;br /&gt;Statements&lt;br /&gt;End If&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;b&gt;Method 2&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;div class="text21"&gt;&lt;i&gt;If &amp;lt; condition 1 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;Else&lt;br /&gt;If &amp;lt; condition 2 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;Else&lt;br /&gt;If &amp;lt; condition 3 &amp;gt; Then&lt;br /&gt;statements&lt;br /&gt;Else&lt;br /&gt;Statements&lt;br /&gt;End If&lt;br /&gt;End If&lt;br /&gt;EndIf&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;e.g.: Assume you have to find the grade using nested if and display in a text box&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;If average &amp;gt; 75 Then&lt;br /&gt;txtGrade.Text = "A"&lt;br /&gt;ElseIf average &amp;gt; 65 Then&lt;br /&gt;txtGrade.Text = "B"&lt;br /&gt;ElseIf average &amp;gt; 55 Then&lt;br /&gt;txtGrade.text = "C"&lt;br /&gt;ElseIf average &amp;gt; 45 Then&lt;br /&gt;txtGrade.Text = "S"&lt;br /&gt;Else&lt;br /&gt;txtGrade.Text = "F"&lt;br /&gt;End If&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;Select...Case selection structure&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style="font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;Select...Case structure is an alternative to If...Then...ElseIf for selectively executing a single block of statements from among multiple block of statements. Select...case is more convenient to use than the If...Else...End If. The following program block illustrate the working of Select...Case.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;Syntax of the Select...Case selection structure&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;i&gt;Select Case Index&lt;/i&gt;&lt;i&gt;&lt;br /&gt;Case 0&lt;br /&gt;Statements&lt;br /&gt;Case 1&lt;br /&gt;Statements&lt;br /&gt;End Select&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;e.g.: Assume you have to find the grade using select...case and display in the text box&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim average as Integer&lt;br /&gt;&lt;br /&gt;average = txtAverage.Text&lt;br /&gt;Select Case average&lt;br /&gt;Case 100 To 75&lt;br /&gt;txtGrade.Text ="A"&lt;br /&gt;Case 74 To 65 &lt;br /&gt;txtGrade.Text ="B"&lt;br /&gt;Case 64 To 55&lt;br /&gt;txtGrade.Text ="C"&lt;br /&gt;Case 54 To 45&lt;br /&gt;txtGrade.Text ="S"&lt;br /&gt;Case 44 To 0&lt;br /&gt;txtGrade.Text ="F"&lt;br /&gt;Case Else&lt;br /&gt;MsgBox "Invalid average marks"&lt;br /&gt;End Select&lt;o:p&gt;&lt;/o:p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-8146573098332742540?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8146573098332742540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8146573098332742540&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8146573098332742540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8146573098332742540'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/control-structures-in-visual-basic-60.html' title='Control Structures in Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7190959734512569068</id><published>2009-08-23T22:58:00.000-07:00</published><updated>2009-09-03T23:16:54.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Procedures in Visual Basic 6</title><content type='html'>&lt;div class="MsoNormal" style="text-align: justify;"&gt;Visual Basic offers different types of procedures to execute small sections of coding in applications. The various procedures are elucidated in details in this section.Visual Basic Program can be broken into smaller logical components called Procedures. Procedures are useful for condensing repeated operations such as the frequently used calculations, text and control manipulation etc. The benefits of using procedures in programming are: &lt;/div&gt;&lt;div style="text-align: justify;"&gt;It is easier to debug a program a program with procedures, which breaks a program into discrete logical limits.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Procedures used in one program can act as building blocks for other programs with slight modifications.&lt;/div&gt;A Procedure can be Sub, Function or Property Procedure.&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 14pt;"&gt;&lt;span style="font-size: small;"&gt;Sub Procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;A sub procedure can be placed in standard, class and form modules. Each time the procedure is called, the statements between Sub and End Sub are executed. The syntax for a sub procedure is as follows:&lt;/div&gt;&lt;i&gt;[Private | Public] [Static] Sub Procedurename [( arglist)]&lt;/i&gt;&lt;i&gt;&lt;br /&gt;[ statements]&lt;br /&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;arglist is a list of argument names separated by commas. Each argument acts like a variable in the procedure. There are two types of Sub Procedures namely general procedures and event procedures.&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: 14pt;"&gt;&lt;span style="font-size: small;"&gt;Event Procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;An event procedure is a procedure block that contains the control's actual name, an underscore(_), and the event name. The following syntax represents the event procedure for a Form_Load event.&lt;/div&gt;&lt;div class="text21"&gt;&lt;i&gt;Private Sub Form_Load()&lt;br /&gt;....statement block..&lt;br /&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;Event Procedures acquire the declarations as Private by default.&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: 14pt;"&gt;&lt;span style="font-size: small;"&gt;General Procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;A general procedure is declared when several event procedures perform the same actions. It is a good programming practice to write common statements in a separate procedure (general procedure) and then call them in the event procedure.&lt;/div&gt;In order to add General procedure:&lt;br /&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The Code window is opened for the module to which the procedure is to be added.&lt;/div&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The &lt;i&gt;Add Procedure&lt;/i&gt; option is chosen from the Tools menu, which opens an Add Procedure dialog box as shown in the figure given below.&lt;/div&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The name of the procedure is typed in the Name textbox&lt;/div&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Under &lt;i&gt;Type&lt;/i&gt;, &lt;i&gt;Sub&lt;/i&gt; is selected to create a Sub procedure, &lt;i&gt;Function&lt;/i&gt; to create a Function procedure or &lt;i&gt;Property&lt;/i&gt; to create a Property procedure.&lt;/div&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol; font-size: 10pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Under &lt;i&gt;Scope&lt;/i&gt;, &lt;i&gt;Public&lt;/i&gt; is selected to create a procedure that can be invoked outside the module, or Private to create a procedure that can be invoked only from within the module.&lt;/div&gt;&lt;div style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_lzdaYtqTMFU/SpIrv2ahBCI/AAAAAAAAAAk/fk3YqaHA5V4/s1600-h/add-procedure.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_lzdaYtqTMFU/SpIrv2ahBCI/AAAAAAAAAAk/fk3YqaHA5V4/s320/add-procedure.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;We can also create a new procedure in the current module by typing Sub ProcedureName, Function ProcedureName, or Property ProcedureName in the Code window. A Function procedure returns a value and a Sub Procedure does not return a value.&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: 14pt;"&gt;&lt;span style="font-size: small;"&gt;Function Procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;Functions are like sub procedures, except they return a value to the calling procedure. They are especially useful for taking one or more pieces of data, called &lt;i&gt;arguments&lt;/i&gt; and performing some tasks with them. Then the functions returns a value that indicates the results of the tasks complete within the function.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The following function procedure calculates the third side or hypotenuse of a right triangle, where A and B are the other two sides. It takes two arguments A and B (of data type Double) and finally returns the results.&lt;/div&gt;&lt;i&gt;Function Hypotenuse (A As Double, B As Double) As Double&lt;/i&gt;&lt;i&gt;&lt;br /&gt;Hypotenuse = sqr (A^2 + B^2)&lt;br /&gt;End Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The above function procedure is written in the general declarations section of the Code window. A function can also be written by selecting the &lt;i&gt;Add Procedure&lt;/i&gt; dialog box from the Tools menu and by choosing the required scope and type.&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: 14pt;"&gt;&lt;span style="font-size: small;"&gt;Property Procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;A property procedure is used to create and manipulate custom properties. It is used to create read only properties for Forms, Standard modules and Class modules.Visual Basic provides three kind of property procedures-Property Let procedure that sets the value of a property, Property Get procedure that returns the value of a property, and Property Set procedure that sets the references to an object.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7190959734512569068?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7190959734512569068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7190959734512569068&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7190959734512569068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7190959734512569068'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/procedures-in-visual-basic-6.html' title='Procedures in Visual Basic 6'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lzdaYtqTMFU/SpIrv2ahBCI/AAAAAAAAAAk/fk3YqaHA5V4/s72-c/add-procedure.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7294016437080591531</id><published>2009-08-23T22:47:00.000-07:00</published><updated>2009-09-03T23:16:54.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Variables in Visual Basic 6</title><content type='html'>&lt;div style="text-align: justify;"&gt;Variables are the memory locations which are used to store values temporarily. A defined naming strategy  has to be followed while naming a variable. A variable name must begin with an  alphabet letter and should not exceed 255 characters. It must be unique within  the same scope. It should not contain any special character like %, &amp;amp;, !,  #, @ or $.  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;There are many ways of declaring variables in Visual  Basic. Depending on where the variables are declared and how they are declared,  we can determine how they can be used by our application. The different ways of  declaring variables in Visual  Basic are listed below and elucidated in this section.&lt;/div&gt;&lt;h3&gt;Explicit Declaration&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;Declaring a variable tells Visual Basic to reserve space in memory. It is not  must that a variable should be declared before using it. Automatically whenever  Visual  Basic encounters a new variable, it assigns the default variable type and  value. This is called implicit declaration. Though this type of declaration is  easier for the user, to have more control over the variables, it is advisable  to declare them explicitly. The variables are declared with a Dim statement to  name the variable and its type. The As type clause in the Dim statement allows  to define the data type or object type of the variable. This is called explicit  declaration.&lt;/div&gt;&lt;i&gt;Syntax&lt;/i&gt;&lt;br /&gt;&lt;div class="text2"&gt;&lt;i&gt;Dim variable [As Type]&lt;/i&gt;&lt;/div&gt;&lt;i&gt;For example,&lt;/i&gt;&lt;br /&gt;&lt;div class="text2"&gt;&lt;i&gt;Dim strName As String&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Dim intCounter As Integer&lt;/i&gt;&lt;/div&gt;&lt;h3&gt;Using Option Explicit statement&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;It may be convenient to declare variables implicitly, but it can lead to errors  that may not be recognized at run time. Say, for example a variable by name &lt;i&gt;intcount&lt;/i&gt;  is used implicitly and is assigned to a value. In the next step, this field is  incremented by 1 by the following statement&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Intcount = intcont + 1&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This calculation will result in &lt;i&gt;intcount&lt;/i&gt; yielding a value of 1 as  intcount would have been initialized to zero. This is because the intcount variable  has been mityped as incont in the right hand side of the second variable. But  Visual Basic does not see this as a mistake and considers it to be new variable  and therefore gives a wrong result.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In Visual Basic, to prevent errors of this nature, we can declare a variable  by adding the following statement to the general declaration section of the Form.&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Option Explicit&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This forces the user to declare all the variables. The Option Explicit statement  checks in the module for usage of any undeclared variables and reports an error  to the user. The user can thus rectify the error on seeing this error message.&lt;/div&gt;The Option Explicit statement can be explicitly placed in the general declaration  section of each module using the following steps.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Click Options item in the Tools menu&lt;/li&gt;&lt;li&gt;Click the Editor tab in the Options dialog box&lt;/li&gt;&lt;li&gt;Check Require Variable Declaration option and then click the OK button&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Scope of variables&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;A variable is scoped to a procedure-level (local) or module-level variable  depending on how it is declared. The scope of a variable, procedure or object  determines which part of the code in our application are aware of the variable's  existence. A variable is declared in general declaration section of e Form, and  hence is available to all the procedures. Local variables are recognized only  in the procedure in which they are declared. They can be declared with &lt;i&gt;Dim  &lt;/i&gt;and&lt;i&gt; Static &lt;/i&gt;keywords. If we want a variable to be available to all of  the procedures within the same module, or to all the procedures in an application,  a variable is declared with broader scope.&lt;/div&gt;&lt;h3&gt;Local Variables&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;A local variable is one that is declared inside a procedure. This variable  is only available to the code inside the procedure and can be declared using the  Dim statements as given below.&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Dim sum As Integer&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The local variables exist as long as the procedure in which they are declared,  is executing. Once a procedure is executed, the values of its local variables  are lost and the memory used by these variables is freed and can be reclaimed.  Variables that are declared with keyword Dim exist only as long as the procedure  is being executed.&lt;/div&gt;&lt;h3&gt;Static Variables&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;Static variables are not reinitialized each time Visual Invokes a procedure  and therefore retains or preserves value even when a procedure ends. In case we  need to keep track of the number of times a command button in an application is  clicked, a static counter variable has to be declared. These static variables  are also ideal for making controls alternately visible or invisible. A static  variable is declared as given below.&lt;/div&gt;Static intPermanent As Integer&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Variables have a lifetime in addition to scope. The values in a module-level  and public variables are preserved for the lifetime of an application whereas  local variables declared with Dim exist only while the procedure in which they  are declared is still being executed. The value of a local variable can be preserved  using the Static keyword. The follwoing procedure calculates the running total  by adding new values to the previous values stored in the static variable value.&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Function RunningTotal ( )&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Static Accumulate&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Accumulate = Accumulate + num&lt;/i&gt;&lt;br /&gt;&lt;i&gt;RunningTotal = Accumulate&lt;/i&gt;&lt;br /&gt;&lt;i&gt;End Function&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If the variable Accumulate was declared with Dim instead of static, the previously  accumulated values would not be preserved accross calls to the procedure, and  the procedure would return the same value with which it was called. To make all  variables in a procedure static, the Static keyword is placed at the beginning  of the procedure heading as given in the below statement.&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Static Function RunningTotal ( )&lt;/i&gt;&lt;/div&gt;&lt;i&gt;Example&lt;/i&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The following is an example of an event procedure for a CommandButton that  counts and displays the number of clicks made.&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;Private Sub Command1_Click ( )&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Static Counter As Integer&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Counter = Counter = 1&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Print Counter&lt;/i&gt;&lt;br /&gt;&lt;i&gt;End Sub&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The first time we click the CommandButton, the Counter starts with its default  value of zero. Visual Basic then adds 1 to it and prints the result.&lt;/div&gt;&lt;h3&gt;Module Levele Variables&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;A module level variable is available to all the procedures in the module. They  are declared using the &lt;i&gt;Public&lt;/i&gt; or the &lt;i&gt;Private&lt;/i&gt; keyword. If you declare  a variable using a Private or a Dim statement in the declaration section of a  module—a standard BAS module, a form module, a class module, and so on—you're  creating a private module-level variable. Such variables are visible only from  within the module they belong to and can't be accessed from the outside. In general,  these variables are useful for sharing data among procedures in the same module:&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;' In the declarative section of any module&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Private LoginTime As Date ' A private module-level variable&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Dim LoginPassword As String ' Another private module-level variable&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can also use the Public attribute for module-level variables, for all module  types except BAS modules. (Public variables in BAS modules are global variables.)  In this case, you're creating a strange beast: a Public module-level variable  that can be accessed by all procedures in the module to share data and that also  can be accessed from outside the module. In this case, however, it's more appropriate  to describe such a variable as a property:&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;' In the declarative section of Form1 module&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Public CustomerName As String ' A Public property&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;You can access a module property as a regular variable from inside the module  and as a custom property from the outside:&lt;/i&gt;&lt;/div&gt;&lt;div class="text2"&gt;&lt;i&gt;' From outside Form1 module...&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Form1.CustomerName = "John Smith"&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The lifetime of a module-level variable coincides with the lifetime of the  module itself. Private variables in standard BAS modules live for the entire life  of the application, even if they can be accessed only while Visual Basic is executing  code in that module. Variables in form and class modules exist only when that  module is loaded in memory. In other words, while a form is active (but not necessarily  visible to the user) all its variables take some memory, and this memory is released  only when the form is completely unloaded from memory. The next time the form  is re-created, Visual Basic reallocates memory for all variables and resets them  to their default values (0 for numeric values, "" for strings, Nothing  for object variables). &lt;/div&gt;&lt;h3&gt;Public vs Local Variables&lt;/h3&gt;&lt;div style="text-align: justify;"&gt;A variable can have the same name and different scope. For example, we can  have a public variable named R and within a procedure we can declare a local variable  R. References to the name R within the procedure would access the local variable  and references to R outside the procedure would access the public variable.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7294016437080591531?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7294016437080591531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7294016437080591531&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7294016437080591531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7294016437080591531'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/variables-in-visual-basic-6.html' title='Variables in Visual Basic 6'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4031877247427188755</id><published>2009-08-23T22:34:00.000-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Operators in Visual Basic</title><content type='html'>&lt;b&gt;Arithmetical Operators&lt;/b&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr class="text"&gt;  &lt;td height="39" width="13%"&gt;&lt;div align="center"&gt;&lt;b&gt;Operators&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td height="39" width="25%"&gt;&lt;div align="center"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td height="39" width="24%"&gt;&lt;div align="center"&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td height="39" width="38%"&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;div align="center"&gt;&lt;b&gt;Result&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;+&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Add&lt;/td&gt; &lt;td width="24%"&gt;5+5&lt;/td&gt; &lt;td width="38%"&gt;10&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;-&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Substract&lt;/td&gt; &lt;td width="24%"&gt;10-5&lt;/td&gt; &lt;td width="38%"&gt;5&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;/&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Divide&lt;/td&gt; &lt;td width="24%"&gt;25/5&lt;/td&gt; &lt;td width="38%"&gt;5&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;\&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Integer Division&lt;/td&gt; &lt;td width="24%"&gt;20\3&lt;/td&gt; &lt;td width="38%"&gt;6&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;*&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Multiply&lt;/td&gt; &lt;td width="24%"&gt;5*4&lt;/td&gt; &lt;td width="38%"&gt;20&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;^&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Exponent (power of)&lt;/td&gt; &lt;td width="24%"&gt;3^3&lt;/td&gt; &lt;td width="38%"&gt;27&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;Mod&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;Remainder of division&lt;/td&gt; &lt;td width="24%"&gt;20 Mod 6&lt;/td&gt; &lt;td width="38%"&gt;2&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="13%"&gt;&lt;div align="center"&gt;&amp;amp;&lt;/div&gt;&lt;/td&gt; &lt;td width="25%"&gt;String concatenation &lt;/td&gt; &lt;td width="24%"&gt;"George"&amp;amp;" "&amp;amp;"Bush"&lt;/td&gt; &lt;td width="38%"&gt;"George Bush"&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div align="left"&gt;&lt;b&gt;Relational Operators&lt;/b&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&lt;b&gt;Operators&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;&lt;div align="center"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="22%"&gt;&lt;div align="center"&gt;&lt;b&gt;Example &lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="38%"&gt;&lt;div align="center"&gt;&lt;b&gt;Result&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Greater than&lt;/td&gt; &lt;td width="22%"&gt;10&amp;gt;8&lt;/td&gt; &lt;td width="38%"&gt;True&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&amp;lt;&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Less than&lt;/td&gt; &lt;td width="22%"&gt;10&amp;lt;8&lt;/td&gt; &lt;td width="38%"&gt;False&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&amp;gt;=&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Greater than or equal to&lt;/td&gt; &lt;td width="22%"&gt;20&amp;gt;=10&lt;/td&gt; &lt;td width="38%"&gt;True&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&amp;lt;=&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Less than or equal to&lt;/td&gt; &lt;td width="22%"&gt;10&amp;lt;=20&lt;/td&gt; &lt;td width="38%"&gt;True&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&amp;lt;&amp;gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Not Equal to&lt;/td&gt; &lt;td width="22%"&gt;5&amp;lt;&amp;gt;4&lt;/td&gt; &lt;td width="38%"&gt;True&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;=&lt;/div&gt;&lt;/td&gt; &lt;td width="26%"&gt;Equal to&lt;/td&gt; &lt;td width="22%"&gt;5=7&lt;/td&gt; &lt;td width="38%"&gt;False&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;Logical Operators&lt;/b&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;&lt;b&gt;Operators&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;td width="36%"&gt;&lt;div align="center"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;OR&lt;/div&gt;&lt;/td&gt; &lt;td width="36%"&gt;Operation will be true if either of the operands is true &lt;/td&gt; &lt;/tr&gt;&lt;tr class="text"&gt;  &lt;td width="14%"&gt;&lt;div align="center"&gt;AND&lt;/div&gt;&lt;/td&gt; &lt;td width="36%"&gt;Operation will be true only if both the operands are true&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4031877247427188755?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4031877247427188755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4031877247427188755&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4031877247427188755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4031877247427188755'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/operators-in-visual-basic.html' title='Operators in Visual Basic'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-3780151381268033878</id><published>2009-08-23T22:18:00.000-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Structure Applications With Visual Basic Language</title><content type='html'>&lt;div class="MsoNormal" style="text-align: justify;"&gt;Basic is one of the programming language that is well known by computer users. This language can be considered as the basic programming language or the easiest to match with his name.&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;However, Basic is really name stands for B (Beginner's), &amp;nbsp;A (All - Purpose), &amp;nbsp;S(&lt;st1:place w:st="on"&gt;&lt;st1:city w:st="on"&gt;Hollywood&lt;/st1:city&gt;&lt;/st1:place&gt;), &amp;nbsp;I (Instruction), &amp;nbsp;C (Code). &lt;/div&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;br /&gt;Applications in Visual Basic 6.0 consists of the parts:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Form &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is the place to design the program by putting the objects that is a series of commands that will be done by the application.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Control &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Having a graphical form that will be placed on field work in the call form that can interact with the user, such as textbox, labelbox, CommandButton. Form and control is the object of this programming.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Properties &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is a variable or a predicate that is attached to each object. Examples of properties is the name, caption, size, color, content and position. Visual Basic provides the raw value and this value can be changed at the time the program starts.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Methods &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is a procedure that was made on each object at any time can be used in accordance with the purpose of such method. &lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Event Procedure &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is the code associated with each object, which will carry out duties in accordance with the event name in question. This code will react when there is action from the user on the object in question.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;General Procedure &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is yanng codes are not directly related to existing objects. This procedure will run when called by name in a statement the program line.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"&gt;&lt;span style="font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b&gt;Modules &lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18pt; text-align: justify;"&gt;Is a collection of some of the General Procedure, variable declarations and constant definitions used in an application.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-3780151381268033878?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/3780151381268033878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=3780151381268033878&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3780151381268033878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/3780151381268033878'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/structure-applications-with-visual.html' title='Structure Applications With Visual Basic Language'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-8956086977080085946</id><published>2009-08-23T21:22:00.001-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Understanding and Optimizing Data Types In Visual Basic 6.0</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;In Visual Basic 6 there are 11 different data types. These are Boolean, Byte, Currency, Date, Double, Integer, Long, Object, Single, String, and Variant. They each have a specific purpose and using them correctly will increase your programs performance. I am going to cover the data types most frequently used.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Boolean&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Boolean data type has only two states, &lt;b&gt;True&lt;/b&gt; and &lt;b&gt;False&lt;/b&gt;. These types of variables are stored as 16-bit (2 Byte) numbers, and are usually used for flags. For example, lets say that you have a textbox (Text1) and a command button (Command1). You only want Command1 to be Enabled when there is text in Text1. You would do something like this...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;table bgcolor="#eeeeee" style="width: 493px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="485"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;tt&gt; &lt;span style="font-family: Arial;"&gt; &lt;span style="color: navy;"&gt;Private&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt;  Form_Load()&lt;br /&gt;Command1.Enabled = &lt;span style="color: navy;"&gt;False&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;' Disables Command1&lt;/span&gt;&lt;br /&gt;Text1.Text = vbNullString&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;' Sets Text1=""&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;End&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Private&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt; Text1_Change()&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; bEnable &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;If&lt;/span&gt; Text1.Text &amp;lt;&amp;gt; "" &lt;span style="color: navy;"&gt;Then&lt;/span&gt; bEnable = &lt;span style="color: navy;"&gt;True&lt;/span&gt;&lt;br /&gt;Command1.Enabled = bEnable&lt;br /&gt;&lt;span style="color: navy;"&gt;End&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;/tt&gt;   &lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;    &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;Run the program and Command1 will only be enabled when there is text typed into Text1.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Byte&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Byte data type is an 8-bit variable which can store value from &lt;b&gt;0 to 255&lt;/b&gt;. This data type is very useful for storing binary data. It can also be very useful when sending/receiving byte values to/from a Basic Stamp or PIC.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Double&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Double data type is a 64-bit floating point number used when high accuracy is needed. These variables can range from -1.79769313486232e308 to -4.94065645841247e-324 for negative values and from 4.94065645841247e-324 to 1.79769313486232e308 for positive values.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Integer&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Integer data type is a 16-bit number which can range from &lt;b&gt;-32768&lt;/b&gt; to &lt;b&gt;32767&lt;/b&gt;. Integers should be used when you are working with values that can not contain fractional numbers.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Long&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Long data type is a 32-bit number which can range from &lt;b&gt;-2,147,483,648&lt;/b&gt; to &lt;b&gt;2,147,483,647&lt;/b&gt;. Long variables can only contain non-fractional integer values. I myself use Long variables over Integers for increased performance. Most Win32 functions use this data type for this reason.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• Single&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The Single data type is a 32-bit number ranging from -3.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for positive values. When you need fractional numbers within this range, this is the data type to use.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;• String&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; The String data type is usually used as a variable-length type of variable. A variable-length string can contain up to approximately 2 billion characters. Each character has a value ranging from 0 to 255 based on the ASCII character set. Strings are used when Text is involved.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;&lt;b&gt;Putting All Of This Technical Stuff To Use&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt; Just to show you how to use these data types, here is a small example. Lets say that we have a String containing the text, "This VB stuff is pretty darn cool..!", and we want to convert each letter to it's ASCII equivalent. We will then display each letter along with its ASCII equivalent in a MessageBox one at a time.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;table bgcolor="#eeeeee" style="width: 501px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="493"&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;tt&gt; &lt;span style="font-family: Arial;"&gt; &lt;span style="color: navy;"&gt;Private&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt; Command1_Click()&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; sText &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; lTextLength &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;Long&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; sChar &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; bASCII &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;Byte&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Dim&lt;/span&gt; x &lt;span style="color: navy;"&gt;As&lt;/span&gt; &lt;span style="color: navy;"&gt;Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;sText = "This VB stuff is pretty darn cool..!"&lt;br /&gt;lTextLength = Len(sText)&amp;nbsp;&lt;span style="color: green;"&gt;'Gets # of chars in sText&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;For&lt;/span&gt; x = 1 &lt;span style="color: navy;"&gt;To&lt;/span&gt; lTextLength&amp;nbsp;&lt;span style="color: green;"&gt;'Loop through string one char at a time&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; sChar = Mid$(sText, x, 1)&lt;span style="color: green;"&gt;'Gets the x'th charcter in sText&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; bASCII = Asc(sChar)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: green;"&gt;'Gets ASCII value of character&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; MsgBox "The ASCII value of '" &amp;amp; sChar &amp;amp; "' is " &amp;amp; bASCII&amp;nbsp;&lt;span style="color: green;"&gt;'Display results&lt;/span&gt;&lt;br /&gt;&lt;span style="color: navy;"&gt;Next&lt;/span&gt; x&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: navy;"&gt;End&lt;/span&gt; &lt;span style="color: navy;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/tt&gt; &lt;/span&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="font-family: Arial;"&gt;Now run the code and it will display one character at a time along with it's ASCII value.&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size: small;"&gt;&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/1513307506744653367-8956086977080085946?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/8956086977080085946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=8956086977080085946&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8956086977080085946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/8956086977080085946'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/understanding-and-optimizing-data-types.html' title='Understanding and Optimizing Data Types In Visual Basic 6.0'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-777961263456142818</id><published>2009-08-22T01:48:00.000-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Difference Of Basic with Visual Basic</title><content type='html'>&lt;div style="text-align: justify;"&gt;Because the Visual Basic language that offers the concept of object-oriented, then the Visual Basic offers the advantages that more of the old programming language, that is BASIC . Does not leave with all the statements used in the previous generation, Visual Basic can be cut off so many statements and instruction program to the statement in a more simple to implement instruction so long.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can mark an action to the object that is created in the Visual Basic and save the object as a collection of statements that can be directly executed.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div dir="ltr" id="result_box" style="text-align: justify;"&gt;Other merit, Visual Basic offers so much "equipment" in designing a program. You can imagine how difficult a simple BASIC language displays an image that is so complex. However, with Visual Basic this process the more easily executed.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-777961263456142818?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/777961263456142818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=777961263456142818&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/777961263456142818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/777961263456142818'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/difference-of-basic-with-visual-basic.html' title='Difference Of Basic with Visual Basic'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-7354188380964830936</id><published>2009-08-20T21:55:00.000-07:00</published><updated>2009-10-01T20:17:38.104-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download'/><title type='text'>Free Download Tutorial and Sample Program</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;b&gt;TUTORIAL&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Visual basic tutorial &lt;a href="http://www.ziddu.com/download/4391203/VisualBasic.pdf.html"&gt; download here&lt;/a&gt;&lt;br /&gt;2. Visual basic tutorial (ADODC) &lt;a href="http://www.ziddu.com/download/4391202/bukuvbl.doc.html"&gt; download here&lt;/a&gt;&lt;br /&gt;3. Visual basic sample program  &lt;a href="http://www.blogger.com/%20%20%0Ahttp://www.ziddu.com/download/6181201/source.zip.html"&gt; download here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-7354188380964830936?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/7354188380964830936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=7354188380964830936&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7354188380964830936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/7354188380964830936'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/free-download-tutorial-and-software.html' title='Free Download Tutorial and Sample Program'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-4039555787684488607</id><published>2009-08-20T21:37:00.000-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Object Oriented Programing</title><content type='html'>&lt;div style="text-align: justify;"&gt;Programming with object-oriented concept offers a simple. You can imagine what a time you want to make a car without digging up of various spare parts for each part of the car. &lt;br /&gt;Make a program with Visual Basic language can be as you make a car. In programming, object oriented, Visual Basic does not make you dizzy to make a "tire", "rearview mirror", and other from applications that want to make. &lt;br /&gt;Visual Basic does not make you dizzy just to create the application to be made. With the object that is integrated in the language, you can generate all the object program was designed to. You only pay for the charge structure of the program, but to let the visual Visual Basic handles.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-4039555787684488607?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/4039555787684488607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=4039555787684488607&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4039555787684488607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/4039555787684488607'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/object-oriented-programing.html' title='Object Oriented Programing'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1513307506744653367.post-6453612018826933037</id><published>2009-08-20T20:29:00.000-07:00</published><updated>2009-09-03T23:16:54.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Beginner Programming'/><title type='text'>Visual Basic Programming</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a href="http://2.bp.blogspot.com/_lzdaYtqTMFU/So4hLIGpQYI/AAAAAAAAAAc/Psl_Ks6npB4/s1600-h/visual-basic1.jpg" imageanchor="0" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_lzdaYtqTMFU/So4hLIGpQYI/AAAAAAAAAAc/Psl_Ks6npB4/s200/visual-basic1.jpg" /&gt;&lt;/a&gt;Visual Basic is a programming language that uses the concept of programming, "visual". The concept of "visual" offers so much convenience in designing a program.&lt;br /&gt;Microsoft Visual Basic was first introduced by the software company Microsoft Corporation. Start version 1.0, up to now in the release of Visual Basic. Net.&lt;br /&gt;What Micrososft offered as the author is quite simple, engage "face" to the BASIC language in a more modern concept, namely concept "object oriented programming" or programming that oriented on the object and based on the Windows operating system.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1513307506744653367-6453612018826933037?l=basicprograming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://basicprograming.blogspot.com/feeds/6453612018826933037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1513307506744653367&amp;postID=6453612018826933037&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6453612018826933037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1513307506744653367/posts/default/6453612018826933037'/><link rel='alternate' type='text/html' href='http://basicprograming.blogspot.com/2009/08/visual-basic-programing.html' title='Visual Basic Programming'/><author><name>Faiz</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_lzdaYtqTMFU/SqNNHPUGnqI/AAAAAAAAACs/IOndS2hTj1g/S220/FARIZ.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_lzdaYtqTMFU/So4hLIGpQYI/AAAAAAAAAAc/Psl_Ks6npB4/s72-c/visual-basic1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
