Posts

Showing posts from 2012

Visual Basic Online Course - Understanding the control resizing method

 Visual Basic Online Course How does (Re-sizing) work ? Download the example ( MediaFire.com link ) Understanding how resizing controls work ! The basic Idea of resizing : When resizing : Control Width grows and shrinks when form (Container) grows and shrinks with (Module). The (Modu) is the growing or shrinking Module .... Let say we have  a control (Width = 10) on a form (Width = 20) then (Control : Width) = (10 : 20) So when resizing the (form to = 40) then the (Control will grow to = ???) --------- Answer :    ( 10 : 20 ) = ( ??? : 40)    ??? = 20 , Why ? Because the (Modu = [40 / 20]), then the ??? = 10 * Modu ??? = 20 ......... And so on ... In the example attached you will notice that resizing the form with cause resizing the control as well. Thanx for reading ♥ V isual B asic 6.0 Course Online : Automate MS-Access Database in Visual Basic 6.0 though a net work Visual Basic 6.0 Analog Clock Vi sual Basic 6.0 Temperature Convertor Visual Basic

Visual Basic Online Course - ProgressBar Colors

Image
Visual Basic Online Course How to change the ProgressBar colors by code Progressbar The ProgressBar control in Visual Basic 6.0 is replaced by the Windows Forms ProgressBar control in Visual Basic 2005. The names of some properties, methods, events, and constants are different, and in some cases there are differences in behavior. Conceptual Differences Negotiate Property In Visual Basic 6.0 , the Negotiate property of a ProgressBar control can be used to automatically hide the control when a toolbar is displayed. The Visual Basic 2005  ProgressBar control does not have a Negotiate property; you can achieve the same effect by setting the Visible property to  false at run time. Orientation Property In VB 6 , a Progress Bar control can be displayed either horizontally or vertically by setting the Orientation property. The Visual Basic 2005  ProgressBar control can only be displayed horizontally. Create New (Module) Then in the form_load

Visual Basic Online Course - WildCards in Database

Visual Basic Online Course Using Wild Cards when searching Database Problem : I have 50 records of mobile phone numbers and they start with different digits according to network area code, I want to search the [MobileNo] record from [TextBox] so when I write the first digit i get some search result and the second digit returns the next search result .... etc as i go, using TextBox1_Change() event, i want when every time i type a digit i get a result in the DataGrid control Solution   :  Using ADO + MS-Access 2003 + Sql Statements That means : Search all records that contain these values within. But, If you want to search for records start with certain values, then use : And, If you want to search for records end with certain values, then use : ♥ V isual B asic 6.0 Course Online : Automate MS-Access Database in Visual Basic 6.0 though a net work Visual Basic 6.0 Analog Clock Vi sual Basic 6.0 Temperature Convertor Visual Basic 6.0 , MS-Access 2003 and Cry

Visual Basic Online Course - Run-time error '3021' : Either BOF or EOF is True, or the current record has been deleted.

Image
Visual Basic Online Course Run-time error '3021' : Either BOF or EOF is True, or the current record has been deleted. C ase : In Visual Basic 6.0 project with Database (e.g: MS-Access 2003) table, while trying to navigate through records you get the following error message. E rror No. : 3012 E rror description : Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record Solution : ♥ V isual B asic 6.0 Course Online : Automate MS-Access Database in Visual Basic 6.0 though a net work Visual Basic 6.0 Analog Clock Vi sual Basic 6.0 Temperature Convertor Visual Basic 6.0 , MS-Access 2003 and Crystal Reports - Phone book Visual Basic 6.0 , MS-Access 2003 Database and DataGridView Visual Basic 6 .0  FTP full application source code Visual Basic 6.0 Color Picker tool source code Visual Basic 6.0 TreeView Control lesson ( Part1 - Part 2 - Part3 - Part4 - Part5 ) Arabic. Visual Basic 6.

Visual Basic Online Course - Retrieve Structure of a Database Tables and Views

 Visual Basic Online Course  OpenSchema O penSchema M ethod How do I list all Views only, from within my Database ?  - Retrieve all the Queries/Views only from MS-Access 2003 Database into VB6 using the code. Using OpenSchema Method Example Code : - If you wish to list all the tables only, then change this line : If RS!TABLE_TYPE.Value = " VIEW " Then To If RS!TABLE_TYPE.Value = " Table " Then - If you wish to list all Tables and Views. Simply remove the "If , Else" Statement. Regards, Evry1falls ♥ V isual B asic 6.0 Course Online : Automate MS-Access Database in Visual Basic 6.0 though a net work Visual Basic 6.0 Analog Clock Vi sual Basic 6.0 Temperature Convertor Visual Basic 6.0 , MS-Access 2003 and Crystal Reports - Phone book Visual Basic 6.0 , MS-Access 2003 Database and DataGridView Visual Basic 6 .0  FTP full application source code Visual Basic 6.0 Color Picker tool source code Visua

Visual Basic Online Course - Create FTP

Image
Visual Basic Online Course - Create FTP Client VB6 Ftp Client In this project we shall discuss using Microsoft Internet Transfer Control or (INET.Ocx) to : Connect to FTP remote server. Retrieving main/sub directories from FTP remote server. Retrieving files from FTP remote server. Uploading file to FTP remote server. Downloading file from FTP remote server. Make new directory (folder) at FTP remote server. Rename & Delete file from FTP remote server. In this project we won't be using API calls (i.e. INET API) also we will cover these issues : The Spaces problem while downloading and uploading files. Error message "Still executing last request" number 35764. Error message "File exists" Application Hangs up after ending it. Using TreeView control to list all the Directories on the FTP remote server. Using ListBox control to list all files on the FTP remote server related to above folder. The

Visual Basic Online Course - MS Access 2003 Database Structure

Image
Visual Basic Online Course MS Access 2003 Database Structure These are 2 methods on how to work with MS-Access 2003 Database components directly like (Tables & Queries) without opening your Data-Base file using ADO 2.8 . 1) Using OpenSchema - Create new MS-Access 2003 DB (MyDb.mdb) - Create VB6 Project - Database (Fname Text 50,Lname Text 50, Nphone Text 50, Xemail Text 50) - Place both in the same directory of course. - Open your VB6 Project, from menu choose (Project, References, Microsoft Ado 2.8 and Microsoft ADOx) click to enlarge - Visual Basic Code Snippets : Source Code - MediaFire.com Link ♥ V isual B asic Course Online : Automate MS-Access Database in Visual Basic 6.0 though a net work Visual Basic 6.0 Analog Clock Vi sual Basic 6.0 Temperature Convertor Visual Basic 6.0 , MS-Access 2003 and Crystal Reports - Phone book Visual Basic 6.0 , MS-Access 2003 Database and DataGridView Visual Basic 6 .0  FTP full application source code

Visual Basic Online Course - Auto translate your application's Language before compiling

Image
  Visual Basic Online Course Auto translate your application's language vb6-translate-application-controls  Using Conditional Compilation Conditional compilation lets you selectively compile certain parts of the program. You can include specific features of your program in different versions, such as designing an application to run on different platforms, or changing the date and currency display filters for an application distributed in several different languages. Structuring Code for Conditional Compiling To conditionally compile a part of your code, enclose it between #If...Then and #EndIf statements, using a Boolean constant as the branching test. To include this code segment in compiled code, set the value of the constant to –1 (True). For example, to create French language and German language versions of the same application from the same source code, embed platform-specific code segments in #If...Then statements using the predefined constants con

Visual Basic Online Course - How to make sure all TextBoxes on form are not empty

Visual Basic Online Course  How to check if all TextBoxes on form are Empty or not ?! - In VB.Net it is easy to check if all textboxes values are empty or not, but in Visual Basic 6.0 it is quite tricky because there is no (String.IsNotNullOrEmpty) in VB 6.0. - Let say you have VB 6.0 Project with Database of any sort, your VB6.0 Project has many TextBoxes (i.e. 15 TextBoxes), and you're adding 10 textboxes contents into a database table fields, and all of them are required (*), so you can do something like this : You'd need something more flexible and not too long to write every time, also you'd need something dynamic. - Or - I've found this page that solved the problem for me and i thought that it would be helpful to share it . Here is the link And you can add this block of code to a sub and use it, or even a function . But this is not gonna help you if you decided to change your logic of adding data to database.

Visual Basic Online Course - How to create a Count Down Timer OCX file Source Code

Image
Visual Basic Online Course - How to create a Count Down Timer OCX file Source Code vb6 OCX countdown timer source code Steps to create a count down timer OCX In Visual Basic 6.0 Introduction Creating a count down timer can be tricky even for an advanced programmer, the idea of a counter is almost the same except we count down in this case, counting up as a default counter relies on adding (1) to the value of an integer variable in a timer tool, and the best example for this is the (Clock / Timer) where you put: Label1.Caption = Now in a timer control whose interval is (1000 ms) and finaly in (Form_Load) event you triger the (Timer1_Timer) event by setting its (Enabled) value = (True). Logic In our example (The Count Down Timer) we don't just inverse the previous process, we create a new method as shown in the source code. The idea of a count down timer is : variable integer = value minus (-1, -2, -3, ......) another integer variable in a timer i.e. (Sec)