27-09-2007, 14:52
|
|
|
|
חבר מתאריך: 22.03.04
הודעות: 1,234
|
|
#C - בעיות ב- WindowsApplication
ניסיתי ללמוד WindowsApplication ב-#C,
אבל כשאני מעתיק קודים שאני מוצא באינטרנט
לתוכנה Microsoft Visual C# 2005 Express Edition
ועושה: Ctrl+F5 היא תמיד מציכה שגיאה אחרת
ואני לא יכול לראות אתה מה שנבנה.
למשל בקוד שלהלן השגיאה היא כזו:
קוד:
Error 1 'NotePadWindowsForms.Form1.Dispose(bool)': no suitable method found to override C:\Documents and Settings\Administrator\Local Settings\Application Data\Temporary Projects\NotePad\Form1.Designer.cs 14 33 NotePad
קוד:
using System;
using System.Windows.Forms;
using System.Drawing;
namespace NotePadWindowsForms
{
publicclassNotePadWindowsForms : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
public NotePadWindowsForms()
{
button1 = new System.Windows.Forms.Button();
// Button control and its properties
button1.Location = new System.Drawing.Point(8, 32);
button1.Name = "button1";
button1.Size = new System.Drawing.Size(104, 32);
button1.TabIndex = 0;
button1.Text = "Click me";
// Adding controls to the form
Controls.AddRange(new System.Windows.Forms.Control[] { button1 });
button1.Click += new System.EventHandler(button1_Click);
}
// Button click handler
privatevoid button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Button is clicked");
}
publicstaticint Main()
{
Application.Run(newNotePadWindowsForms());
return 0;
}
}
}
מה עלי לעשות?
איך לתקן זאת?
אודה מאוד לעוזרים!
ד"א אשמח לקבל אתר עם הדרכות ווידאו ל-Windows Application.
_____________________________________
"ניסיון רב לימדני, שלא תמיד העובדה שמבקרים אותך, משמעה שאתה טועה", רוברט אנטוני אדן.
"לא נכשלתי. רק מצאתי 10,000 דרכים שלא עובדות", תומאס אלווה אדיסון.
|