VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Locking multiple files

Tim Fischer  (2 Submissions)   Files/File Controls/Input/Output   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Program opens text file for input, reads name of files in list, then locks those
files. Uses form and module, also shows system tray icon.

Assumes
Code is NOT FINAL, must be customized to needs. Have picture box as picture1 hidden and the picture be your system tray icon. Have timer as timer1 and set interval for time to be shown. IMPORTANT SYSTEM TRAY!!! Have a picture box as picHook and visible = false.

API Declarations
Option Explicit
'System tray stuff
Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type

Public Const NIM_ADD = 0
Public Const NIM_MODIFY = 1
Public Const NIM_DELETE = 2
Public Const NIF_MESSAGE = 1
Public Const NIF_ICON = 2
Public Const NIF_TIP = 4
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_RBUTTONDBLCLK = &H206
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_MOUSEMOVE = &H200
Public Const WM_NULL = &H0
Declare Function Shell_NotifyIconA Lib "shell32" _
(ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Integer
Declare Function PostMessage Lib "user32" _
Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long

Rate Locking multiple files (39(39 Vote))
Locking multiple files.bas

Locking multiple files Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters