public sealed class myform: form
{
private static myform s_Instance = null;
private static object s_LockObj = new Object();
private myform() { }
public static myform Instance
{
get
{
if (s_Instance == null)
{
lock (s_LockObj)
{
if (s_Instance == null)
{
s_Instance = new myform();
}
}
}
return s_Instance;
}
}
}
הבעיה היא שכשאני מריץ את ה-exe פעמיים, אז נפתחים 2 חלונות, ואני לא רוצה את זה ככה. רק פתיחה אחת...
