看板 C_Sharp 關於我們 聯絡資訊
※ 引述《Eric30 (eric)》之銘言: : ※ 引述《huggie (huggie)》之銘言: : : 我想要讓 form 位置開在螢幕右下角 : : 請問這是要得到螢幕位置嗎? 還是要怎麼做? : : 那要怎麼設定呢? : Rectangle rect = Screen.GetWorkingArea(this); : this.Top = rect.Bottom - this.Height; : this.Left = rect.Right - this.Width; : this.StartPosition = FormStartPosition.Manual; 謝謝 我照著這樣做可是位置沒有到耶 又約多補了 Top + 173 跟 Width + 61 才到角落 我把這幾行放在 form 的 constructor 裡面, InitializeComponent() 之前, 請問這樣對嗎? 是不是原本在 IDE form properties 中設的 Size 屬性在 constructor 中還沒有生效? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.160.67
huggie:啊! 放在 InitializeComponent 之後就 OK 了 多謝! 04/12 12:05