» »

VisualBasic vprasanje

VisualBasic vprasanje

alesrosina ::

zanima me kako narest, da se ikona programa pojavi v taskbaru (tm kt je ura v Windowsih).

webblod ::

Najprej kreiraš nov podatkovni tip:

Public 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

Določiš potrebne konstante:

Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1
Public Const NIM_DELETE = &H2
Public Const NIF_MESSAGE = &H1
Public Const NIF_ICON = &H2
Public Const NIF_TIP = &H4
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const WM_LBUTTONDBLCLK = &H203
Public Const WM_RBUTTONDOWN = &H204
Public Const WM_RBUTTONUP = &H205
Public Const WM_RBUTTONDBLCLK = &H206

Nato deklariraš funkcije:

Public Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long

Public Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

in seveda kreiraš spremenljivko podatkovnega tipa:

Public nid As NOTIFYICONDATA

Sedaj pa še spišeš kodo, ki bo vse to 'pohandlala'... Lahko jo ustvariš v inicializaciji programa (torej main proceduri) ali pa daš uporabniku možnost izbire "Show in System Tray"... Pač kakor hočeš.

Upam da sem ti odprl pogled na zadevo...

LP

There must be a reason, why I'm so damn dissapointed on M$ Visual Basic
WEBblod.NET :: Slovenska programerska scena

alesrosina ::

hvala ti.


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

[C#] Prosim pomagajte! Potrebujem program, ki bi pobiral podatke iz ene strani

Oddelek: Programiranje
212746 (2356) David1994
»

Vb6

Oddelek: Programiranje
101327 (1190) StratOS
»

API+VB

Oddelek: Programiranje
262088 (1792) webblod
»

Odpiranje dat.exe v VB

Oddelek: Programiranje
122988 (2781) webblod
»

Visual basic Progress bar

Oddelek: Programiranje
51561 (1494) Lunik

Več podobnih tem