Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Slight Multi Monitor & Mouse Problem

Author
Message
CodemanV
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: South Wales Valleys, UK
Posted: 30th Aug 2005 15:38
Hello. I have a multi-monitor setup (2 graphics cards with 2 monitors connected to each)

QUICK SYSTEM SPEC
CPU = AMD Athlon XP 2100+,
GFX Card 1 = AGP 4X, ASUS Nividia GEForce Ti-4 128mb RAM
GFX Card 2 = PCI SLOT, Appian Gemini 16MB Dual Monitor Card (1999ish)
RAM = 512mb
O/S = WinXP Home Edition SP2 - all current updates and device drivers installed
S/W = DBPro Trial (waiting for boxed full version)

MONITOR SETUP
This spec bit might not be relevant but it might be.

In order for me to use all the monitors I have had to setup my PC like this.

BIOS boots graphics from PCI not AGP.
The Nvidia AGP takes over the PCI during PC boot sequence but if I boot from AGP then the PCI card is not recognised as connected in Device Manager. I have to boot from PCI graphics in order for PC & AGP to recognise that the PCI card is connected.

Monitor Order and NVidia ID Numbers

Here is how the monitors are aligned from left to right

[Mon1 & 2] [Mon3 (Primary) & Mon4]
Appian PCI ASUS AGP
NVID #1 NVID #3 NVID #2


NVidia only recognises 3 monitors even though there are 4. Monitors 1 & 2 are actually one display set at 2048 x 768 which then spans over the two monitors.

I have DBPro running on the primary AGP display which has all the H/W acceleration and stuff. I can't rearrange them due to room shape, cable lengths and wall-socket placements.

I have no problems running 3D apps like DBPro, TrueSpace 5.2, 3D Canvas, Tiger Woods PGA Tour 2005, Doom 3, Max Payne, GMAX and a whole host of others. It's the mouse cursor I have an issue with.

The problem occurs when I am running a DBpro project and using the mouse to navigate around the DBPro screen during gameplay.

If I move the mouse off the DBPro screen, the WINDOWS mouse cursor appears on another monitor and activates the desktop when I click the mouse, whether it's to shoot something or to use an item or to bounce a ball. I have to go back and click on the DBPro window to reactivate it and continue testing.

Is there anyway I can lock the Windows mouse cursor while running a program in DBPro so that it stays in the Primary Display only? I've tried keeping the DBPro window "On top of other windows" but technically it is, it just only stays on top of the primary display.

Seems a long post for such a small question, my apologies but if anyone is able to answer me then they need to know what I am using.

Any more info needed and I will be happy to supply it (apart from home address, bank details, nude pics of partner, nude pics of me, etc)

btw I have only been using DBpro for a few days. There might be an easy solution to this somewhere but I searched the forums to no avail.

Thanks for any advice or tips offered.

Happy programming
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 30th Aug 2005 19:44
If MouseX() > Screen Width() Then Position Mouse Screen Width(),MouseY()

TDK_Man

CodemanV
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: South Wales Valleys, UK
Posted: 30th Aug 2005 21:07
Dear me, that simple. Thanks!

I'm still going through all the DBPro commands. I'll get the hang of it, DBPro is becoming easier every hour I put in so there is hope.

I also thought the cursor wasn't detectable by DBPro when it left the DBPro environment. DOH!

I was thinking about importing the Win32 DLL for mouse manipulation commands and using that. I dunno if it could be done that way also. First, I need to learn how to crawl before I can walk though

Anyway, here is a very simple code snippet in case anyone has similar problem. The sub-routine is called during a DO LOOP so the cursor is updated every cycle of the loop.

Not a perfect solution as it seems to skip sometimes. But OK for now.

It is also possible to alter the ranges so that the cursor stays in an area on the screen like a selected control panel or something like that.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 30th Aug 2005 23:48 Edited at: 31st Aug 2005 00:35
Doh, I really wish someone would remove the ability to post (or not as the case actually is), code in this way. It's starting to annoy now!

CodemanV, as you haven't looked at (m)any other posts, you won't be aware that you need to use the code button (above) to include code.

Click once, paste in your code and click again to close the tags.

Quote: "It is also possible to alter the ranges so that the cursor stays in an area on the screen like a selected control panel or something like that."


Yes, in exactly the same way - get the mouse X and Y position and just say

If X<MinXPos Then Position Mouse MinXPos,MouseY()
If X>MaxXPos Then Position Mouse MaxXPos,MouseY()
If Y<MinYPos Then Position Mouse MouseX(),MinYPos
If Y>MaxYPos Then Position Mouse MouseX(),MaxYPos

TDK_Man

CodemanV
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: South Wales Valleys, UK
Posted: 31st Aug 2005 03:19
Quote: "CodemanV, as you haven't looked at (m)any other posts, you won't be aware that you need to use the code button (above) to include code.

Click once, paste in your code and click again to close the tags."


lol - I thought that button was for custom HTML or something

<code> works just like <quote> but for source-code - I'll remember that

Now and then the cursor leaves DBpro screen and DBpro loses the mouse so the MouseX and MouseY values don't change in DBPro, even though mouse is moving on desktop.

My work around was to make the maximum limits slightly more or less than the screen limits - still skips a bit but it's just a bit of fine tuning needed, nothing major.



Thanks for the help though - I think I'll be taking a while to get to grips with DBPro - most of it it's seems quite straight forward but there's a lot more you can do with DBPro than I initailly thought.

Still, more for me to play with.

Right, I'm off to bed now as tomorrow I am going to rewrite the whole of Doom-3 in DBPro Trial - as if!

Night night TGC Forums!

Login to post a reply

Server time is: 2024-09-24 03:25:30
Your offset time is: 2024-09-24 03:25:30