Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: acaa081edd
Fetching contributors…

Cannot retrieve contributors at this time

73 lines (58 sloc) 2.581 kb
<?xml version="1.0"?>
<H2>
<SourceCode>//_O2Include:Util - Windows Handles Viewer (with Child Windows).h2
//O2Include:Util - Windows Handles Viewer (Simple Gui).h2
var parentForm = (Form)topPanel.parentForm();
parentForm.resizeFormToControlSize(panel);//.closeForm_InNSeconds(10).alwaysOnTop();
/*parentForm.set_Text("Util - Windows Handles Viewer (with Simple Hijack")
.width(1000).height(500);
*/
var selectedWindow = topPanel.insert_Below();
topPanel.splitterDistance(35);
var toolStrip = selectedWindow.insert_Above_ToolStrip();
toolStrip.insert_Left(120).add_Label("On Selected Handle --&gt;").top(5);
//selectedWindow.insert_Below(25).add_Label("Parent Handle").top(2).append_TextBox(ref parentValue);
var screenshot = selectedWindow.insert_Right("ScreenShot").add_PictureBox().layout_Zoom();;
var hijackPanel = selectedWindow.add_GroupBox("Hijacked Window");
windowFinder.Window_Changed =
(handle)=&gt;{
screenshot.show(handle.window_ScreenShot());
};
IntPtr hijackedHandle = IntPtr.Zero;
IntPtr hijackedHandleParent = IntPtr.Zero;
Action restoreHijact =
()=&gt;{
if (hijackedHandle != IntPtr.Zero)
{
"restoring {0} to have parent {1}".info(hijackedHandle, hijackedHandleParent);
hijackedHandle.setParent(hijackedHandleParent);
}
};
Action&lt;IntPtr,IntPtr&gt; hijackHandle =
(handle,newParent)=&gt;{
//var hostPanel = "Hijacked Window".popupWindow();
restoreHijact();
hijackedHandle = handle;
hijackedHandleParent = handle.parent();
"Hijacking {0} with parent {1}".info(hijackedHandle, hijackedHandleParent);
handle.setParent(newParent);
};
Action&lt;IntPtr&gt; hijackHandle_Below =
(handle)=&gt;hijackHandle(handle, hijackPanel.handle());
Action&lt;IntPtr&gt; hijackHandle_NewWindow =
(handle)=&gt;{
var window = "Handle Hijacked Window".popupWindow();
hijackHandle(handle, window.handle());
};
toolStrip
.add("Hide" , ()=&gt; windowFinder.Last_Handle.window_Hide())
.add("Show" , ()=&gt; windowFinder.Last_Handle.window_Show())
.add("Hijack below" , ()=&gt; hijackHandle_Below(windowFinder.Last_Handle))
.add("Hijack in new Window" , ()=&gt; hijackHandle_NewWindow(windowFinder.Last_Handle))
.add("Restore Hijack" , ()=&gt; restoreHijact())
.add("Repl Handle" , ()=&gt; windowFinder.Last_Handle.script_Me("handle"))
.add("Open Notepad" , ()=&gt; "notepad.exe".startProcess());
//onHandleChange(handleTree.handle());
//O2File:WindowFinder.cs</SourceCode>
<ReferencedAssemblies />
</H2>
Jump to Line
Something went wrong with that request. Please try again.