You have too many }'s after Initialize Component();, so it closes the namespace. Try this:
You should also spread out the code a bit, although that may just have been the forum...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
publicpartialclassForm1 : Form
{
public Form1()
{
InitializeComponent();
}
privatevoid TinyTennis_Paint(object sender, PaintEventArgs e)
{
//Work out how long since we were last here
in seconds
double gameTime = _timer.ElapsedMilliseconds / 1000.0;
double elapsedTime = gameTime - _lastTime;
_lastTime = gameTime;
_frameCounter++;
//Perform any animation
//Draw the game objects
//Force the next Paint()
this[size=2].Invalidate();
}
}
You should also spread out the code a bit, although that may just have been the forum...