點先可以係C++/VB到調用外部程式..

2009-04-18 7:47 pm
我想令佢可以開2個程式..
eg: c:/abc.exe -abcd
d:/def.exe -xyz
要點寫先可以有呢個效果? 同埋我想第1個程式開戈陣最小化..第2個要最大化..thx

回答 (1)

2009-04-19 7:16 pm
✔ 最佳答案
我對c++5係咁熟悉, 呢個係用vb寫的, 運用左shell函數.
Public Class Form1
Dim path As String = "C:\abc.exe"
Dim path1 As String = "D:\def.exe"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell(path, AppWinStyle.MinimizedNoFocus)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Shell(path1, AppWinStyle.MaximizedFocus)
End Sub
End Class
參考: 自己


收錄日期: 2021-04-25 00:14:29
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090418000051KK00630

檢視 Wayback Machine 備份