Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Make .NET called Print Dialog frontmost

In an effort to give my end user standard windows print capabilites, I am using .NET to call print dialogs (setup/preview/print).

The problem is that the dialog pops up behind my active LV windows.

This can be overcome by using the overloaded ShowDialog(owner) method.

The problem is: I can not find a way to properly obtain an owner ref to the active LV window/app so that the dialog is modal on top of LV.

Any Ideas?
0 Kudos
Message 1 of 3
(3,494 Views)
One thing you could try is to create a class that implements the IWin32Window interface. Check out this article here (search for IWin32Window to get to the topic) on how to set this up.

You can wrap the GetForeGroundWindow() function and use that to get the window handle. I think this function should give you the correct window handle automatically. But if it doesnt' you can always get the HWND yourself and then pass it into a class that implements the IWin32Window, and then pass that class to the ShowDialog method.

I hope this helps.
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,484 Views)
For the archives, more information about this can be found in this thread from the LabVIEW forum.

- Elton
0 Kudos
Message 3 of 3
(3,478 Views)