Solved

Using 2 videCards with 2 monitors in NT 4.0

Posted on 1999-01-18
13
236 Views
Last Modified: 2010-04-06
I have made two programs that will be running in the same machine showing diferent information. This machine is running under Windows NT 4.0, and it has two videocards and
two monitors. I have to show the videooutput of each program to each videocard. Is this posible???
How can I made it in Delphi?
Thanks in advance, and sorry but I'm from Spain and my English is note very good... :(
0
Comment
Question by:pelegrin
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1362338
There is native support for it in D4, what version are you using?
0
 
LVL 3

Expert Comment

by:CyberSoft
ID: 1362339
Take a look at the Microsoft Knowledge Base - DISPLAY.TXT file information : http://support.microsoft.com/support/kb/articles/q188/4/81.asp

As well as "ARTICLE-ID: Q179602 TITLE : How to Enable Multiple Display Support Using Windows 98" : http://support.microsoft.com/support/kb/articles/q182/7/08.asp

I know it's Windows 98 articles - but from there you could perhaps find more info on NT using multiple monitors.

Hope this helps
CyberSoft

0
 

Author Comment

by:pelegrin
ID: 1362340
I need info about NT and multiple monitors and the posibility of doing it with Delphi and  the info you gave me it's about only Windows 98.

0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1362341
What Delphi version are you using??
0
 

Author Comment

by:pelegrin
ID: 1362342
I'm using Delphi 3.0, but If the solution is Delphi 4.0 I will use Delphi 4.0. I expect that the programs made with D3 will work fine in D4... :)
I have visited Borland's page and I found that D4 can use the multiple monitor capabilites of Windows 98, but what happends with NT 4.0?? It's posible??
0
 
LVL 3

Expert Comment

by:CyberSoft
ID: 1362343
Perhaps NT 4 doesn't support multiple monitors yet - have you looked through the KB on Microsoft's site under NT? Perhaps have a reference there.

Sorry can't help you further
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:pelegrin
ID: 1362344
Don't worry, I will test it with Delphi 4.0 and perphaps it will work. In a few days I will post
a comment with a solution... :)
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1362345
NT 4 does NOT have native suppport for multiple monitors.  That is to say there are no native API calls that deal with multiple monitors.  If your machine has more than one monitor, it is because your video card manufacturer created custom drivers to enable this feature.  I would be willing to bet you have either 2 Matrox Millinuem or 2 #9 Imagine 128 cards (as these are the only common Vid Card makers that offer dual monitor support with their cards that I know of).  Now that that is cleared up I would like more info as to what you want to do.  Under NT, if you have 2 monitors, say each running at 800x600, then you would just create 2 windows that are 800x600 and place them in each display.  Is that what you are trying to do.  I dont understand what the problem is.

Heath
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1362346
BTW - Delphi 4 wont do you any good - the support is has only functions under 98

Heath
0
 

Author Comment

by:pelegrin
ID: 1362347
The problem is, how can I place the video-output of each program in a video-card?
I want to do it from my program, not from the video-card's software.
is it posible?
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1362348
I am guessing here, as I dont actually have the hardware you are working with, but you should be able to do something like this.

place a button and and edit box on a form.  On the onclick event of the button do this

Edit1.Text := IntToStr(GetSystemMetrics(SM_CXSCREEN)) + ' ' + IntToStr(Screen.Width);

Does this give you the screen width of just one screen or both?  
Are both values the same?  If not you need to use the API call in your code.  If they are the same you can use the Delphi call.
I am guessing it will give you both the same (both monitors).  Assuming that you would do something like this in you two forms create event:

  Form1.Left := 0;
  Form1.Width := Screen.Width div 2;
  Form1.Top := 0;
  Form1.Height := Screen.Height;

for the other form:

  Form2.Left := Screen.Width div 2;
  Form2.Width := Screen.Width div 2;
  Form2.Top := 0;
  Form2.Height := Screen.Height;

This can be written much better, but should do what you are asking.  Is this what you wanted?  Please let us know

Heath  
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1362349
BTW - The previous comment is assuming the screen is divided horizontally, not vertically, but I have never seen one done vertically before.  Maybe I should clarify further.  My guess is that as far as the system is concerned you only have ONE display, it is just drawing it across both monitors.  That is more or less how it works in Windows 98, except they have some fucntions to deal with centering dialogs and such. Anyway, you arent displaying anything to different cards, you are dispaying 2 images on ONE display, it is just being shown on 2 monitors.  I hope this helps to clarify things.

Heath
0
 
LVL 2

Accepted Solution

by:
cqhall earned 100 total points
ID: 1362350
I have evaluated a pair of the Viper 330s which support multiple monitors under Windows NT. (The Viper 550s do not). If you are using the Matrox or #9 cards reference earlier - they are probably similar.  BTW, we are currently evaluating an STB card that will drive up to four monitors (single PCI slot).  It is expensive ($1600) but with four cards, up to sixteen monitors can be driven from a single CPU. We will need up to eight in our process control application.

D3 should work fine for your needs - the comments about Windows 98 & D4 are irrelevent.  The D4 calls to Count and Select Monitors are designed for Win98 and DO NOT work in NT.  However, heathprovost is on target with his references to screen positions and dimensions.  The calls from D3 or D4 (my tests in D4) to screen.height and screen.width reflect the combined dimensions of two (or more) monitors, and the aspect ratio tells you whether they are configured to be horizontal or vertical.

For a specific video card model, you could read the registry for the current configuration.  For the Viper it made entries under HKEY_LOCAL_MACHINE\Hardward\Diamond...\Configuration(or something like that) and hold values of "1 x 2", "1 x 1" or "2 x 1".  

For a more general solution, calculate the screen dimensions.  For two monitors...
            Horizontal      Vertical
640x480     1280 x 480      640 x 960
800x600:    1600 x 600      800 x 1200
1024x768    2048 x 768      1024 x 1536
1600x1200   3200 x 1200     1600 x 2400

Note: one monitor and four monitors will give the same aspect ratio, but if you get numbers like 1280x960 or 3200x2400 - it's probably four monitors.

Chuck Hall

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now