蔡鸟问题,高分求救!!!!!!!!!!
位大虾,我在我的asp.net工程中添加了一个process组件,执行
process.start() 时,我可以从进程管理器中看到我所要打开的进程打开了,但是我的windows中却没有开启任何窗口(createnowindow属性无论设为true 还是false都没有效果)
再请问如何给我开的进程发送消息,可以用win32api吗?
源程序如下
public class webform1
inherits system.web.ui.page
protected withevents myprocess as system.diagnostics.process
protected withevents button2 as system.web.ui.webcontrols.button
protected withevents button1 as system.web.ui.webcontrols.button
#region " web 窗体设计器生成的代码 "
该调用是 web 窗体设计器所必需的。
<system.diagnostics.debuggerstepthrough()> private sub initializecomponent()
me.myprocess = new system.diagnostics.process()
end sub
private sub page_init(byval sender as system.object, byval e as system.eventargs) handles mybase.init
codegen: 此方法调用是 web 窗体设计器所必需的
不要使用代码编辑器修改它。
initializecomponent()
end sub
#end region
private sub page_load(byval sender as system.object, byval e as system.eventargs) handles mybase.load
在此处放置初始化页的用户代码
end sub
private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click
myprocess.startinfo.filename = "c:\test22.exe" 换成任何程序都无效
myprocess.startinfo.createnowindow = false
myprocess.startinfo.windowstyle = diagnostics.processwindowstyle.maximized
if myprocess.start() = true then 窗口不被显示,但是进程被执行
response.write("ok") 结果显示是"ok"
else
response.write("faild")
end if
end sub
end class
推荐阅读


讨论区