VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This sample program demonstrates how to add controls on a form using only code at run-time.

Junel Corales  (2 Submissions)   Custom Controls/Forms/Menus   VB 6.0   Unknown Difficulty   Tue 15th August 2000   Mon 8th February 2021

This sample program demonstrates how to add controls on a form using only code at run-time.

API Declarations


'Note: this program is my own work and please don't take credit for it
'For any suggestions and comments, just e-mail me at [email protected]
'this sample program demonstrate on how to add controls on the form using codes
'it also demonstrate on how to restart your pc within your programs.


'Note: This is the declaration section of form1-name it frmtimer


Option Explicit

'declares the controls
Private WithEvents txttime As TextBox
Private WithEvents mytimer As Timer
Private WithEvents mylabel As Label
Private WithEvents cmdclose As CommandButton
Private WithEvents StatusBar1 As StatusBar

Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, _
ByVal dwReserved As Long) _
As Long

Const EWX_REBOOT = 2

'*******************************

'Note: Declaration Section of form2-name it frmgoodbye
Option Explicit

Private WithEvents mytimer As Timer
Private WithEvents mylabel As Label




Rate This sample program demonstrates how to add controls on a form using only code at run-time. (1(1 Vote))
This sample program demonstrates how to add controls on a form using only code at run-time..bas

This sample program demonstrates how to add controls on a form using only code at run-time. Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters