This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Dialog box showing up in background on 64-bit machines.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2010
03:20 PM
Dialog box showing up in background on 64-bit machines.
I have a managed custom action that calls a C# DLL. The C# DLL displays a dialog. When I run this custom action on a Windows 2008 64-bit machine all of the C# dialogs show up in the background behind the installer window. Does anyone know how to make those dialogs come to the foreground. It works on all other types of operating systems.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 24, 2010
04:53 PM
I have the same problem.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 25, 2010
12:26 PM
I found a few answers to the problem. There are two ways to do this I think. What are you trying to call from your custom action?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 25, 2010
12:32 PM
I'm executing an EXE that gets installed with the product.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 25, 2010
12:48 PM
This is what I ended up using:
[CODE]
...
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetForegroundWindow();
public class WindowWrapper : System.Windows.Forms.IWin32Window
{
public WindowWrapper(IntPtr handle)
{
_hwnd = handle;
}
public IntPtr Handle
{
get { return _hwnd; }
}
private IntPtr _hwnd;
}
...
MessageBox.Show(new WindowWrapper(GetForegroundWindow()), "Yippee!");
[/CODE]
[CODE]
...
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetForegroundWindow();
public class WindowWrapper : System.Windows.Forms.IWin32Window
{
public WindowWrapper(IntPtr handle)
{
_hwnd = handle;
}
public IntPtr Handle
{
get { return _hwnd; }
}
private IntPtr _hwnd;
}
...
MessageBox.Show(new WindowWrapper(GetForegroundWindow()), "Yippee!");
[/CODE]