IMHO.WS

IMHO.WS (http://www.imho.ws/index.php)
-   Программирование (http://www.imho.ws/forumdisplay.php?f=40)
-   -   Visual Basic 6 help (http://www.imho.ws/showthread.php?t=58459)

BRULIK 12.05.2004 00:49

Visual Basic 6 help
 
Как программно запустить Service в WinXP ?
Как запустить другую программу в VB ?
Если можно ,в примерах.
senks.

joker99 12.05.2004 01:14

Можно это сделать через Win API.

A в принципе вот пример(правда на c++) как запустит какую нибудь програму из своей как service
http://www.codeproject.com/system/xyntservice.asp

BRULIK 12.05.2004 01:21

a VB ?

BRULIK 12.05.2004 13:22

какой .ocx подключить , чтоб считывать картинку с webcamrы ?

Eternity 12.05.2004 23:56

Где можно достать подробную инфу по этой проге?

joker99 13.05.2004 00:50

По какой?

BRULIK 13.05.2004 02:59

неужели все .Net юзают ?

Eternity 13.05.2004 11:36

VB6
У меня есть диск с самоучителем, но он как-то нихера толком не объяснет!

V@nya 13.05.2004 16:24

А shell "net /start имя_сервиса" не пробовал?
Про .NET ты прав, сейчас все переходят на него.

BRULIK 16.05.2004 10:51

' Start the indicated program and wait for it
' to finish, hiding while we wait.
Private Sub ShellAndWait(ByVal program_name As String, _
ByVal window_style As VbAppWinStyle)
Dim process_id As Long
Dim process_handle As Long

' Start the program.
On Error GoTo ShellError
process_id = Shell(program_name, window_style)
On Error GoTo 0

' Hide.
Me.Visible = False
DoEvents

' Wait for the program to finish.
' Get the process handle.
process_handle = OpenProcess(SYNCHRONIZE, 0, process_id)
If process_handle <> 0 Then
WaitForSingleObject process_handle, INFINITE
CloseHandle process_handle
End If

' Reappear.
Me.Visible = True
Exit Sub

ShellError:
MsgBox "Error starting task " & _
txtProgram.Text & vbCrLf & _
Err.Description, vbOKOnly Or vbExclamation, _
"Error"
End Sub

BRULIK 16.05.2004 10:52

spasibo Vane :)


Часовой пояс GMT +4, время: 08:38.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.