Jump to content
  • Advertisement
Sign in to follow this  
Programmer101

SOLVED:[MDX] Rendering in a Panel

This topic is 4059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. In a c# program that I am making I have the directx viewport in a panel. Everything was working fine but then I added some new controls and some code to render terrain. Now it does not render to the panel. I know that it is still going through the render loop but nothing appears on the panel. When I move the window that this panel is in; however, I can see the image that should have been in the panel on the window that is behind my program. Also if I move the window so that the panel is partially outside of the screen area it will render the image to the panel. This is my code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace Demon_Heart_Construction_Set
{
    public partial class Form1 : Form
    {
        // Our global variables for this project
		Device device = null; // Our rendering device
        float[] heightmap = new float[257*257];
        float[] HMXtras = new float[257 * 257];
        private Panel panel1;
        private ListBox listBox3;
        private ComboBox comboBox1;
        private ListBox listBox2;
        private ListBox listBox1;
        private TreeView treeView1;
        private ToolStripMenuItem fileToolStripMenuItem;
        private ToolStripMenuItem dataToolStripMenuItem;
        private ToolStripMenuItem saveToolStripMenuItem;
        private ToolStripMenuItem importToolStripMenuItem;
        private ToolStripMenuItem exportToolStripMenuItem;
        private ToolStripMenuItem preferencesToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem1;
        private ToolStripMenuItem exitToolStripMenuItem;
        private ToolStripMenuItem editToolStripMenuItem;
        private ToolStripMenuItem cutRenderToolStripMenuItem;
        private ToolStripMenuItem copyRenderToolStripMenuItem;
        private ToolStripMenuItem pasteRenderToolStripMenuItem;
        private ToolStripMenuItem duplicateToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem2;
        private ToolStripMenuItem findToolStripMenuItem;
        private ToolStripMenuItem viewToolStripMenuItem;
        private ToolStripMenuItem topToolStripMenuItem;
        private ToolStripMenuItem sideToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem3;
        private ToolStripMenuItem lightingToolStripMenuItem;
        private ToolStripMenuItem fogToolStripMenuItem;
        private ToolStripMenuItem skyToolStripMenuItem;
        private ToolStripMenuItem wireframeToolStripMenuItem;
        private ToolStripMenuItem worldToolStripMenuItem;
        private ToolStripMenuItem weatherToolStripMenuItem;
        private ToolStripMenuItem climatesToolStripMenuItem;
        private ToolStripMenuItem cellsToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem4;
        private ToolStripMenuItem stewsoftPhysixEditorToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem5;
        private ToolStripMenuItem heightmapEditingToolStripMenuItem;
        private ToolStripMenuItem landscapeEditingToolStripMenuItem;
        private ToolStripMenuItem characterToolStripMenuItem;
        private ToolStripMenuItem hairToolStripMenuItem;
        private ToolStripMenuItem eyesToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem6;
        private ToolStripMenuItem raceToolStripMenuItem;
        private ToolStripMenuItem classToolStripMenuItem;
        private ToolStripMenuItem skillsToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem7;
        private ToolStripMenuItem questsToolStripMenuItem;
        private ToolStripMenuItem dialogToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem8;
        private ToolStripMenuItem faceTexturesToolStripMenuItem;
        private ToolStripMenuItem gameplayToolStripMenuItem;
        private ToolStripMenuItem magicEffectToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem9;
        private ToolStripMenuItem settingsToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem10;
        private ToolStripMenuItem scriptsToolStripMenuItem;
        private ToolStripSeparator toolStripMenuItem11;
        private ToolStripMenuItem globalsToolStripMenuItem;
        private ToolStripMenuItem questsToolStripMenuItem1;
        private ToolStripMenuItem helpToolStripMenuItem;
        private ToolStripMenuItem aboutToolStripMenuItem;
        private MenuStrip menuStrip1;
        private ToolStripButton toolStripButton1;
        private ToolStripButton toolStripButton2;
        private ToolStrip toolStrip1;
        VertexBuffer vertexBuffer = null;

		public Form1()
		{
			// Set the initial size of our form
			this.ClientSize = new System.Drawing.Size(400,300);
			// And it's caption
			this.Text = "Demon Heart Construction Set";
			// Load our icon from the resources of the .exe
		}

        public bool LoadHM1(int cell, object sender)
        {
            //Create the vertex buffer
            Device dev = (Device)sender;
            vertexBuffer = new VertexBuffer(typeof(CustomVertex.PositionNormalTextured), (256 * (2 * (256 + 1)) + 1), dev, 0, CustomVertex.PositionNormalTextured.Format, Pool.Default);
            //Lock the vertex buffer
            GraphicsStream stm = vertexBuffer.Lock(0, 0, 0);
            CustomVertex.PositionNormalTextured[] verts = new CustomVertex.PositionNormalTextured[(256 * (2 * (256 + 1)) + 1)];

            //Open the heightmap file
            FileStream fs = new FileStream("heightmap.dhw",FileMode.Open);
            BinaryReader r = new BinaryReader(fs);
            float[] hmh = new float[257*257];
            int g;
            int i;
            for(g=0;g<2500;g++) {
                if(cell==g) {
                    for(i=0;i<(257*257);i++)
			            heightmap = r.ReadSingle();
			        break;
		        }
		        else {
                    for(i=0;i<(257*257);i++)
			            hmh = r.ReadSingle();
		        }
	        }
            for(i=0;i<(257*257);i++)
			            hmh = 0;
	        r.Close();

	        int z=0,x=0;
            i=0;

	        //Generate vertices
	        float Height, nextHeight;

	        for(z = 0; z < 256; z++)
	        {
		        for (x = 0; x < 256+1; x++)
		        {
                    Height = heightmap[z * (256 + 1) + x];
                    nextHeight = heightmap[(z + 1) * (256 + 1) + x];

                    verts.X = ((x - (256 / 2.0f))) * 2.0f;
                    verts.Y = 0.0f;//Height / 3.0f;
                    verts.Z = ((z - (256 / 2.0f))) * 2.0f;
                    verts.Nx = 0.0f;
                    verts.Ny = 1.0f;
                    verts.Nz = 0.0f;
                    verts.Tu = (((verts.X)) / 256) * 32.0f - 0.5f;
                    verts.Tv = (((verts.Z)) / 256) * 32.0f - 0.5f;
			        i++;

                    verts.X = ((x - (256 / 2.0f))) * 2.0f;
                    verts.Y = 0.0f;// nextHeight / 3.0f;
                    verts.Z = ((z - (256 / 2.0f) + 1.0f)) * 2.0f;
                    verts.Nx = 0.0f;
                    verts.Ny = 1.0f;
                    verts.Nz = 0.0f;
                    verts.Tu = (((verts.X)) / 256) * 32.0f - 0.5f;
                    verts.Tv = (((verts.Z)) / 256) * 32.0f - 0.5f;
			        i++;
		        }
	        }
            stm.Write(verts);
            vertexBuffer.Unlock();
	        return true;
        }

        public bool InitializeGraphics()
		{
			try
			{
				// Now let's setup our D3D stuff
				PresentParameters presentParams = new PresentParameters();
				presentParams.Windowed=true;
				presentParams.SwapEffect = SwapEffect.Discard;
				device = new Device(0, DeviceType.Hardware, this.panel1.Handle, CreateFlags.SoftwareVertexProcessing, presentParams);
                LoadHM1(0, device);
                device.RenderState.CullMode = Cull.None;
                device.RenderState.Lighting = false;
				return true;
			}
			catch (DirectXException)
            {
                return false; 
            }
		}
        public void SetupMatrices(object sender)
        {
            Device device = (Device)sender;
            device.Transform.World = Matrix.RotationY(0.0f);
            device.Transform.View = Matrix.LookAtLH(new Vector3(0.0f, 3.0f, -5.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 1.0f, 0.0f));
            device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, 1.0f, 1.0f, 100.0f);
            return;
        }

		private bool Render()
		{
			if (device == null) 
				return false;
            int i = 0;

			//Clear the backbuffer to a blue color 
			device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0f, 0);
			//Begin the scene
			device.BeginScene();

            SetupMatrices(device);
			
			// Terrain Rendering
            device.SetStreamSource(0, vertexBuffer, 0);
            device.VertexFormat = CustomVertex.PositionNormalTextured.Format;
            for (i = 0; i < 256; i++)
            {
                device.DrawPrimitives(PrimitiveType.TriangleStrip, i * (2 * (256 + 1)), 256 * 2);
            }
			
            //End the scene
			device.EndScene();
			device.Present();

            return true;
		}
		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
		}

        private void InitializeTreeView()
        {
            this.treeView1.BeginUpdate();
            this.treeView1.Nodes.Add("Actors");
            this.treeView1.Nodes[0].Nodes.Add("Creature");
            this.treeView1.Nodes[0].Nodes.Add("Leveled Creature");
            this.treeView1.Nodes[0].Nodes.Add("NPC");
            this.treeView1.Nodes.Add("Items");
            this.treeView1.Nodes[1].Nodes.Add("Ammo");
            this.treeView1.Nodes[1].Nodes.Add("Aparatus");
            this.treeView1.Nodes[1].Nodes.Add("Book");
            this.treeView1.Nodes[1].Nodes.Add("Clothing");
            this.treeView1.Nodes[1].Nodes.Add("Ingredient");
            this.treeView1.Nodes[1].Nodes.Add("Key");
            this.treeView1.Nodes[1].Nodes.Add("Leveled Item");
            this.treeView1.Nodes[1].Nodes.Add("Misc Item");
            this.treeView1.Nodes[1].Nodes.Add("Weapon");
            this.treeView1.Nodes.Add("Magic");
            this.treeView1.Nodes[2].Nodes.Add("Enchantment");
            this.treeView1.Nodes[2].Nodes.Add("Potion");
            this.treeView1.Nodes[2].Nodes.Add("Spell");
            this.treeView1.Nodes.Add("Miscellaneous");
            this.treeView1.Nodes[3].Nodes.Add("Land Texture");
            this.treeView1.Nodes[3].Nodes.Add("Load Screen");
            this.treeView1.Nodes[3].Nodes.Add("Sound");
            this.treeView1.Nodes[3].Nodes.Add("Water");
            this.treeView1.Nodes[3].Nodes.Add("Cinematic");
            this.treeView1.Nodes.Add("World Objects");
            this.treeView1.Nodes[4].Nodes.Add("Activator");
            this.treeView1.Nodes[4].Nodes.Add("Container");
            this.treeView1.Nodes[4].Nodes.Add("Door");
            this.treeView1.Nodes[4].Nodes.Add("Flora");
            this.treeView1.Nodes[4].Nodes.Add("Furniture");
            this.treeView1.Nodes[4].Nodes.Add("Grass");
            this.treeView1.Nodes[4].Nodes.Add("Light");
            this.treeView1.Nodes[4].Nodes.Add("Static");
            this.treeView1.Nodes[4].Nodes.Add("Tree");
            this.treeView1.EndUpdate();
        }

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main()
		{
            using (Form1 frm = new Form1())
            {
                frm.InitializeComponent();
                frm.InitializeTreeView();
                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)
                {
                    if (frm.Render()==false)
                        frm.Close();
                    Application.DoEvents();
                }
            }
		}

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panel1 = new System.Windows.Forms.Panel();
            this.listBox3 = new System.Windows.Forms.ListBox();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.listBox2 = new System.Windows.Forms.ListBox();
            this.listBox1 = new System.Windows.Forms.ListBox();
            this.treeView1 = new System.Windows.Forms.TreeView();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.dataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.preferencesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.cutRenderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.copyRenderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.pasteRenderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
            this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.topToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.sideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
            this.lightingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.fogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.skyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.wireframeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.worldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.weatherToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.climatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.cellsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
            this.stewsoftPhysixEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
            this.heightmapEditingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.landscapeEditingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.characterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.hairToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.eyesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
            this.raceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.classToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.skillsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator();
            this.questsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.dialogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripSeparator();
            this.faceTexturesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.gameplayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.magicEffectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem9 = new System.Windows.Forms.ToolStripSeparator();
            this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem10 = new System.Windows.Forms.ToolStripSeparator();
            this.scriptsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
            this.globalsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.questsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.menuStrip1.SuspendLayout();
            this.toolStrip1.SuspendLayout();
            this.SuspendLayout();
            // 
            // panel1
            // 
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.panel1.Location = new System.Drawing.Point(492, 62);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(512, 396);
            this.panel1.TabIndex = 9;
            // 
            // listBox3
            // 
            this.listBox3.FormattingEnabled = true;
            this.listBox3.Location = new System.Drawing.Point(766, 491);
            this.listBox3.Name = "listBox3";
            this.listBox3.Size = new System.Drawing.Size(238, 186);
            this.listBox3.TabIndex = 7;
            // 
            // comboBox1
            // 
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(492, 464);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(259, 21);
            this.comboBox1.TabIndex = 5;
            // 
            // listBox2
            // 
            this.listBox2.FormattingEnabled = true;
            this.listBox2.Location = new System.Drawing.Point(492, 491);
            this.listBox2.Name = "listBox2";
            this.listBox2.Size = new System.Drawing.Size(259, 186);
            this.listBox2.TabIndex = 6;
            // 
            // listBox1
            // 
            this.listBox1.FormattingEnabled = true;
            this.listBox1.Location = new System.Drawing.Point(232, 62);
            this.listBox1.Name = "listBox1";
            this.listBox1.Size = new System.Drawing.Size(240, 615);
            this.listBox1.TabIndex = 8;
            // 
            // treeView1
            // 
            this.treeView1.Location = new System.Drawing.Point(12, 62);
            this.treeView1.Name = "treeView1";
            this.treeView1.Size = new System.Drawing.Size(204, 615);
            this.treeView1.TabIndex = 1;
            // 
            // fileToolStripMenuItem
            // 
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.dataToolStripMenuItem,
            this.saveToolStripMenuItem,
            this.importToolStripMenuItem,
            this.exportToolStripMenuItem,
            this.preferencesToolStripMenuItem,
            this.toolStripMenuItem1,
            this.exitToolStripMenuItem});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
            this.fileToolStripMenuItem.Text = "File";
            // 
            // dataToolStripMenuItem
            // 
            this.dataToolStripMenuItem.Name = "dataToolStripMenuItem";
            this.dataToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.dataToolStripMenuItem.Text = "Data";
            // 
            // saveToolStripMenuItem
            // 
            this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
            this.saveToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.saveToolStripMenuItem.Text = "Save";
            // 
            // importToolStripMenuItem
            // 
            this.importToolStripMenuItem.Name = "importToolStripMenuItem";
            this.importToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.importToolStripMenuItem.Text = "Import";
            // 
            // exportToolStripMenuItem
            // 
            this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
            this.exportToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.exportToolStripMenuItem.Text = "Export";
            // 
            // preferencesToolStripMenuItem
            // 
            this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
            this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.preferencesToolStripMenuItem.Text = "Preferences";
            // 
            // toolStripMenuItem1
            // 
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(140, 6);
            // 
            // exitToolStripMenuItem
            // 
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
            this.exitToolStripMenuItem.Text = "Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            // 
            // editToolStripMenuItem
            // 
            this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.cutRenderToolStripMenuItem,
            this.copyRenderToolStripMenuItem,
            this.pasteRenderToolStripMenuItem,
            this.duplicateToolStripMenuItem,
            this.toolStripMenuItem2,
            this.findToolStripMenuItem});
            this.editToolStripMenuItem.Name = "editToolStripMenuItem";
            this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
            this.editToolStripMenuItem.Text = "Edit";
            // 
            // cutRenderToolStripMenuItem
            // 
            this.cutRenderToolStripMenuItem.Name = "cutRenderToolStripMenuItem";
            this.cutRenderToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
            this.cutRenderToolStripMenuItem.Text = "Cut Render";
            // 
            // copyRenderToolStripMenuItem
            // 
            this.copyRenderToolStripMenuItem.Name = "copyRenderToolStripMenuItem";
            this.copyRenderToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
            this.copyRenderToolStripMenuItem.Text = "Copy Render";
            // 
            // pasteRenderToolStripMenuItem
            // 
            this.pasteRenderToolStripMenuItem.Name = "pasteRenderToolStripMenuItem";
            this.pasteRenderToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
            this.pasteRenderToolStripMenuItem.Text = "Paste Render";
            // 
            // duplicateToolStripMenuItem
            // 
            this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem";
            this.duplicateToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
            this.duplicateToolStripMenuItem.Text = "Duplicate";
            // 
            // toolStripMenuItem2
            // 
            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
            this.toolStripMenuItem2.Size = new System.Drawing.Size(147, 6);
            // 
            // findToolStripMenuItem
            // 
            this.findToolStripMenuItem.Name = "findToolStripMenuItem";
            this.findToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
            this.findToolStripMenuItem.Text = "Find";
            // 
            // viewToolStripMenuItem
            // 
            this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.topToolStripMenuItem,
            this.sideToolStripMenuItem,
            this.toolStripMenuItem3,
            this.lightingToolStripMenuItem,
            this.fogToolStripMenuItem,
            this.skyToolStripMenuItem,
            this.wireframeToolStripMenuItem});
            this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
            this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
            this.viewToolStripMenuItem.Text = "View";
            // 
            // topToolStripMenuItem
            // 
            this.topToolStripMenuItem.Name = "topToolStripMenuItem";
            this.topToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.topToolStripMenuItem.Text = "Top";
            // 
            // sideToolStripMenuItem
            // 
            this.sideToolStripMenuItem.Name = "sideToolStripMenuItem";
            this.sideToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.sideToolStripMenuItem.Text = "Side";
            // 
            // toolStripMenuItem3
            // 
            this.toolStripMenuItem3.Name = "toolStripMenuItem3";
            this.toolStripMenuItem3.Size = new System.Drawing.Size(132, 6);
            // 
            // lightingToolStripMenuItem
            // 
            this.lightingToolStripMenuItem.Name = "lightingToolStripMenuItem";
            this.lightingToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.lightingToolStripMenuItem.Text = "Lighting";
            // 
            // fogToolStripMenuItem
            // 
            this.fogToolStripMenuItem.Name = "fogToolStripMenuItem";
            this.fogToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.fogToolStripMenuItem.Text = "Fog";
            // 
            // skyToolStripMenuItem
            // 
            this.skyToolStripMenuItem.Name = "skyToolStripMenuItem";
            this.skyToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.skyToolStripMenuItem.Text = "Sky";
            // 
            // wireframeToolStripMenuItem
            // 
            this.wireframeToolStripMenuItem.Name = "wireframeToolStripMenuItem";
            this.wireframeToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.wireframeToolStripMenuItem.Text = "Wireframe";
            // 
            // worldToolStripMenuItem
            // 
            this.worldToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.weatherToolStripMenuItem,
            this.climatesToolStripMenuItem,
            this.cellsToolStripMenuItem,
            this.toolStripMenuItem4,
            this.stewsoftPhysixEditorToolStripMenuItem,
            this.toolStripMenuItem5,
            this.heightmapEditingToolStripMenuItem,
            this.landscapeEditingToolStripMenuItem});
            this.worldToolStripMenuItem.Name = "worldToolStripMenuItem";
            this.worldToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
            this.worldToolStripMenuItem.Text = "World";
            // 
            // weatherToolStripMenuItem
            // 
            this.weatherToolStripMenuItem.Name = "weatherToolStripMenuItem";
            this.weatherToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.weatherToolStripMenuItem.Text = "Weather";
            // 
            // climatesToolStripMenuItem
            // 
            this.climatesToolStripMenuItem.Name = "climatesToolStripMenuItem";
            this.climatesToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.climatesToolStripMenuItem.Text = "Climates";
            // 
            // cellsToolStripMenuItem
            // 
            this.cellsToolStripMenuItem.Name = "cellsToolStripMenuItem";
            this.cellsToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.cellsToolStripMenuItem.Text = "Cells";
            // 
            // toolStripMenuItem4
            // 
            this.toolStripMenuItem4.Name = "toolStripMenuItem4";
            this.toolStripMenuItem4.Size = new System.Drawing.Size(190, 6);
            // 
            // stewsoftPhysixEditorToolStripMenuItem
            // 
            this.stewsoftPhysixEditorToolStripMenuItem.Name = "stewsoftPhysixEditorToolStripMenuItem";
            this.stewsoftPhysixEditorToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.stewsoftPhysixEditorToolStripMenuItem.Text = "Stewsoft Physix Editor";
            // 
            // toolStripMenuItem5
            // 
            this.toolStripMenuItem5.Name = "toolStripMenuItem5";
            this.toolStripMenuItem5.Size = new System.Drawing.Size(190, 6);
            // 
            // heightmapEditingToolStripMenuItem
            // 
            this.heightmapEditingToolStripMenuItem.Name = "heightmapEditingToolStripMenuItem";
            this.heightmapEditingToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.heightmapEditingToolStripMenuItem.Text = "Heightmap Editing";
            // 
            // landscapeEditingToolStripMenuItem
            // 
            this.landscapeEditingToolStripMenuItem.Name = "landscapeEditingToolStripMenuItem";
            this.landscapeEditingToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
            this.landscapeEditingToolStripMenuItem.Text = "Landscape Editing";
            // 
            // characterToolStripMenuItem
            // 
            this.characterToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.hairToolStripMenuItem,
            this.eyesToolStripMenuItem,
            this.toolStripMenuItem6,
            this.raceToolStripMenuItem,
            this.classToolStripMenuItem,
            this.skillsToolStripMenuItem,
            this.toolStripMenuItem7,
            this.questsToolStripMenuItem,
            this.dialogToolStripMenuItem,
            this.toolStripMenuItem8,
            this.faceTexturesToolStripMenuItem});
            this.characterToolStripMenuItem.Name = "characterToolStripMenuItem";
            this.characterToolStripMenuItem.Size = new System.Drawing.Size(67, 20);
            this.characterToolStripMenuItem.Text = "Character";
            // 
            // hairToolStripMenuItem
            // 
            this.hairToolStripMenuItem.Name = "hairToolStripMenuItem";
            this.hairToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.hairToolStripMenuItem.Text = "Hair";
            // 
            // eyesToolStripMenuItem
            // 
            this.eyesToolStripMenuItem.Name = "eyesToolStripMenuItem";
            this.eyesToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.eyesToolStripMenuItem.Text = "Eyes";
            // 
            // toolStripMenuItem6
            // 
            this.toolStripMenuItem6.Name = "toolStripMenuItem6";
            this.toolStripMenuItem6.Size = new System.Drawing.Size(151, 6);
            this.toolStripMenuItem6.Click += new System.EventHandler(this.toolStripMenuItem6_Click);
            // 
            // raceToolStripMenuItem
            // 
            this.raceToolStripMenuItem.Name = "raceToolStripMenuItem";
            this.raceToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.raceToolStripMenuItem.Text = "Race";
            // 
            // classToolStripMenuItem
            // 
            this.classToolStripMenuItem.Name = "classToolStripMenuItem";
            this.classToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.classToolStripMenuItem.Text = "Class";
            // 
            // skillsToolStripMenuItem
            // 
            this.skillsToolStripMenuItem.Name = "skillsToolStripMenuItem";
            this.skillsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.skillsToolStripMenuItem.Text = "Skills";
            // 
            // toolStripMenuItem7
            // 
            this.toolStripMenuItem7.Name = "toolStripMenuItem7";
            this.toolStripMenuItem7.Size = new System.Drawing.Size(151, 6);
            // 
            // questsToolStripMenuItem
            // 
            this.questsToolStripMenuItem.Name = "questsToolStripMenuItem";
            this.questsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.questsToolStripMenuItem.Text = "Quests";
            // 
            // dialogToolStripMenuItem
            // 
            this.dialogToolStripMenuItem.Name = "dialogToolStripMenuItem";
            this.dialogToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.dialogToolStripMenuItem.Text = "Dialog";
            // 
            // toolStripMenuItem8
            // 
            this.toolStripMenuItem8.Name = "toolStripMenuItem8";
            this.toolStripMenuItem8.Size = new System.Drawing.Size(151, 6);
            // 
            // faceTexturesToolStripMenuItem
            // 
            this.faceTexturesToolStripMenuItem.Name = "faceTexturesToolStripMenuItem";
            this.faceTexturesToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.faceTexturesToolStripMenuItem.Text = "Face Textures";
            // 
            // gameplayToolStripMenuItem
            // 
            this.gameplayToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.magicEffectToolStripMenuItem,
            this.toolStripMenuItem9,
            this.settingsToolStripMenuItem,
            this.toolStripMenuItem10,
            this.scriptsToolStripMenuItem,
            this.toolStripMenuItem11,
            this.globalsToolStripMenuItem,
            this.questsToolStripMenuItem1});
            this.gameplayToolStripMenuItem.Name = "gameplayToolStripMenuItem";
            this.gameplayToolStripMenuItem.Size = new System.Drawing.Size(66, 20);
            this.gameplayToolStripMenuItem.Text = "Gameplay";
            // 
            // magicEffectToolStripMenuItem
            // 
            this.magicEffectToolStripMenuItem.Name = "magicEffectToolStripMenuItem";
            this.magicEffectToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
            this.magicEffectToolStripMenuItem.Text = "Magic Effects";
            // 
            // toolStripMenuItem9
            // 
            this.toolStripMenuItem9.Name = "toolStripMenuItem9";
            this.toolStripMenuItem9.Size = new System.Drawing.Size(146, 6);
            // 
            // settingsToolStripMenuItem
            // 
            this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
            this.settingsToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
            this.settingsToolStripMenuItem.Text = "Settings";
            // 
            // toolStripMenuItem10
            // 
            this.toolStripMenuItem10.Name = "toolStripMenuItem10";
            this.toolStripMenuItem10.Size = new System.Drawing.Size(146, 6);
            // 
            // scriptsToolStripMenuItem
            // 
            this.scriptsToolStripMenuItem.Name = "scriptsToolStripMenuItem";
            this.scriptsToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
            this.scriptsToolStripMenuItem.Text = "Scripts";
            // 
            // toolStripMenuItem11
            // 
            this.toolStripMenuItem11.Name = "toolStripMenuItem11";
            this.toolStripMenuItem11.Size = new System.Drawing.Size(146, 6);
            // 
            // globalsToolStripMenuItem
            // 
            this.globalsToolStripMenuItem.Name = "globalsToolStripMenuItem";
            this.globalsToolStripMenuItem.Size = new System.Drawing.Size(149, 22);
            this.globalsToolStripMenuItem.Text = "Globals";
            // 
            // questsToolStripMenuItem1
            // 
            this.questsToolStripMenuItem1.Name = "questsToolStripMenuItem1";
            this.questsToolStripMenuItem1.Size = new System.Drawing.Size(149, 22);
            this.questsToolStripMenuItem1.Text = "Quests";
            // 
            // helpToolStripMenuItem
            // 
            this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.aboutToolStripMenuItem});
            this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
            this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
            this.helpToolStripMenuItem.Text = "Help";
            // 
            // aboutToolStripMenuItem
            // 
            this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
            this.aboutToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
            this.aboutToolStripMenuItem.Text = "About";
            this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
            // 
            // menuStrip1
            // 
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem,
            this.editToolStripMenuItem,
            this.viewToolStripMenuItem,
            this.worldToolStripMenuItem,
            this.characterToolStripMenuItem,
            this.gameplayToolStripMenuItem,
            this.helpToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(1016, 24);
            this.menuStrip1.TabIndex = 3;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // toolStripButton1
            // 
            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton1.Name = "toolStripButton1";
            this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
            this.toolStripButton1.Text = "Data";
            // 
            // toolStripButton2
            // 
            this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
            this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton2.Name = "toolStripButton2";
            this.toolStripButton2.Size = new System.Drawing.Size(23, 22);
            this.toolStripButton2.Text = "Save";
            // 
            // toolStrip1
            // 
            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton1,
            this.toolStripButton2});
            this.toolStrip1.Location = new System.Drawing.Point(0, 24);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(1016, 25);
            this.toolStrip1.TabIndex = 4;
            this.toolStrip1.Text = "toolStrip1";
            // 
            // Form1
            // 
            this.ClientSize = new System.Drawing.Size(1016, 701);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.listBox1);
            this.Controls.Add(this.listBox3);
            this.Controls.Add(this.listBox2);
            this.Controls.Add(this.comboBox1);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.treeView1);
            this.Controls.Add(this.menuStrip1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.TransparencyKey = System.Drawing.Color.Magenta;
            this.Load += new System.EventHandler(this.Form1_Load);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void toolStripMenuItem6_Click(object sender, EventArgs e)
        {

        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (AboutBox1 abtbx = new AboutBox1()) {
                abtbx.Show();
                while(abtbx.Created) {
                    Application.DoEvents();
                }
            }
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

[Edited by - Programmer101 on May 12, 2007 9:44:49 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!