G
Guest
I need help with transparent text in controls. Suddenly text in controls like
listboxes and messageboxes have become transparent. Applications that has
been working for over a year, just stopped working without anyone has changed
the code or recompiled them. If I remove [StatThread] above the main method
the text become visible. I'm not sure what [StatThread] means, but I do know
that it is required when implementing drag and drop functionallity. This is a
small test app where this behaviour occurs.
using System;
using System.Windows.Forms;
namespace HelloWorld
{
public class Form1 : System.Windows.Forms.Form
{
public Form1(){InitializeComponent();}
[STAThread] //Remove to see the MessageBox
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Form1_Load);
}
private void Form1_Load(object sender, System.EventArgs e)
{
MessageBox.Show("HelloWorld");
}
}
}
listboxes and messageboxes have become transparent. Applications that has
been working for over a year, just stopped working without anyone has changed
the code or recompiled them. If I remove [StatThread] above the main method
the text become visible. I'm not sure what [StatThread] means, but I do know
that it is required when implementing drag and drop functionallity. This is a
small test app where this behaviour occurs.
using System;
using System.Windows.Forms;
namespace HelloWorld
{
public class Form1 : System.Windows.Forms.Form
{
public Form1(){InitializeComponent();}
[STAThread] //Remove to see the MessageBox
static void Main()
{
Application.Run(new Form1());
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Form1_Load);
}
private void Form1_Load(object sender, System.EventArgs e)
{
MessageBox.Show("HelloWorld");
}
}
}