SetWindowLong
フォームをクリックしてオーバーレイを表示するために使用します。クリック可能なボタンといくつかの要素を作成したいのですが、フォームはオーバーレイであるため、まだ見えません。
私のオンロード機能:
this.BackColor = Color.Wheat;
this.TransparencyKey = Color.Wheat;
this.TopMost = true;
//this.DoubleBuffered = true;
this.FormBorderStyle = FormBorderStyle.None;
int initialStyle = GetWindowLong(this.Handle, -20);
SetWindowLong(this.Handle, -20, initialStyle | 0x80000 | 0x20);
GetWindowRect(handle, out rect);
this.Size = new Size(rect.right - rect.left, rect.bottom - rect.top);
this.Top = rect.top;
this.Left = rect.left;
その他のセクション:
public struct RECT
{
public int left, top, right, bottom;
}
と
RECT rect;
public const string WINDOW_NAME = "WINDOWNAME_WHATEVER";
IntPtr handle = FindWindow(null, WINDOW_NAME);
ボタンに何が起こっているのか、どうすればこれを機能させることができますか?