C
C#8mo ago
Antares

✅ Windows Forms Problem

I have a Problem it only shows "<" then the COmputer name but nothing else ```cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Defraint { public partial class Form1 : Form { int positionX = 219; int positionY = 9; public Form1() { InitializeComponent(); } private void SendButton_Click(object sender, EventArgs e) { string message = MsgBox.Text; string labelText = "<" + Environment.MachineName + "> " + message; Label newLabel = new Label(); newLabel.Text = labelText; newLabel.Location = new System.Drawing.Point(positionX, positionY); positionY += 25; newLabel.ForeColor = Color.White; newLabel.Font = new Font("Calibri", 16); this.Controls.Add(newLabel); } } }
5 Replies
Antares
AntaresOP8mo ago
When i leave the Environment.MachineName out it works
SpReeD
SpReeD8mo ago
$codegif
SpReeD
SpReeD8mo ago
Have you tried stepping through the code or use the immediate window to debug? Any exceptions?
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server