Posts

Showing posts from May, 2012

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)