0

I am running an NW js application in kiosk mode,and i am giving option to launch native windows desktop apps from it, Issue:- After i am launching the child application ,if i click any where in the body of nw js application,the child application window is going background of nwjs window,

Looking for: How to set NWjs window always in background ,if child window opens it should be in foreground until it minimize,

Thank you Sandeep KS

4

1 回答 1

1

使用以下 c# 代码创建一个子应用程序,并从 nwjs 应用程序运行该子进程

SetWindowPos 可以使窗口 AlwaysOnTop。它很可能会给出相反的结果。尝试以下方式:

[DllImport("user32.dll")]
static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X,
   int Y, int cx, int cy, uint uFlags);


 public const uint SWP_NOSIZE          = 0x0001;
 public const uint SWP_NOMOVE          = 0x0002;
 public const uint SWP_NOACTIVATE      = 0x0010;
 public const int HWND_BOTTOM = 1;


SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
于 2017-06-01T12:34:26.437 回答