Re: Displaying DirextX in a panel??
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 09/27/04
- Next message: Kevin Spencer: "Re: Direct3D and Unmanaged Host"
- Previous message: Michel Walsh: "Re: DirectX Newbie: Creating a new directx full screen mode as secondary."
- In reply to: Chris Hastings: "Re: Displaying DirextX in a panel??"
- Next in thread: Just Me: "Re: Displaying DirextX in a panel??"
- Reply: Just Me: "Re: Displaying DirextX in a panel??"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 27 Sep 2004 13:06:22 -0400
Hi,
Also remember it is not good to kill the window on which the Direct3D Device
has been created before killing the device itself. WITH a USER CONTROL, that
MAY happen when you switch from the design mode to debug-run mode, since the
UC embedded in the form, is really running, when the form and the overall
environment is ... in design. That makes UC a little bit harder to work,
with Direct3D, than for other controls (that don't "run" when "you, as
developer" are in design mode of the application, but in run mode, for the
UC)... Even if it is really impressive to see Direct3D rendering in the
UC... while in design mode.
Hoping it may help,
Vanderghast, Access MVP
"Chris Hastings" <chrshstngs@comcast.net> wrote in message
news:69qdnWQx247Px8vcRVn-pA@comcast.com...
>I was able to do it in Vb.NET which means I'm sure you can do it in C#
> I have a panel and I use that in the new Device(0,
> DeviceType.Hardware.panel1.handle ....)
> I also have it docked to fill.
> I duplicate your problem by not using the .handle (just panel1) on the
> device constructor. I'm not sure what it is in C# equivalent of a .handle
> on a control is, but use that instead of just the panel
> I hope that helps,
> Chris
>
> "!Just Me" <newsgroups@a-znet.com> wrote in message
> news:u94rvxkoEHA.644@tk2msftngp13.phx.gbl...
>>I tried to use a panel, as follows, on a form to display the directX.
>>
>> videoDevice = new Device(0, DeviceType.Hardware, panel1,...
>>
>> If I use dock = fill the app crashes if I minimize the form.
>>
>> I tried setting the panel's size in the form's Resize and then I do not
>> get the crash upon nimimizing.
>>
>> But the form is transparent outside the panel and the panel does not
>> really redraw OK.
>>
>>
>>
>> Can a panel really contain a DirectX display?
>>
>>
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>> private void Hwk2MainForm_Resize(object sender, System.EventArgs e)
>>
>> {
>>
>> if(this.WindowState == FormWindowState.Normal)
>>
>> {
>>
>> panel1.Width=this.ClientSize.Width-100;
>>
>> panel1.Height=this.ClientSize.Height -100;
>>
>> panel1.Location=new
>> Point((this.ClientSize.Width-panel1.Width)/2,(this.ClientSize.Height-panel1.Height)/2);
>>
>>
>> this.Invalidate();
>>
>> }
>>
>> }
>>
>>
>>
>>
>
>
- Next message: Kevin Spencer: "Re: Direct3D and Unmanaged Host"
- Previous message: Michel Walsh: "Re: DirectX Newbie: Creating a new directx full screen mode as secondary."
- In reply to: Chris Hastings: "Re: Displaying DirextX in a panel??"
- Next in thread: Just Me: "Re: Displaying DirextX in a panel??"
- Reply: Just Me: "Re: Displaying DirextX in a panel??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|