传真对话框正在进行背景。 [英] Fax dialog is going background.
问题描述
您好,
我正在使用ProcessStartInfo()类弹出Microsoft Fax对话框以发送文件。
I'm using ProcessStartInfo() class to popup the Microsoft Fax dialog to send a file.
我已设置如下参数;
PSInfo.FileName =<文件路径>发送;
PSInfo.FileName= <File path> to send;
PSInfo.CreateNoWindow = true;
PSInfo.CreateNoWindow = true;
PSInfo.WindowStyle = ProcessWindowStyle.Hidden; // ProcessWindowStyle.Normal也不起作用。
PSInfo.WindowStyle =ProcessWindowStyle.Hidden;//ProcessWindowStyle.Normal also doesn't works.
PSInfo.UseShellExecute = true;
PSInfo.UseShellExecute =true;
PSInfo.Ver =" PrintTo";
PSInfo.Ver ="PrintTo";
之后代码进程proc = Process.Start(PSInfo)执行,rundll32.exe将运行1秒后自动关闭。
After the code Process proc=Process.Start(PSInfo) execution, rundll32.exe will run for 1 second and then closes automatically.
问题是Microsoft Fax对话框显示在后面(即背景) &NBSP;我在64位PC中的主要应用程序(但在32位PC中,它可以正常工作,即显示前景)。
The problem is Microsoft Fax dialog is displayed behind (i.e., background) my main application in 64-bit PC's ( but in 32-bit PC's, it works fine i.e., displayed foreground).
因为proc.MainWindowHandle为'0'并且 proc.MainWindowTitle = QUOT;" (可能是因为rundll32.exe没有窗口),我无法使用FindWindow()或SetForegroundWindow()函数将传真对话框置于前台。
Since proc.MainWindowHandle is '0' and proc.MainWindowTitle="" (probably because rundll32.exe has no window) , I'm not able to use FindWindow() or SetForegroundWindow() functions to bring Fax dialog to foreground.
我也试图获取 MainWindowHandle&NBSP; WFS.exe进程(WFS.exe在出现传真对话框时启动),但仍然是MainWindowHandle为'0'和'proc.MainWindowTitle =""。
I also tried to get MainWindowHandle of WFS.exe process(WFS.exe is launched when Fax dialog appears), but still MainWindowHandle is '0' and proc.MainWindowTitle="".
注意:相同其他已安装的传真驱动程序的窗口也出现问题。
Note: Same problem occurs with window of other installed Fax drivers as well.
请帮助我如何处理传真对话框或如何将传真对话框带到前台。
Kindly help me how to get handle to Fax dialog or how can I bring Fax dialog to foreground.
谢谢,
Abhilash
推荐答案
您好,
谢谢。它对我有用。
但我能否知道为什么我应该调用Wow64DisableWow64FsRedirection()来解决问题,以便我知道为什么我正在调用Wow64DisableWow64FsRedirection ()?
But can I know the reason that why should I call Wow64DisableWow64FsRedirection() to resolve the issue, so that I will be knowing why exactly I'm calling Wow64DisableWow64FsRedirection()?
我是否需要调用Wow64RevertWow64FsRedirection()。因为,MSDN指定为每次调用Wow64DisableWow64FsRedirection()调用Wow64RevertWow64FsRedirection()。
Should I need to call Wow64RevertWow64FsRedirection(). Because, MSDN specifies to call Wow64RevertWow64FsRedirection() for every call to Wow64DisableWow64FsRedirection().
这篇关于传真对话框正在进行背景。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!