• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Using 2 videCards with 2 monitors in NT 4.0

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
pelegrin
Asked:
pelegrin
  • 4
  • 4
  • 2
  • +2
1 Solution
 
BlackManCommented:
There is native support for it in D4, what version are you using?
0
 
CyberSoftCommented:
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
 
pelegrinAuthor Commented:
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
BlackManCommented:
What Delphi version are you using??
0
 
pelegrinAuthor Commented:
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
 
CyberSoftCommented:
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
 
pelegrinAuthor Commented:
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
 
heathprovostCommented:
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
 
heathprovostCommented:
BTW - Delphi 4 wont do you any good - the support is has only functions under 98

Heath
0
 
pelegrinAuthor Commented:
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
 
heathprovostCommented:
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
 
heathprovostCommented:
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
 
cqhallCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 4
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now