Visual Basic 6.0 translation

Tuesday, January 8, 2013

Visual Basic Online Course - Prevent VB6 Application from run twice

Visual Basic Online Course

Limit your application

Limit Your Application
Visual Basic Online Course - Limit Your Application
- Some applications are free trials and they're controlled using code. If you want to limit your application abilities on the client machine, then you will find those ideas great, regardless the Visual Basic Version I'm using VB6, you can still use them in .Net too.

1) Limit your VB6 Application to a certain number of times to run on the client's machine, seems sometimes to do the trick but it also can be modified easily, means your limitations can be broken easily if your client have some knowledge about programming or asked for help from a programmer. But as long as the idea is kept hidden and unknown inside the Source Code, then it would be hard to be discovered anyway. You can also limit your VB6 application setting a start Date and End Date instead of the values given in the source code below.

2) Limit your VB6 application running once only. Some application can not run more than one interface specially those which connects to a Database because you don't want to duplicate connection to an already opened Database or Tables. You will need to limit your application to only run single instance or prevent your VB6 Application from running more than once.
You will need to do those steps though,
- Add Module Module1.bas, copy the following code into it.
- Then, from Menu Project, Project Properties, Start Up Object, choose Sub Main

You can also use the 1st example to prevent your application from running twice at the same time, but the second example is much more secure then the 1st one.

Thursday, January 3, 2013

Visual Basic Online Course - ListView, Element not found while removing items

Visual Basic Online Course

ListView,  Element not found while removing items

In VB6 If you tried to remove items from ListView Control, you may get this error :
Run-Time Error '35601':
 Element not found.

Example :

Code :

Error :
Executing the previous example will cause error '35601' when trying to remove the next Item from list view items.

Solution :
Simple error trap will fix the error



Tuesday, January 1, 2013

Visual Basic Online Course - Function Keys (F1 to F12)

Visual Basic Online Course

Function Keys


In VB6 ,in order to use the F-Keys (Function Keys) from your Keyboard or even any key, you need to set the form property [Key Preview] value to True .
Open new form [Form1]
Right-click on [Form1], View Code
The event [Form1_KeyDown]

Create Sub (I.E.: MyKey)

Go to [Form_KeyDown(KeyCode As Integer, Shift As Integer)], and write these lines:

Try out your application [Run your project] and after the form loads, press F5.


Thanx for reading

Visual Basic Online Course

vb6 (63) Application Development (45) Visual Basic Online Course (45) Online Visual Basic Course (44) Visual Basic Help (44) Visual Basic Programming (42) IT Jobs (39) VB6 developer (38) Visual Basic Course (38) Visual Basic 6.0 (26) Microsoft Visual Basic 6.0 (25) VB6.0 (24) Visual Basic Programmers (24) vb 6.0 (24) visual basic programming tutorial (19) Third lesson (16) Source code download for Visual Basic 6.0 (14) Source code for Visual Basic 6.0 (10) visual basic tutorial (9) Visual Basic 6 (5) Visual Basic Courses (5) Lesson 3 (4) VB 0.6 - TreeView control (4) VB 0.6 With TreeView Control (4) VB6 Course (3) Create ActiveX (2) How to automate MS-Access from Visual Basic 6.0 (2) Add controls at runtime (1) Back up your Database (1) Change ActiveX icon (1) Change screen resolution (1) Create FTP (1) Crystal Reports 4.6 (1) Crystl32.ocx could not be loaded (1) DataGrid Columns re-size (1) Date Calculation (1) DateAdd Function (1) DateDiff function (1) FTP (1) Marquee Title Bar (1) Marquee VB 6.0 TitleBar (1) Method 'Action' of object 'CrystalCtrl' Failed (1) Microsoft Access with Visual Basic 6.0 (1) OpenSchema method (1) Save File Using CommonDilog (1) Track Database path (1) VB 0.6 - Registry (1) VB 0.6 With Registry Editor (1) VB 6.0 Access (1) VB 6.0 OOP (1) VB6 Access2003 ADO Like % (1) VB6 Add Date (1) VB6 Add Time (1) VB6 Date calculation (1) VB6 Subtract Date (1) Visual Basic Remote (1) Win7 (1) Windows7 (1) ms access networking details (1) remote Visual Basic DB (1) rounded and transparent forms (1) vb 0.6 style (1) vb 6.0 Remote Database (1)