Groups | Blog | Home
all groups > dotnet windows forms > july 2006 >

dotnet windows forms : Display adapter



Søe
7/27/2006 1:16:02 PM
Hi,

I'm trying to create an project running in a dual display environment. My
application instantiate a Windows Form on each monitor, and that works great.
However, I need to use DirectX and thereby I need to figure out, which
display adapter the form is running on. Until now that hasn't been easy! I
tried using the Screen class, but if the primary window is to the right, then
the first screen in Screen.AllScreens is the one on the left, and so I can't
just use the index in Screen.AllScreens.

Could anyone please help me figure out how to determine the adapter a form
is running on?

Kindly regards

--
Jens Søe Christiansen
Søe
7/28/2006 6:14:02 AM
Hi Kevin,

how should GetWorkingArea help me figure out the display adapter th form is
running on?

--
With regards
Jens Søe Christiansen


[quoted text, click to view]
Kevin Spencer
7/28/2006 8:28:37 AM
Use the Screen.GetWorkingArea method.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.


[quoted text, click to view]

Kevin Spencer
7/30/2006 7:26:42 PM
Ah, this is a DirectX question?

Is this managed DirectX or native? If managed, use the Device.Device class.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.


[quoted text, click to view]

Søe
7/30/2006 11:17:01 PM
Dar Kevin,

I'm very sorry for my stupidity, but I don't seem to have a device class in
the Device, running manage C# .Net 2.0?

Please advice if possible, since this is very crucial for us.

--
Kindly regards
Jens Søe Christiansen


[quoted text, click to view]
Søe
7/31/2006 5:29:01 AM
hmmmm hi Kevin,

I'm very sorry but I can't seem to find anything that actually could help me!

--
With regards
Jens Søe Christiansen


[quoted text, click to view]
Kevin Spencer
7/31/2006 8:12:11 AM
Microsoft.DirectX.Direct3D.Device

You need the DirectX SDK installed to use it. See
http://msdn.microsoft.com/directx/sdk/
--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.


[quoted text, click to view]

Søe
7/31/2006 12:14:02 PM
Dear Kevin,

I know about the Direct3D. My application is blending and mixing textures
and everything, but I still can't seem to figure out on which display adapter
m form is running, in a multi-dispay environment (specially when the primary
display is to the right)!

--
With regards
Jens Søe Christiansen


[quoted text, click to view]
Søe
7/31/2006 12:16:02 PM
Dear Kevin,

I know about the Direct3D. My application is blending and mixing textures
and everything, but I still can't seem to figure out on which display adapter
m form is running, in a multi-dispay environment (specially when the primary
display is to the right)!

--
Jens Søe Christiansen


[quoted text, click to view]
Kevin Spencer
7/31/2006 1:38:01 PM
The Device class is part of the Direct3D namespace, which is included in the
SDK, along with all the documentation.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.


[quoted text, click to view]

Kevin Spencer
8/1/2006 8:00:55 AM
See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/DirectX_9_Frequently_Asked_Questions.asp

The Device is a class that encapsulates access to a display adapter. When
you work with a Device, you are working with a graphics adapter. The FAQ
listed above will tell you how to get the various characteristics of the
various adapters on your system.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.


[quoted text, click to view]

Søe
8/2/2006 1:40:44 PM
Dear Kevin,

I'm very sorry but I don't quite follow you (where to look)!

My problem is that I have a form, and now I would like to create a Direct3D
device, like this:

m_Device = new Dvice(adapter, ......)

How do I determine the adapter the form i running on?
(Ps. I can't use the device constructor that takes an IntPtr, since I can't
set the Presentationparams)


--
Kindly regards (and please advice if possible)
Jens Søe Christiansen


[quoted text, click to view]
Kevin Spencer
8/2/2006 5:52:46 PM
You need to read the references I sent you. The last one tells you how to
enumerate the various adapters on your system. As to which one you will use,
that's up to you.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

[quoted text, click to view]

AddThis Social Bookmark Button