   can i get some help with C# and DirectX 3D?
  i got a problem, in this tutorial:(sorry, don't know links yet)http://pluralsight.com/wiki/default.aspx/Craig.DirectX/CreateVertexBufferTutorial.htmlit tells me that i need to make a new CustomVertex.TransformedColored.Format, but whatever i try i cannot get to Transformed color.a problem with this is that the device that the main program is using and the device the method is using have the same handle, as far as i can remember the local variable has precidence over any variable...above it(?) but just to be sure i name both of them different, the object you pass to the class is called "d" and the device the main program uses is called "dev" i tried everything i can think of, but i cannot get to the TransformedColor property(?) of the CustomVertex class.sorry if i'm not making sense right now, i'm a little inebriated. but i will say that it's been bugging me and that i couldn't figure it out beforehand.i would really like to understand what i did wrong and how to fix it.   
  I´m not sure if i understand you right, but do you haveusing Microsoft.DirectX.Direct3D;at top of your code?Does your compiler spit some errors or do you just see nothing if your program is running?Michael   ;  i put all the includes that the tutorial told me to, here's my source:using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using Microsoft.DirectX;using Microsoft.DirectX.Direct3D;namespace WindowsApplication2{/// <summary>/// Summary description for Form1./// </summary>public class Form1 : System.Windows.Forms.Form{private Microsoft.DirectX.Direct3D.Device dev;private Microsoft.DirectX.Direct3D.VertexBuffer verts; static void Main() {Form1 game = new Form1();game.initGfx();game.Show();while(game.Created){game.rend();}//game.Dispose();//Application.Run(new Form1());}protected bool initGfx(){Microsoft.DirectX.Direct3D.PresentParameters pres = new PresentParameters();pres.Windowed = true;pres.SwapEffect = Microsoft.DirectX.Direct3D.SwapEffect.Discard;dev = new Microsoft.DirectX.Direct3D.Device(0,Microsoft.DirectX.Direct3D.DeviceType.Hardware,this,Microsoft.DirectX.Direct3D.CreateFlags.SoftwareVertexProcessing,pres); verts = createVBuffer(dev); return true;}protected void rend(){// clears the back bufferdev.Clear(Microsoft.DirectX.Direct3D.ClearFlags.Target,System.Drawing.Color.Orange,1.0F,0);// begin the D3D drawingdev.BeginScene();// draw the scene (3d rendering calls here) // tell D3D taht we're done drawingdev.EndScene();// copy (flip?) the back buffer to the displaydev.Present();}protected VertexBuffer createVBuffer(Device d){d.VertexFormat = CustomVertex.TransformedColored.Format;//d.VertexFormat = Microsoft.DirectX.Direct3D.CustomVertex.TransformedColored.Format;CustomVertex.TransformedColored[] v = new CustomVertex.TransformedColored[3];v[0] = new CustomVertex.TransformedColored(this.Width / 2, this.Height / 4, 0.5F, 1, Color.Blue.ToArgb());v[1] = new CustomVertex.TransformedColored(this.Width * 3 / 4, this.Height * 3 / 4, 0.5F, 1, Color.Green.ToArgb());v[2] = new CustomVertex.TransformedColored(this.Width / 4, this.Height * 3 / 4, 0.5F, 1, Color.Red.ToArgb());VertexBuffer b = new VertexBuffer(typeof(CustomVertex.TransformColored),v.Length,d,0,CustomVertex.TransformedColored.Format,Pool.Default); GraphicsStream stm = b.Lock(0,0,0);stm.Write(v);b.Unlock();return b;}}}when i try to compile it tells me " The type or namespace name 'TransformColored' does not exist in the class or namespace 'Microsoft.DirectX.Direct3D.CustomVertex' (are you missing an assembly reference?) "in my references i have:Microsoft.DirectXMicrosoft.DirectX.Direct3DSystemSystem.DataSystem.DrawingSystem.Windows.FormsSystem.XMLso i'm pretty sure i have all the references i need.   ;  VertexBuffer b = new VertexBuffer(typeof(CustomVertex.TransformColored),v.Length,d,0,CustomVertex.TransformedColored.Format,Pool.Default);Try using typeof(CustomVertex.TransformedColored) [grin]Else:Which Version of DirectX 9.0 is installed? a, b, or c? April, June, August or October?Michael   ;  i tried that but still no go :i couldn't find whether i had a, b, or c. but i have the october 2005 update.i looked at the sample code included with it for doing the same thing://-----------------------------------------------------------------------------// File: Vertices.cs//// Desc: In this tutorial, we are rendering some vertices. This introduces the//  concept of the vertex buffer, a Direct3D object used to store//  vertices. Vertices can be defined any way we want by defining a//  custom structure and a custom FVF (flexible vertex format). In this//  tutorial, we are using vertices that are transformed (meaning they//  are already in 2D window coordinates) and lit (meaning we are not//  using Direct3D lighting, but are supplying our own colors).//// Copyright (c) Microsoft Corporation. All rights reserved.//-----------------------------------------------------------------------------using System;using System.Drawing;using System.Windows.Forms;using Microsoft.DirectX;using Microsoft.DirectX.Direct3D;namespace VerticesTutorial{public class Vertices : Form{// Our global variables for this projectDevice device = null; // Our rendering deviceVertexBuffer vertexBuffer = null;public Vertices(){// Set the initial size of our formthis.ClientSize = new System.Drawing.Size(300,300);// And its captionthis.Text = "Direct3D Tutorial 2 - Vertices";} public bool InitializeGraphics(){try{// Now let's setup our D3D stuffPresentParameters presentParams = new PresentParameters();presentParams.Windowed=true;presentParams.SwapEffect = SwapEffect.Discard;device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);this.OnCreateDevice(device, null);return true;}catch (DirectXException)  {  return false;   }}public void OnCreateDevice(object sender, EventArgs e){Device dev = (Device)sender;// Now Create the VBvertexBuffer = new VertexBuffer(typeof(CustomVertex.TransformedColored), 3, dev, 0, CustomVertex.TransformedColored.Format, Pool.Default);vertexBuffer.Created += new System.EventHandler(this.OnCreateVertexBuffer);this.OnCreateVertexBuffer(vertexBuffer, null);}public void OnCreateVertexBuffer(object sender, EventArgs e){VertexBuffer vb = (VertexBuffer)sender;GraphicsStream stm = vb.Lock(0, 0, 0); CustomVertex.TransformedColored[] verts = new CustomVertex.TransformedColored[3];verts[0].X=150;verts[0].Y=50;verts[0].Z=0.5f; verts[0].Rhw=1; verts[0].Color = System.Drawing.Color.Aqua.ToArgb();verts[1].X=250;verts[1].Y=250;verts[1].Z=0.5f; verts[1].Rhw=1; verts[1].Color = System.Drawing.Color.Brown.ToArgb();verts[2].X=50;verts[2].Y=250;verts[2].Z=0.5f; verts[2].Rhw=1; verts[2].Color = System.Drawing.Color.LightPink.ToArgb();stm.Write(verts);vb.Unlock();}private void Render(){if (device == null) return;//Clear the backbuffer to a blue color (ARGB = 000000ff)device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0f, 0);//Begin the scenedevice.BeginScene(); device.SetStreamSource( 0, vertexBuffer, 0);device.VertexFormat = CustomVertex.TransformedColored.Format;device.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);//End the scenedevice.EndScene();device.Present();}protected override void OnPaint(System.Windows.Forms.PaintEventArgs e){this.Render(); // Render on painting}protected override void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e){if ((int)(byte)e.KeyChar == (int)System.Windows.Forms.Keys.Escape)this.Close(); // Esc was pressed}/// <summary>/// The main entry point for the application./// </summary>static void Main() {  using (Vertices frm = new Vertices())  { if (!frm.InitializeGraphics()) // Initialize Direct3D {MessageBox.Show("Could not initialize Direct3D.  This tutorial will exit.");return; } frm.Show(); // While the form is still valid, render and process messages while(frm.Created) {frm.Render();Application.DoEvents(); }  }}}}it has the same using statements, and the same references that mine does, yet when i hit the period button after "CustomVertex" i can see the TransformedColored struct. on mine when i hit the period button i don't get any of that, just some basic methods.   ;  Have you ever noticed it's only beginners in graphics that learn C#/MDX just for the sake of it being an easier learning process? Five projects later, you're all "AH! Why didn't I take my time to learn C++/DX?" Not once have I found a professional in the work field that is devoting his time to this next MS-hyped API when it works exactly like Java that still hasn't gone anywhere in 10+ years. Use the real iron before you start blaming yourself on why performance is dragging.   ;Quote:Original post by Anonymous PosterHave you ever noticed it's only beginners in graphics that learn C#/MDX just for the sake of it being an easier learning process? Five projects later, you're all "AH! Why didn't I take my time to learn C++/DX?" Not once have I found a professional in the work field that is devoting his time to this next MS-hyped API when it works exactly like Java that still hasn't gone anywhere in 10+ years. Use the real iron before you start blaming yourself on why performance is dragging.what? how did i give the impression that i was learning C# because it's "MS-hyped" and when did i blame myself for "dragging performance" i got a problem and i can't figure out how to solve it. since when was it a crime to use a certain language?   ;  To quote a Dilbert comic discussing Catbert's horrible customer service:  "It works fine on my machine."In the past, I have had some problems with the IDE "forgetting" all the Intellisense information in the middle of writing a file...and this happened while I was writing an MDX program, oddly enough.  A quick restart of the IDE solved all my problems then.  If you haven't restarted it since the problem cropped up, I would recommend trying that.  (If you have, let us know and we'll try something else. [smile])A couple of other hints:  you can use plain old HTML to post links, and you can use [_source lang="c#"][_/source] (just remove the underscores) to post your code in some nice boxes with syntax highlighting and everything.  =)HTH!   ;  thank you so much del, i restared the IDE and i was just grinning with excitement, you were right, the problem was just as simple as Intellisense "forgetting" the information. i restarted it up, typed in "CustomVertex", took a breath, hit the period button, and lo and behold, TransformedColored was in the list :]the thought that some kind of glitch would prevent the list from being loaded properly had never crossed my mind, but now that i know i have one more thing to try before i get all frustrated and angry.   