private void GPULabels()
{
newGPUTextLabel.Location = new Point(340, 100);
newGPUTextLabel.Height = 250;
newGPUTextLabel.Width = 500;
newGPUTextLabel.ForeColor = Color.Blue;
newGPUTextLabel.Font = new Font("Arial", 35, FontStyle.Bold);
newGPUTextLabel.Text = " - הטמפרטורה כעת";
button3.Enabled = false;
newGPULabel.Location = new Point(250, 100);
newGPULabel.Height = 250;
newGPULabel.Width = 500;
newGPULabel.ForeColor = Color.Red;
newGPULabel.Font = new Font("Arial", 35, FontStyle.Bold);
button3.Enabled = false;
}
private void CPULabels()
{
temperature_label.Location = new Point(250, 200);
temperature_label.Height = 250;
temperature_label.Width = 500;
temperature_label.ForeColor = Color.Red;
temperature_label.Font = new Font("Arial", 35, FontStyle.Bold);
textMode_label.Location = new Point(340, 200);
textMode_label.Height = 250;
textMode_label.Width = 500;
textMode_label.ForeColor = Color.Blue;
textMode_label.Font = new Font("Arial", 35, FontStyle.Bold);
textMode_label.Text = " - הטמפרטורה כעת";
button3.Enabled = false;
}
我将标签添加到控件并为每个控件做了实例。我还在构造函数中调用了这两个函数。
我在表格上看到了所有标签,除了:newGPUTextLabel
Form1 尺寸为:800x600
如果我换行:
newGPUTextLabel.Location = new Point(340, 100);
到
newGPUTextLabel.Location = new Point(340, 10);
所以我看到了 newGPUTextLabel,但它在表单的顶部,我希望它靠近 textMode_label。