11 Sep
Posted by aRo` as vb6
With the code below you can manipulate services on your computer.
Calling the function
ServiceStop “”, “SERVICENAME”
Declaration
Option Explicit
‘API Constants
Public Const SERVICES_ACTIVE_DATABASE = “ServicesActive”
‘ Service Control
Public Const SERVICE_CONTROL_STOP = &H1
Public Const SERVICE_CONTROL_PAUSE = &H2
‘ Service State - for CurrentState
Public Const SERVICE_STOPPED = &H1
Public Const SERVICE_START_PENDING = &H2
Public Const SERVICE_STOP_PENDING = &H3
Public Const SERVICE_RUNNING = &H4
Public Const SERVICE_CONTINUE_PENDING […]
The code belows shows how u can access your stored procedures from vb6.
In the example i use an input and output parameter so it is possible to select, update, insert data into the MS SQL 2000 database.
Stored procedure
CREATE Procedure MyStoredProcdure
(
@ID integer,
@Description varchar(100) output
)
AS
select @Description = Description
from dbo.MNZ_FOTO
WHERE ID = @ID
GO
vb code
On Error GoTo ErrHandler
Set […]
This vb6 code is used to show the small icon near to the system time (notify icon). In this example is also explained how u can create a pop-up menu by right-clicking on the icon.
Declaration
Option Explicit
‘ Type passed to Shell_NotifyIcon
Private Type NotifyIconData
Size As Long
Handle As Long
ID As Long
Flags As Long
CallBackMessage As Long
Icon As Long
Tip As […]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||