Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

EA server dont reopen once it minimizes.


DMF
 Share

Recommended Posts

Eclipse Reborn doesn't have this problem

I looked inside it's look like that the server use a value for chktray to know what to do if the value is set to 0 or 1

I suggest you all to look inside here some piece of codes i found there i hope this could help you get rid of this :

Server : Mod general

```

frmServer.chkTray.Value = Options.Tray

```

frmServer :

```

Private Sub chkTray_Click()

If chkTray.Value = 0 Then

DestroySystemTray

Else

LoadSystemTray

End If

Options.Tray = chkTray.Value

SaveOptions

End Sub

```

FrmServer :

```

Private Sub Form_Resize()

If chkTray.Value = YES Then

If frmServer.WindowState = vbMinimized Then frmServer.Hide

End If

End Sub

```

Public Sub saveoptions (ModDatabase)

```

PutVar App.Path & "\data\options.ini", "OPTIONS", "Tray", STR(Options.Tray)

```

Public Sub LoadOptions (ModDatabase)

```

Options.Tray = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Tray")

```

Init server under OPTIONS. MOTD

```

Options.Tray = 0

```

ModSysTray public sub destroysystemtray

```

Public Sub DestroySystemTray()

nid.cbSize = Len(nid)

nid.hWnd = frmServer.hWnd

nid.uId = vbNull

nid.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE

nid.uCallBackMessage = WM_MOUSEMOVE

nid.hIcon = frmServer.Icon

nid.szTip = "Server" & vbNullChar

Call Shell_NotifyIcon(NIM_DELETE, nid) ' Add to the sys tray

End Sub

```

Public LoadsystemTray

```

Public Sub LoadSystemTray()

nid.cbSize = Len(nid)

nid.hWnd = frmServer.hWnd

nid.uId = vbNull

nid.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE

nid.uCallBackMessage = WM_MOUSEMOVE

nid.hIcon = frmServer.Icon

nid.szTip = "Server" & vbNullChar 'You can add your game name or something.

Call Shell_NotifyIcon(NIM_ADD, nid) 'Add to the sys tray

End Sub

```

I don't know if that could help but you can see how is working ?
Link to comment
Share on other sites

DMF ^^ don't use it directly i said i found pieces i'm not sure that all the code is here actually maybe it need some edits too?

i just put it here so someone could find the right way to make them tray using a value (0 / 1) like Eclipse Reborn one
Link to comment
Share on other sites

> Error at :Private Sub Form_Resize()
>
> Error:Ambiguous name detected: Form_Resize.

That means there was already a Private Sub Form_Resize() in your code and instead of editing that with the code clark posted you just added another Private Sub Form_Resize() which is causing a bug because you can't have two subs with the same name in the same file.
Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
Omg.. I found the solution 

I'm not sure for all cases, but for my case it worked. 

Try changing the TOP value the SSTab1 FrmServer. 

The TOP value must be equal to or greater than 10. 

If less error happens, if it works normally higher 

I hope I have succeeded in helping
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...