Error 1 The type or namespace name 'Form1'
-
I am getting error
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?)
on the subject while trying to build this with Visual C#:
using System;
using System.Windows.Forms;
using SKYPE4COMLib; // Our COM librarynamespace SkypeBing
{
public partial class Form1 : Form
{
private Skype skype;
private const string trigger = "!"; // Say !help
private const string nick = "BOT";public Form1() { InitializeComponent(); } private void Form1\_Load(object sender, EventArgs e) { skype = new Skype(); // Use skype protocol version 7 skype.Attach(7, false); // Listen skype.MessageStatus += new \_ISkypeEvents\_MessageStatusEventHandler(skype\_MessageStatus); } private void skype\_MessageStatus(ChatMessage msg, TChatMessageStatus status) { // Remove trigger string and make lower case string command = msg.Body.Remove(0, trigger.Length).ToLower(); // Send processed message back to skype chat window skype.SendMessage(msg.Sender.Handle, nick + " Says: " + ProcessCommand(command)); } private string ProcessCommand(string str) { string result; switch (str) { case "uli": result = "http://www.youtube.com/watch?v=VfvBQMqCZw8"; break; default: result = "Uliuli"; break; } return result; } }
}
Whole error:
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33
-
I am getting error
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?)
on the subject while trying to build this with Visual C#:
using System;
using System.Windows.Forms;
using SKYPE4COMLib; // Our COM librarynamespace SkypeBing
{
public partial class Form1 : Form
{
private Skype skype;
private const string trigger = "!"; // Say !help
private const string nick = "BOT";public Form1() { InitializeComponent(); } private void Form1\_Load(object sender, EventArgs e) { skype = new Skype(); // Use skype protocol version 7 skype.Attach(7, false); // Listen skype.MessageStatus += new \_ISkypeEvents\_MessageStatusEventHandler(skype\_MessageStatus); } private void skype\_MessageStatus(ChatMessage msg, TChatMessageStatus status) { // Remove trigger string and make lower case string command = msg.Body.Remove(0, trigger.Length).ToLower(); // Send processed message back to skype chat window skype.SendMessage(msg.Sender.Handle, nick + " Says: " + ProcessCommand(command)); } private string ProcessCommand(string str) { string result; switch (str) { case "uli": result = "http://www.youtube.com/watch?v=VfvBQMqCZw8"; break; default: result = "Uliuli"; break; } return result; } }
}
Whole error:
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33
-
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33
-
I am getting error
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?)
on the subject while trying to build this with Visual C#:
using System;
using System.Windows.Forms;
using SKYPE4COMLib; // Our COM librarynamespace SkypeBing
{
public partial class Form1 : Form
{
private Skype skype;
private const string trigger = "!"; // Say !help
private const string nick = "BOT";public Form1() { InitializeComponent(); } private void Form1\_Load(object sender, EventArgs e) { skype = new Skype(); // Use skype protocol version 7 skype.Attach(7, false); // Listen skype.MessageStatus += new \_ISkypeEvents\_MessageStatusEventHandler(skype\_MessageStatus); } private void skype\_MessageStatus(ChatMessage msg, TChatMessageStatus status) { // Remove trigger string and make lower case string command = msg.Body.Remove(0, trigger.Length).ToLower(); // Send processed message back to skype chat window skype.SendMessage(msg.Sender.Handle, nick + " Says: " + ProcessCommand(command)); } private string ProcessCommand(string str) { string result; switch (str) { case "uli": result = "http://www.youtube.com/watch?v=VfvBQMqCZw8"; break; default: result = "Uliuli"; break; } return result; } }
}
Whole error:
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33
I have a feeling that you have not included the namespace in
program.cs
that Form1 is using i.e.Form1 Myform = new form();
When you should of possibly done
SkypeBing.Form1 Myform = new SkypeBing.Form1();
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33
Topias Jäppilä wrote:
C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19
I think you actually mean line 19. However, you also have not shown us the content of Program.cs so we cannot guess what is wrong in there.
Use the best guess
-
Topias Jäppilä wrote:
C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19
I think you actually mean line 19. However, you also have not shown us the content of Program.cs so we cannot guess what is wrong in there.
Use the best guess
Well only .cs I have on my project is Form1.cs and that makes me wondering why it says something about Program.cs
-
Well only .cs I have on my project is Form1.cs and that makes me wondering why it says something about Program.cs
-
I am getting error
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?)
on the subject while trying to build this with Visual C#:
using System;
using System.Windows.Forms;
using SKYPE4COMLib; // Our COM librarynamespace SkypeBing
{
public partial class Form1 : Form
{
private Skype skype;
private const string trigger = "!"; // Say !help
private const string nick = "BOT";public Form1() { InitializeComponent(); } private void Form1\_Load(object sender, EventArgs e) { skype = new Skype(); // Use skype protocol version 7 skype.Attach(7, false); // Listen skype.MessageStatus += new \_ISkypeEvents\_MessageStatusEventHandler(skype\_MessageStatus); } private void skype\_MessageStatus(ChatMessage msg, TChatMessageStatus status) { // Remove trigger string and make lower case string command = msg.Body.Remove(0, trigger.Length).ToLower(); // Send processed message back to skype chat window skype.SendMessage(msg.Sender.Handle, nick + " Says: " + ProcessCommand(command)); } private string ProcessCommand(string str) { string result; switch (str) { case "uli": result = "http://www.youtube.com/watch?v=VfvBQMqCZw8"; break; default: result = "Uliuli"; break; } return result; } }
}
Whole error:
Error 1 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Topsu\Documents\Visual Studio 2012\Projects\Skaip\Skaip\Program.cs 19 33 Skaip
That is the whole error. Line 99 Column 33