The online racing simulator
Script
(9 posts, started )
#1 - sun
Script
Hi !

i got a problem when i tried to compile it, i had an error and it was:

The type or namespace name 'fclsViewer' could not be found (are you missing a using directive or an assembly reference?)

now the code is:

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;


namespace Picture_Viewer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Application.Run(new flcsViewer());
}

private void Form1_Load(object sender, EventArgs e)
{
// Show the open file dialog box.
if (ofdSelectPicture.ShowDialog() == DialogResult.OK)
{
//Load the picture into the picture box.
picShowPicture.Image = Image.FromFile(ofdSelectPicture.FileName);
// Show the name of the file in the form's caption.
this.Text = String.Concat("Picture Viewer (" + ofdSelectPicture.FileName + ") ");
}

}
}
}

Please help me i really want it to work !!!
#3 - Jakg
I don't have any knowledge (apart from VERY basic BASIC) of programming, but did you actually right that code, or is it a template?
If you have Visual Studio 2005 (or the 2008 beta), try hovering your mouse cursor over the word "flcsViewer":

Application.Run(new flcsViewer());

If a little red/brownish box appears in the lower right of the word, click it, opening a context menu. There you can choose whether to add the missing using statement or modify the constructor call to use the full namespace path.


If that doesn't work, you're missing the reference to the component altogether, so you'd have to add it to your project references first.
It's fclsViewer, not flcsViewer. Try correcting the typo and see if that works.
:ices_rofl
#7 - sun
Nope. Doesnt work and the same error... I dont know what you mean by adding the reference altogether how do i do that ?
You need to add the fclsviewer.cs file into your project and project references. How exactly? Dunno, I don't use C#. It's the general idea though. If you still have problems after checking the file's references in your project, go thru the link in my first post, maybe it'll help.
Well, I can technically describe you how to add a reference, but then you'd probably ask me which reference to add, which I don't know as I have no idea what this fclsViewer is. You'll have to wait for someone who knows what/where this class is to come by.

Script
(9 posts, started )
FGED GREDG RDFGDR GSFDG