| Mirage Source http://miragesource.net/forums/ |
|
| Allow Only One Instance of Client http://miragesource.net/forums/viewtopic.php?f=210&t=70 |
Page 1 of 1 |
| Author: | Tutorial Bot [ Thu Jun 01, 2006 9:59 pm ] |
| Post subject: | Allow Only One Instance of Client |
Author: Dragoons Master Difficulty: 1/5 See also: http://www.key2heaven.net/ms/forums/viewtopic.php?t=59 :: CLIENT SIDE :: Add this into modGameLogic: Code: Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Add this on top of Sub Main(): Code: Call MultiClient Add this sub into modGameLogic: Code: Sub MultiClient() Dim GameClient As Long Dim OldAppName As String OldAppName = App.Title App.Title = "" GameClient = FindWindow(vbNullString, OldAppName) App.Title = OldAppName If App.PrevInstance = True Or GameClient <> 0 Then Call MsgBox("Client already running!", vbExclamation, "Error") End End If End Sub That's all! |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|