看板 C_Sharp 關於我們 聯絡資訊
各位好... CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace Trig_a_form { class Program { static void Main(string[] args) { Application.run(Form1); } } } 我想再class Program的main function 啟動時把我已經寫好的windows form Form1 去activate起來... 可是試了一些方法都行不太通 請問問題在哪呢... 還是說 windows form Form1 它本身有method 可以自動啟動? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.130.102
tfshnike:Application.Run(new Form1()) or new Form1().Show() 06/15 21:36
m13m13m:請問VS 說我只有class檔案要加入excutable file 才行... 06/15 21:45
m13m13m:可是我看書上也沒有加... >"< 06/15 21:45
m13m13m:它不讓執行.... 06/15 21:46
m13m13m:我有把它弄成set as start up... 06/15 21:49
m13m13m:Go to Properties 把output type設成console application 06/15 22:14
m13m13m:instead of Class library 06/15 22:14
m13m13m:tf 謝 06/15 22:15