Gigahard писал(а):2Goro: А в 98/95 Виндах в списке процессов не видно будет?
Gigahard писал(а):Кстати я попробовал... В 98х App.Taskvisible=False не работает... ИМХО это че то другое....
Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Public Sub MakeMeService()
Dim pid As Long, reserv As Long
'Get the current process ID
pid = GetCurrentProcessId()
'Register as service
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub UnMakeMeService()
Dim pid As Long, reserv As Long
'Get the current process ID
pid = GetCurrentProcessId()
'Unregister as service
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
MakeMeService
'Right now, you're program is hidden from the CTRL-ALT-DEL-list
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnMakeMeService
End Sub
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Form_Load() 'собсно загружаем данные из файла
On Error Resume Next
fn = FreeFile
On Error Resume Next
Open "c:\prikol.sys" For Input As fn
Line Input #fn, str
Close fn
t = Left(str, InStr(str, "|") - 1)
l = Mid(str, InStrRev(str, "|") + 1, Len(str) - InStrRev(str, "|"))
Form1.Top = t
Form1.Left = l
End Sub
'------------------
Private Sub Form_Unload(Cancel As Integer) 'сохраняем позицию формы в файл
On Error Resume Next
fn = FreeFile
On Error Resume Next
Open "c:\prikol.sys" For Output As fn
Print #fn, Form1.Top & "|" & Form1.Left
Close fn
On Error Resume Next
Call ShellExecute(hwnd, "Open", App.Path & "\" & App.EXEName & ".exe", "", App.Path, 1)
End Sub
Сейчас этот форум просматривают: AhrefsBot и гости: 57