Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-monitor taskbar
#1
Adds taskbar to monitor 2 or 3 or 4...


Attached Files
.qml   Multimonitor taskbar.qml (Size: 8.93 KB / Downloads: 877)
#2
Gintaras,

This is beautiful work. It's going to take me a month or more to deconstruct your work. You are definitely using a lot of things I've never seen before.

Here are my first impressions:
Needs a way to move the tool bar to another monitor. (For users who go change which monitor is their primary in display settings. So when they run the executable they can bounce it over to the other monitor) Can it be done in MMT_wm_notify:
Code:
Copy      Help
,,if(i<0 or i>=v.a.len) ;;not on button
,,,sel PopupMenu("Close Taskbar[]Move Monitor")
,,,,case 1
,,,,DestroyWindow v.hwnd
,,,,case 2
,,,,MoveWindowToMonitor v.hwnd 2
I can't figure out exactly how to position the window at the bottom of the screen when moving from one monitor to the other.
Also would need to refresh the windows...when move like this from screen 1 to screen 2, taskbar still shows windows open on screen 1.
The program should save the settings of which monitor to open on so users will not have to bounce it over every time the exe is opened (exe will probably be in the startup folder.)

Remove windows open on secondary monitor from primary taskbar...I'm guessing this would be in the MMT_GetWindows function?
Plan on using a trigger CTRL+SHIFT+LClick to toggle windows between both monitors so would need to put window back in primary taskbar when toggled to primary screen. So...how to register hotkey for executable automatically that will do this? The Multimonitor Taskbar window will be able to receive the CTRL+SHIFT+LClick trigger in an executable, right?

Button activates restore/minimize toggle by button state. I've tried to figure out if there is a message in MMT_wm_notify nh.code that will state if the the button is inactive after a click...I don't know how the buttons work well enough. I've found how to know if the button is active to restore the window...which already happens, but to minimize based on a inactive state is not so obvious. You probably have a slick way of doing this that will blow my mind...like the rest of this Multimonitor Taskbar program!! The button does go inactive, so there must be something to grab that will minimize the window. I've been spinning wheels for a couple hours trying to figure it out!

A Pseudo-Start Menu. It would be nice to have a start button that has common programs to open on the secondary monitor that is user defined and customizable. Maybe could put a "Send-To" program that will register files and programs for the Multimonitor Taskbar to display in it's pseudo-start menu that will open on secondary monitor. Definitely drag-drop icons into the menu would be a must! I guess being able to arrange the orders of the icons would be cool.

Thanks bunches for your work on this. It is very awesome. I'll keep trying to figure this out.
Jimmy Vig
#3
Another thing that drives me nuts about two monitors is the mouse running over to the other screen when I am trying to use a scroll bar or something.

Is there any way to lock a mouse on to a certain monitor? And then maybe have a key combination that will allow it to move to the other screen? Like the mouse will stop at the edge of Monitor 1 unless you hold down the CTRL key...then it will mover to Monitor 2.

Also how do you jump a mouse to the center of a specified monitor? I was thinking it'd be nice to use a FF_function:
Code:
Copy      Help
/
function# iid FILTER&f

int+ g_mousembtime=GetTickCount
ret iid

Code:
Copy      Help
int+ g_mousembtime
if(GetTickCount-g_mousembtime<500) ret
MoveMouseToMonitor 1;;something like this.

Thanks bunches,
Jimmy Vig
#4
small interlude:
i am very happy that there is some fresh development for that.

ginti, is your example set to show classic view?
the taskbars are not themed :mrgreen:
:wink: Idea :wink:
pi
#5
_pi...

I just got around to using two monitors at home and they upgraded my studio at work to have two as well. I love it, but I'm not really hip to keeping it all organized...I end up losing so much time sifting through windows and dragging them into place...and losing my mouse! Definitely with QM we'll be able to get a two monitor system licked into shape! I'm super excited!

Thanks,
Jimmy Vig
:o Smile Big Grin :lol:
#6
Now I'm going to sleep, just uploaded new version. Now makes correct work area.
#7
Thanks Gint.

I was going to mention the work area problem...I got wrapped up in all the other stuff.

Thanks again,
Jimmy Vig
#8
Quote:Needs a way to move the tool bar to another monitor.

Function MMT_wm_notify
Code:
Copy      Help
,,,sel PopupMenu("Close Taskbar[]Move to other monitor")
,,,,case 1
,,,,DestroyWindow v.hwnd
,,,,case 2
,,,,if(v.monitor=1) v.monitor=2; else if(v.monitor=2) v.monitor=1
,,,,MMT_SetPos

Quote:The program should save the settings of which monitor to open on so users will not have to bounce it over every time the exe is opened (exe will probably be in the startup folder.)

Use rset/rget to save/restore v.monitor.

Quote:Remove windows open on secondary monitor from primary taskbar...I'm guessing this would be in the MMT_GetWindows function?

I remember several posts about removing taskbar buttons. Maybe it is in Archive.qml.

Quote:Plan on using a trigger CTRL+SHIFT+LClick to toggle windows between both monitors so would need to put window back in primary taskbar when toggled to primary screen. So...how to register hotkey for executable automatically that will do this? The Multimonitor Taskbar window will be able to receive the CTRL+SHIFT+LClick trigger in an executable, right?

For mouse triggers need low level mouse hook. Look for examples in forum. Much easier if it is keyboard trigger. Look for RegisterHotKey in forum and internet.

Quote:Button activates restore/minimize toggle by button state. I've tried to figure out if there is a message in MMT_wm_notify nh.code that will state if the the button is inactive after a click...I don't know how the buttons work well enough. I've found how to know if the button is active to restore the window...which already happens, but to minimize based on a inactive state is not so obvious. You probably have a slick way of doing this that will blow my mind...like the rest of this Multimonitor Taskbar program!! The button does go inactive, so there must be something to grab that will minimize the window. I've been spinning wheels for a couple hours trying to figure it out!

Read in MSDN: TB_ISBUTTONCHECKED etc. To log messages, use OutWinMsg.

Quote:Is there any way to lock a mouse on to a certain monitor?

Mouse can be locked to any rectangle. Look for ClipCursor.

Quote:ginti, is your example set to show classic view?
the taskbars are not themed

I would never make it look like Win7 taskbar. Difficult even to make like XP.
#9
Updated:
Removes buttons from Windows taskbar.
Saves last used monitor index.
#10
ClipCurser does not work in QM.

dll user32.dll #ClipCurser --> Error in Function58: function not found.

Is this a problem with my system, or am I doing it wrong.

Thanks,
jimmy Vig
#11
I don't know such function Smile
#12
SPELLING ERROR! Man, that drove me nuts all morning. I read and read and read...did I check my spelling? No!
Function LockMouseToMonitor
Code:
Copy      Help
;GetMonitorFromPoint
POINT p; xm p
RECT r
int mon=MonitorFromPoint(p 0)
int i=MonitorIndex(mon)
MonitorFromIndex(i 0 &r)
ClipCursor(&r)
0.15
ifk((VK_CONTROL))
,GetVirtualScreen(int'x int'y int'w int'h)
,r.bottom=x; r.right=y; r.top=w; r.left=h
,ClipCursor(&r)
,wait 0.1 K (VK_CONTROL);err
goto GetMonitorFromPoint
#13
Gintaras,

Need to resize buttons when number*button size extends beyond monitor size. Is there anyway to do this? I'm gonna toy around with it.

Thanks,
jimmy Vig
#14
Updated.
#15
Terrific!


Forum Jump:


Users browsing this thread: 1 Guest(s)