Skip to content

Commit

Permalink
안없어지는 것 수정
Browse files Browse the repository at this point in the history
2024.05.01 기준 검은창이 아니라 회색창으로 나옴
  • Loading branch information
ProjectEli committed May 1, 2024
1 parent 211993f commit 2cc1bc1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ private void 자동갱신ToolStripMenuItem_Click(object sender, EventArgs e)

public void Doit()
{
if (!kkParams.MainHandleFound || kkParams.MainHandle != FindWindow("EVA_Window_Dblclk", "카카오톡"))
if (!kkParams.MainHandleFound || kkParams.MainHandle != FindWindow("EVA_Window_Dblclk",String.Empty))
{
kkParams.MainHandle = FindWindow("EVA_Window_Dblclk", "카카오톡");
kkParams.MainHandle = FindWindow("EVA_Window_Dblclk", String.Empty);
// notifyIcon1.ShowBalloonTip(5000,"알림",kkParams.MainHandle.ToString(), ToolTipIcon.Info);
if (kkParams.MainHandleFound)
{
notifyIcon1.ShowBalloonTip(5000, "성공", "카톡 창을 찾았습니다. 작업에 들어갑니다!", ToolTipIcon.Info);
Expand All @@ -68,7 +69,7 @@ public void Doit()
}
}

kkParams.HwndAdArea = FindWindowEx(kkParams.MainHandle, IntPtr.Zero, "BannerAdWnd", null);
kkParams.HwndAdArea = FindWindowEx(kkParams.MainHandle, IntPtr.Zero, "BannerAdContainer", null);

if (kkParams.AdHandleFound)
unsafe
Expand Down Expand Up @@ -100,7 +101,7 @@ private static unsafe bool EnumWindowsCommand(IntPtr hwnd, IntPtr lParam)
WindowsCommandParams* p = (WindowsCommandParams*)lParam;
string className = GetClassName(hwnd);

if (GetParent(hwnd) == p->MainHandle && hwnd != p->HwndAdArea && className == "EVA_ChildWindow")
if (GetParent(hwnd) == p->MainHandle && hwnd != p->HwndAdArea && className == "EVA_Window_Dblclk")
{
_ = GetWindowRect(hwnd, out var currentRect);
_ = SetWindowPos(hwnd, hWndInsertAfter: (IntPtr)1, 0, 0, currentRect.right - currentRect.left,
Expand Down

0 comments on commit 2cc1bc1

Please sign in to comment.