Pradip
Pradip

Reputation: 1327

VB6 application in background or invisible to end user

I want to run my VB6 application in background or invisible to user.

How can we achieve it?

Upvotes: 1

Views: 2097

Answers (1)

Bob77
Bob77

Reputation: 13267

Just write it as a formless application, or else write it to start in Sub Main() and then Load but don't Show your main Form.

Module1.bas

Option Explicit

Private Sub Main()
    Load Form1
End Sub

Form1.frm

Option Explicit

Private Sub Form_Load()
    Timer1.Interval = 5000
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
    If MsgBox("Hello", vbOKCancel) = vbCancel Then Unload Me
End Sub

Upvotes: 4

Related Questions