Does anyone know how to do single instance in VB.. Pls help me...

Recommended Answers

All 4 Replies

Member Avatar for Dukane

What exactly are you asking? Please describe the problem better.

I don't think there is any one specific way to limit a program to a single instance. Some use a registry entry to determine if there is an instance already running, while others use a file or create a system-wide semaphore (see MSDN for CreateSemaphore() win32 api function)

> Does anyone know how to do single instance in VB.. Pls help me...

Are you talking about creating class instances in a VB program... ?

Hi,

Use this Code :
In ur MDIFormLoad Or the StartUp Form Load.

Private Sub MYMDIForm_Load()
    If App.PrevInstance Then
        End
    End If
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.