منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
لانشاء فورم غير مرئيه في البدايه البرنامج بال C# و VB.net - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : الأقسام التعليمية - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=90)
+--- قسم : مكتبة أكواد المنتدى (http://vb4arb.com/vb/forumdisplay.php?fid=111)
+---- قسم : مكتبة أكواد .net (http://vb4arb.com/vb/forumdisplay.php?fid=117)
+---- الموضوع : لانشاء فورم غير مرئيه في البدايه البرنامج بال C# و VB.net (/showthread.php?tid=6168)



لانشاء فورم غير مرئيه في البدايه البرنامج بال C# و VB.net - RaggiTech - 17-10-12

كاتب الموضوع : AhmedEssawy

' Visual Basic


كود :
Sub Main()


' Instantiate a new instance of Form1.


Dim f1 as New Form1()


' Display a messagebox. This shows the application is running,


' yet there is nothing shown to the user. This is the point at


' which you customize your form.


System.Windows.Forms.MessageBox.Show( _


"The application is running now, but no forms have been shown.")


' Customize the form.


f1.Text = "Running Form"


' Show the instance of the form modally.


f1.ShowDialog()


End Sub
// C#


كود :
//All methods must be contained in a class.


// This class is added to the namespace containing the Form1 class.


class MainApplication


{


public static void Main()


{


// Instantiate a new instance of Form1.


Form1 f1 = new Form1();


// Display a messagebox. This shows the application


// is running, yet there is nothing shown to the user.


// This is the point at which you customize your form.


System.Windows.Forms.MessageBox.Show("The application "


+ "is running now, but no forms have been shown.");


// Customize the form.


f1.Text = "Running Form";


// Show the instance of the form modally.


f1.ShowDialog();


}


}

}