c# - How to make the Show Properties window to stay always on top of a form already set to be always on top? -
i want call standard show properties window form. form on top , show properties window displayed below it. how make show properties window stay on top of form?
below code used show properties window.
// show properties window [dllimport("shell32.dll", charset = charset.auto)] static extern bool shellexecuteex(ref shellexecuteinfo lpexecinfo); [structlayout(layoutkind.sequential, charset = charset.auto)] public struct shellexecuteinfo { public int cbsize; public uint fmask; public intptr hwnd; [marshalas(unmanagedtype.lptstr)] public string lpverb; [marshalas(unmanagedtype.lptstr)] public string lpfile; [marshalas(unmanagedtype.lptstr)] public string lpparameters; [marshalas(unmanagedtype.lptstr)] public string lpdirectory; public int nshow; public intptr hinstapp; public intptr lpidlist; [marshalas(unmanagedtype.lptstr)] public string lpclass; public intptr hkeyclass; public uint dwhotkey; public intptr hicon; public intptr hprocess; } const int sw_show = 5; const uint see_mask_invokeidlist = 12; public static void showproperties(string filename) { shellexecuteinfo info = new shellexecuteinfo(); info.cbsize = marshal.sizeof(info); info.lpverb = "properties"; info.lpfile = filename; info.nshow = sw_show; info.fmask = see_mask_invokeidlist; shellexecuteex(ref info); } i thought disabling topmost property of form temporarily, have no idea how detect when show properties window has been closed activate topmost again.
Comments
Post a Comment