Author Topic: Notify Icon  (Read 4505 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« on: January 13, 2010, 12:54:03 PM »
With the notify icon, when you minimise the program to the taskbar, it opens the program when you move the mouse over it, this gets a little annoying after a while. Is the any chance you can change it to double click.

Damn just done it again!!! :@
« Last Edit: January 13, 2010, 12:54:34 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Notify Icon
« Reply #1 on: January 13, 2010, 03:05:23 PM »
Yeah, it's a pain.  When I added "ninja mode" (that icon that triggers it is a ninja btw) I couldn't figure out how to do a right click menu.  Or even have it pop up after a click.  Something odd to do with how VB6 works.

If I have some time in the next few weeks I'll take a look at it.  It's been bugging me too.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #2 on: January 13, 2010, 03:21:15 PM »
I can do the right click but only in Microsoft Visual Studio 2010, are the files intercompatible or is it just backwards compatiblity or is it neither?

EDIT> I love that ninja
« Last Edit: January 13, 2010, 03:22:05 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Notify Icon
« Reply #3 on: January 13, 2010, 04:08:18 PM »
VB6 doesn't support that stuff natively, so I have to do raw calls to the Win API, which are always error prone.  If you've ever done C++ WinAPI coding you could take a look at how the VB6 code is doing it and see if you can tweak it to work correctly.  The VB code is here.  Not sure which file to look in though.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #4 on: January 13, 2010, 04:53:54 PM »
I have a version of VB6 somewhere, I'll have to dig it out. I'll get back to you later.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Notify Icon
« Reply #5 on: January 13, 2010, 09:32:21 PM »
If you can't find a version there's a download of VB6 on the web site I can point you to.  But it's pretty gimped.
« Last Edit: January 13, 2010, 09:32:33 PM by Numsgil »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #6 on: January 14, 2010, 12:31:30 PM »
I have found it, it is just whether or not the CD will work.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #7 on: January 14, 2010, 12:54:58 PM »
Any idea which one it is? or... will I have to find it myself?

EDIT>Will you want a right click menu or shall I just create it so you can click on it?
« Last Edit: January 14, 2010, 01:04:21 PM by Panda »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Notify Icon
« Reply #8 on: January 14, 2010, 06:49:03 PM »
If you can figure out a right click menu than great. If not, them single click is fine.  Let me know if you get it working and tested, and I'll give you write access to the repository.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #9 on: January 16, 2010, 03:19:52 AM »
What will people rather for now, single or double click to get darwinbots to appear from stealth mode?

EDIT: That means it is working and atm it is doubleclick but I can change it to any one you want.
« Last Edit: January 16, 2010, 03:30:58 AM by Panda »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #10 on: January 16, 2010, 04:30:07 PM »
Just found out that it doesnt work when you build it into an .exe but works fine during debug.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
Notify Icon
« Reply #11 on: January 16, 2010, 05:03:02 PM »
That's weird.  I don't have any brilliant ideas unfortunately.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Notify Icon
« Reply #12 on: January 16, 2010, 05:07:24 PM »
Quote from: Panda
Just found out that it doesnt work when you build it into an .exe but works fine during debug.
Sounds like threading issues, although even that sounds dubious (is graphics and logic handled in separate threads?). Sometimes all is needed is a tiny time offset and things that refused to work for inexplicable circumstances magically do. The debug scenario is usually a big clue when going step-by-step.
« Last Edit: January 16, 2010, 05:08:10 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Notify Icon
« Reply #13 on: January 16, 2010, 05:08:20 PM »
I have worked out why it is
Code: [Select]
Private Sub OwnerForm_MouseMove(button As Integer, Shift As Integer, X As Single, Y As Single)
    Static rec As Boolean, MSG As Long
    
    MSG = X / Screen.TwipsPerPixelX
    Debug.Print ("WM_LBUTTONUP:" & WM_LBUTTONUP)
    Debug.Print ("MSG:" & MSG)
    Debug.Print ("X:" & X)
    Debug.Print ("Screen.TwipsPerPixelX:" & Screen.TwipsPerPixelX)
    
    If rec = False Then
        rec = True
        Select Case MSG
            Case WM_LBUTTONDBLCLK:
                'RaiseEvent MouseDown(1)
            Case WM_LBUTTONUP:
                RaiseEvent MouseDown(1)
            Case WM_RBUTTONDBLCLK:
                'RaiseEvent MouseDown(1)
            Case WM_RBUTTONUP:
                'RaiseEvent MouseDown(1)

        End Select
        rec = False
    End If

The "X" changes at different points to different numbers, I am not sure if it changes to the same every single time.

EDIT: Dunno how to fix it though. Bacillus, you where saying something about the threading. I have no idea about the treads. The "X" changes when you start a new simulation both inside and outside the debug and the numbers created are different to eachother everysingle time inside the debug, outside the debug they are the same as eachother, but different from inside the debug.
« Last Edit: January 16, 2010, 05:43:50 PM by Panda »

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Notify Icon
« Reply #14 on: January 16, 2010, 05:43:19 PM »
I'm not sure I understand the connection between mouse events and screen resolution though, and this language (VB?) is uncharted territory for me...
« Last Edit: January 16, 2010, 05:44:12 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan