minimizing to the system tray is very complicated. I can do it with vb6 but trying to convert it to dbp is not working. here is the code
with one line rem that I am having trouble with. everything works until the last call dll line. if anybody knows what to do I would appreciate it. have fun
Type NOTIFYICONDATA
cbSize As dword
hwnd dword
uId As dword
uFlags As dword
uCallBackMessage As dword
hIcon As dword
szTip As string `64 spaces
EndType
`constants required by Shell_NotifyIcon API call:
#constant NIM_ADD = 0x0
#constant NIM_MODIFY = 0x1
#constant NIM_DELETE = 0x2
#constant NIF_MESSAGE = 0x1
#constant NIF_ICON = 0x2
#constant NIF_TIP = 0x4
#constant WM_MOUSEMOVE = 0x200
#constant WM_LBUTTONDOWN = 0x201 'Button down
#constant WM_LBUTTONUP = 0x202 'Button up
#constant WM_LBUTTONDBLCLK = 0x203 'Double-click
#constant WM_RBUTTONDOWN = 0x204 'Button down
#constant WM_RBUTTONUP = 0x205 'Button up
#constant WM_RBUTTONDBLCLK = 0x206 'Double-click
global nid As NOTIFYICONDATA
nid.cbSize = 88
nid.hwnd = hwnd
nid.uId = null
nid.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
nid.uCallBackMessage = WM_MOUSEMOVE
nid.hIcon = icon1 `----------------------------can't figure out this
nid.szTip = "Your ToolTip Goes Here" + ""
make memblock 1, 88
write memblock dword 1, 0, nid.cbsize
write memblock dword 1, 4, nid.hwnd
write memblock dword 1, 8, nid.uid
write memblock dword 1, 12, nid.uflags
write memblock dword 1, 16, nid.hicon
for i = 1 to len(nid.sztip)
write memblock byte 1, 16+i, asc(mid$(nid.sztip,i))
next i
load dll "user32.dll",1
hwnd = call dll( 1, "GetActiveWindow")
ret = call dll( 1, "SetForegroundWindow", hwnd)
print ret
delete dll 1
load dll "shell32.dll", 1
ret = call dll( 1, "Shell_NotifyIcon", NIM_ADD, get memblock ptr(1))
print ret
delete dll 1
wait key