D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form
D3D object in picture box, not form D3D object in picture box, not form
D3D object in picture box, not form
Go Back  Xtreme Visual Basic Talk > > > > D3D object in picture box, not form


Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2004, 05:37 PM
sgt_pinky's Avatar
sgt_pinky sgt_pinky is offline
Contributor
 
Join Date: Feb 2004
Location: Melbourne, Australia
Posts: 633
Default D3D object in picture box, not form


Hi,

I want to create and render a direct 3D window inside a picturebox (Or panel, or anything really) instead of a form like in all the tutorials.

Unfortunately, the only app with source in the DX SDK that does this is in C++

I have tried to modify the tutorial 3 class to inherit from PictureBox instead of form, then tried to create a new instance on a form, but haven't managed to get it working.

Any help greatly appreciated! Cheers.
Reply With Quote
  #2  
Old 01-25-2008, 04:36 PM
Fulou Fulou is offline
Newcomer
 
Join Date: Jan 2008
Posts: 4
Default

Hey, assuming your using VB, im no expert, but if your heading for a picturebox, go here :

http://www.xtremevbtalk.com/showthre...61#post1270861

I came across the same issue

in the end, this line was causing a fuss when rendering, if your missing any of the values, add them in!

Global const unlit_fvf = D3DFVF_XYZRHW Or D3DFVF_TEX1 Or D3DFVF_DIFFUSE Or D3DFVF_SPECULAR

d3ddevice.SetVertexShader Unlit_fvf

please take note where it says frm_main.PicMain.hWnd

Edit :

The link points to my generic code, although its asking for an issue, it works

Last edited by Fulou; 01-25-2008 at 04:37 PM. Reason: Sounds like im poaching for views...
Reply With Quote
  #3  
Old 02-24-2008, 03:51 AM
Leade's Avatar
Leade Leade is offline
Junior Contributor
 
Join Date: Jul 2005
Location: Wherever i fall over
Posts: 222
Default

Quote:
Originally Posted by sgt_pinky View Post
Hi,

I want to create and render a direct 3D window inside a picturebox (Or panel, or anything really) instead of a form like in all the tutorials.

Unfortunately, the only app with source in the DX SDK that does this is in C++

I have tried to modify the tutorial 3 class to inherit from PictureBox instead of form, then tried to create a new instance on a form, but haven't managed to get it working.

Any help greatly appreciated! Cheers.
When declaring which window to use during creation use the picturebox.handle instead of the form.handle.

In VB.Net it may be Picturebox.Hwnd or Form.Hwnd.
__________________
Fact: The best ideas come when your smashed of your face. So drink beer and be merry!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form D3D object in picture box, not form
D3D object in picture box, not form
D3D object in picture box, not form
 
D3D object in picture box, not form
D3D object in picture box, not form
 
-->