Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: visual C 2008 express and TV3D 6.5  (Read 1239 times)
stevensen
Community Member
*
Posts: 1


« on: July 15, 2009, 05:44:04 AM »

Hi volks,

I'm a noob in TV3D 6.5. and I'm little confused. Is it possible to use TV3D 6.5 with Visual C 2008 express? And when, how? I found some topics to this case and peoples said "yes it works" but say said not how? Is there a tutorial or something?
Logged
sybixsus
Customers
Community Member
*****
Posts: 1339


WWW
« Reply #1 on: July 15, 2009, 10:49:36 AM »

Hiya,

As far as I know there is no Visual C, it's either Visual C++ or Visual C# and how you use them is quite different, so we'd need to know which you want to use to help you more. They're both compatible, so it's definitely possible, whichever you want.

I've only personally used it with Visual C# and in that case, it's simply the case of adding a reference to MTV3D65.dll (or similar) in the project and everything else happens automatically.

I think it's a bit more complicated for C++, as you'll need the headers and the lib, but I can go ahead and set it up myself to find the correct method if that's what you're using.
Logged
asdf
Community Member
*
Posts: 1


« Reply #2 on: October 07, 2009, 02:36:42 AM »

Hi, i got some Problems with getting TV3D 6.5 Running on Visual C# Express 2008, i added the .dll to my References but i can't simply start the Program

Here's my Main Method

Code:
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MTV3D65;

namespace myGame
{
    public partial class Form1 : Form
    {
        //private variable to hold the instance of TVEngine.
        private TVEngine _myTVEngine;

        //private variable to hold the instance of TVInputEngine.
        private TVInputEngine _myTVInputEngine;

        //private variable to hold the instance of TVScreen2DText
        private TVScreen2DText _myTVScreen2DText;

        //boolean to hold if the main loop is still required.
        private bool _isRunning;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            //Create and Initialise TVEngine Object
            _myTVEngine = new TVEngine();
            _myTVEngine.Init3DWindowed(Handle);

            //Create and Initialise InputEngine Object
            _myTVInputEngine = new TVInputEngine();
            _myTVInputEngine.Initialize(true, true);

            //Create a new TVScreen2DText Object
            _myTVScreen2DText = new TVScreen2DText();

            //Display our form
            Show();

            //Give our form focus
            Focus();

            //Start the Main Loop
            MainLoop();

        }

        private void MainLoop()
        {
            _isRunning = true;

            while (_isRunning)
            {
                //Clear the last iteration of the loop.
                _myTVEngine.Clear();

                //check the InputEngine for the escape key
                if (_myTVInputEngine.IsKeyPressed(CONST_TV_KEY.TV_KEY_ESCAPE))
                {
                    //set _isRunning to false to terminate the main loop
                    _isRunning = false;
                }

                //Add our Hello World text to the application
                _myTVScreen2DText.NormalFont_DrawText("Hello World...", 50, 50, -16710933);

                //Render this iteration of the loop to screen.
                _myTVEngine.RenderToScreen();

                // do events in the application
                Application.DoEvents();
            }

            Application.Exit();
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            //terminate the main loop
            _isRunning = false;
        }
    }
}

I get an FileNotFoundException in this Line:
Code:
Application.Run(new Form1());


Can someone help me get this Running?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks