aRo`

automating your e-commerce

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 […]

Showing a notifyicon with a pop-up menu

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 […]