SaedAmer Posted July 30, 2019 Share Posted July 30, 2019 (edited) السلام عليكم بيحدث اخطاء غريبة في كتابة الكود و لما اكتبه ب vb.net بيجي مظبوط سألت كام شخص قالي المكبة ناقصة ف ايه حلها احد الاخطأ مثلا private void Button2_Click(object sender, EventArgs e) { Form2.Show(); this.Hide(); } بيجيبلي خطأ و عشان اعلاجها لازم اعرف الفورم من جديد و ده بيؤدي اني لما اضغط علي البوتن اكتر من مرة هيفتح الفورم اكتر من مرة مش نفس الفروم مثال private void Button2_Click(object sender, EventArgs e) { Form2 ff = new Form2(); ff.Show(); this.Hide(); } Edited July 30, 2019 by SaedAmer Link to comment
SaedAmer Posted July 30, 2019 Author Share Posted July 30, 2019 (edited) المفروض يبقا كدا using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.IO; namespace Server_Send_Text { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { ff.Show(); this.Hide(); private void Button2_Click(object sender, EventArgs e) { Application.Exit(); } } } لكن يظهر خطأ صورة للخطأ https://1.top4top.net/p_13062u79k1.png Edited July 30, 2019 by SaedAmer Link to comment
nxFairlywell Posted July 31, 2019 Share Posted July 31, 2019 ممم , اللغة تشبه للجافا بس لحدٍّ ما , حاولت اضبطه بس ما عرفت (voidعندك قوس ناقص ب سطر 31 (قوس اغلاق الـ + بعد ما تضيفه احذف اخر قوس Link to comment
ميدوح Posted July 31, 2019 Share Posted July 31, 2019 12 hours ago, SaedAmer said: المفروض يبقا كدا using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.IO; namespace Server_Send_Text { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { ff.Show(); this.Hide(); private void Button2_Click(object sender, EventArgs e) { Application.Exit(); } } } لكن يظهر خطأ صورة للخطأ https://1.top4top.net/p_13062u79k1.png using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.IO; namespace Server_Send_Text { public partial class Form1 : Form { Form2 ff = new Form2(); // ff.Show(); public Form1() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { ff.Show(); this.Hide(); private void Button2_Click(object sender, EventArgs e) { Application.Exit(); } } } Link to comment
SaedAmer Posted July 31, 2019 Author Share Posted July 31, 2019 32 minutes ago, ميدوح said: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.IO; namespace Server_Send_Text { public partial class Form1 : Form { Form2 ff = new Form2(); // ff.Show(); public Form1() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { ff.Show(); this.Hide(); private void Button2_Click(object sender, EventArgs e) { Application.Exit(); } } } كدا لو ضغط علي البوطن اكتر من مرة هيظهرلي النافذة اكتر من مرة مش نفسها Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now