Why
How
Be sure your App.Title
(as supplied in Project|Properties|Create|Title)
(or seen in your .vbp under KeyWord: Title=".....")
is UNIQUE
Just reference the two supplied
modules:
Module_PreviousInstanceActivate.bas
Module_RTrimNull.bas
in your .vbp file.
When your form loads, you add something like:
'############################################################################################ Private Sub Form_Load() '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Me.Left = (Screen.Width - Me.Width) / 2 Me.Top = (Screen.Height - Me.Height) / 2 Me.Caption = App.Title '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If App.PrevInstance Then Call PreviousInstanceActivate(Me) Unload Me Exit Sub End If '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ..... '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End Sub '############################################################################################ |
Back to Root Index or Root Main Pages