Forum » Programiranje » vb6 + taskbar
vb6 + taskbar
DJroky ::
enkrat je bil tukaj postopek kako lahko v vb6 naredimo da program teče v ozadju in je viden samo v taskbaru. se kdo spomni kako?
hvala
hvala
webblod ::
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As TNotifyIconData) As Boolean
Private Type TNotifyIconData
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Const NIM_ADD = &H0
Const NIM_MODIFY = &H1
Const NIM_DELETE = &H2
Const NIF_MESSAGE = &H1
Const NIF_ICON = &H2
Const NIF_TIP = &H4
Const WM_MOUSEMOVE = &H200
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONDBLCLK = &H203
Const WM_RBUTTONDOWN = &H204
Const WM_RBUTTONDBLCLK = &H206
Dim Nid As TNotifyIconData
Private Sub Form_Load()
'Skrijemo obrazec
Me.Visible = False
With Nid
.cbSize = Len(Nid)
.hwnd = Form1.hwnd
.uId = 0
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Form1.Icon
.szTip = App.Name
End With
Shell_NotifyIcon NIM_ADD, Nid
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim Sporocilo As Long
AutoRedraw = True
Sporocilo = ScaleX(X, ScaleMode, vbPixels)
Select Case Sporocilo
Case WM_LBUTTONDOWN
MsgBox "Enojni klik z levim gumbom"
Case WM_LBUTTONDBLCLK
If Me.Visible Then Me.Visible = False Else Me.Visible = True
MsgBox "Dvojni klik z levim gumbom"
Case WM_RBUTTONDOWN
MsgBox "Enojni klik z desnim gumbom"
Case WM_RBUTTONDBLCLK
MsgBox "Dvojni klik z desnim gumbom"
End Select
End Sub
Private Sub Form_Unload(Cancel As Integer)
'Pospravimo ikono is opravilne vrstice
Shell_NotifyIcon NIM_DELETE, Nid
End Sub
Mislim, da razlaga ni potrebna.... Ali pač?
There must be a reason, why I'm so damn dissapointed on M$ Visual Basic
WEBblod.NET :: Slovenska programerska scena
WEBblod.NET :: Slovenska programerska scena
Zgodovina sprememb…
- spremenil: webblod ()
webblod ::
Lahko pa napišeš razlago, ker se meni ne da...
There must be a reason, why I'm so damn dissapointed on M$ Visual Basic
WEBblod.NET :: Slovenska programerska scena
WEBblod.NET :: Slovenska programerska scena
DJroky ::
Probu, pa dela, sam namest App.Name je treba dat App.Title. Zdej pa me zanima še to: ko greš v Windows Task Manager je ta program pod Application. Je možno narest tako da bo pod Processes, npr. tako kot MBM?
drugače pa hvala
drugače pa hvala
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [EXCEL] Pogojno kopiranje na drug listOddelek: Programiranje | 1777 (1699) | StratOS |
» | VB in kk dobit Ip od račnalnikaOddelek: Programiranje | 1206 (1040) | alesrosina |
» | API+VBOddelek: Programiranje | 2091 (1795) | webblod |
» | Odpiranje dat.exe v VBOddelek: Programiranje | 2989 (2782) | webblod |
» | Visual basic Progress barOddelek: Programiranje | 1561 (1494) | Lunik |