ich die Position der Markierung in dem folgenden Code nicht ändern kann sich ändern:kann nicht die Position der Markierung C#
public static void Initialize()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var F = new Form
{
BackColor = Color.Black,
TransparencyKey = Color.Black,
Bounds = Screen.PrimaryScreen.Bounds,
FormBorderStyle = FormBorderStyle.None,
Location = new Point(0, 0),
MinimumSize = new Size(1920, 1080),
TopMost = true
};
var Summoner1 = new Label
{
AutoSize = true,
Text = "Summoner Flashs in 20",
Dock = DockStyle.Fill,
ForeColor = Color.White,
Font = new Font("Consolas", 12),
Location = new Point(0, 500)
};
var Summoner2 = new Label
{
AutoSize = true,
Text = "Test",
Dock = DockStyle.Fill,
ForeColor = Color.White,
Font = new Font("Consolas", 12),
Location = new Point(40, 20)
};
var Summoner3 = new Label
{
AutoSize = false,
Text = "Summoner Flash in 20",
Dock = DockStyle.Fill,
ForeColor = Color.White,
Font = new Font("Consolas", 12),
Location = new Point(0, 0)
};
var Summoner4 = new Label
{
AutoSize = false,
Text = "Summoner Flash in 20",
Dock = DockStyle.Fill,
ForeColor = Color.White,
Font = new Font("Consolas", 12),
Location = new Point(0, 0)
};
var Summoner5 = new Label
{
AutoSize = false,
Text = "Summoner Flash in 20",
Dock = DockStyle.Fill,
ForeColor = Color.White,
Font = new Font("Consolas", 12),
Location = new Point(0, 0)
};
F.Controls.Add(Summoner1);
F.Controls.Add(Summoner2);
Application.Run(F);
}
Ich habe den Code dort:
Location = new Point(0, 500)
aber es scheint bei 0, 0 erscheinen, unabhängig davon, was ich da hineinlege, wodurch es so aussieht, als ob nur die Beschwörung1-Beschriftung initialisiert wird, nicht der Rest von ihnen (ich habe es nur mit Beschwörer1 und Beschwörer2 versucht). Was ist das Problem damit?
https://stackoverflow.com/help/someone-answers – mjwills