:)

----- Original Message ----- 
From: "Rick Rose" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 17, 2004 7:49 AM
Subject: Re: [vbhelp] Re: Changing Program Icon at runtime


> if app.previnstance=true then
> msgbox "Already running"
> end if
>
> -------Original Message-------
>
> From: [EMAIL PROTECTED]
> Date: 05/16/04 17:26:05
> To: [EMAIL PROTECTED]
> Subject: Re: [vbhelp] Re: Changing Program Icon at runtime
>
> HI, thanks for that. It works great. The problem Ive been having is that I
> find that my users are running many instances of my app at a time. So, im
> trying to checnge icon colour for each to make it noticable which one is
> which in the taskbar...
>
> Of course. the next step is how to identify if an instance of my app is
> already active, is there an easy way of doing this?
>
> thanks
>
> rnd
>
>
>
>
> ----- Original Message -----
> From: "futureit2000" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, May 16, 2004 1:01 PM
> Subject: [vbhelp] Re: Changing Program Icon at runtime
>
>
> > Hi rnd,
> > I've done this before - I take it you are using VB6. Below is the
> > basic code you'll need. You'll have to drop the code in to make it
> > work properly with your app.
> >
> > Use Public Declare Function Shell_NotifyIcon Lib "shell32" _
> >     Alias "Shell_NotifyIconA" _
> >     (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean API,
> > and a picture box - You'll have some syntax something like this: -
> >
> > 'constants required by Shell_NotifyIcon API call:
> > 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     'Button down
> > Public Const WM_LBUTTONUP = &H202       'Button up
> > Public Const WM_LBUTTONDBLCLK = &H203   'Double-click
> > Public Const WM_RBUTTONDOWN = &H204     'Button down
> > Public Const WM_RBUTTONUP = &H205       'Button up
> > Public Const WM_RBUTTONDBLCLK = &H206   'Double-click
> >
> > Public Nid As NOTIFYICONDATA
> >
> > private sub form_load()
> > With Nid
> >         .cbSize = Len(Nid)
> >         .hwnd = FMain.hwnd
> >         .uId = vbNull
> >         .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
> >         .uCallBackMessage = WM_MOUSEMOVE
> >         .hIcon = FMain.Icon
> >         .szTip = "Some text" & vbNullChar
> >     End With
> > ' Add Icon to SysTray
> >     Shell_NotifyIcon NIM_ADD, Nid
> > end sub
> >
> > ' Change Icon
> > Public sub ChangeIcon()
> > me.icon = imageicons.ListImages.Item(1).Picture
> > refreshnid
> > end sub
> >
> > ' Refresh system tray icon
> > Public sub RefershNid()
> > With Nid
> >         .cbSize = Len(Nid)
> >         .hwnd = FMain.hwnd
> >         .uId = vbNull
> >         .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
> >         .uCallBackMessage = WM_MOUSEMOVE
> >         .hIcon = FMain.Icon
> >         .szTip = "What ever you want" & vbNullChar ' U must add
> >     End With
> >     Shell_NotifyIcon NIM_MODIFY, Nid
> > end sub
> >
> > Private Sub Form_Unload(Cancel As Integer)
> >     ' Remove the Icon from the System Tray
> >     Shell_NotifyIcon NIM_DELETE, Nid
> > end sub
> >
> > --- In [EMAIL PROTECTED], "Rick Rose" <[EMAIL PROTECTED]> wrote:
> > > Do you want to change the systray icon?  If so, use a picture box to
> > > hold your icon picture.  Then change the picture in the picture box.
> > > Or, use 2 picture boxes.  Each holding a different picture.
> > > Me.icon=picture1.picture
> > >
> > > Only in theory.  It is not tested.  That might work with the regular
> > > icon as well.
> > >
> > > -----Original Message-----
> > > From: rnd [mailto:[EMAIL PROTECTED]
> > > Sent: Saturday, May 15, 2004 12:50 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [vbhelp] Changing Program Icon at runtime
> > >
> > > How do I change the icon of the form at runtime??... to show the
> > user
> > > its
> > > processing..
> > >
> > > btw, many thanks for the help with the listview, worked well:)
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Chad" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, May 12, 2004 9:35 PM
> > > Subject: RE: [vbhelp] Re: Simple database question (I guess)
> > >
> > >
> > > > > Worked first time.......................
> > > > > Thanks Chad, I have spent hours on this - YOU ARE THE MAN
> > > >
> > > > You're welcome, that's what the group is for. Just wish I had more
> > > time to
> > > > participate!
> > > >
> > > > -Chad
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > '// =======================================================
> > >     Rules : http://ReliableAnswers.com/List/Rules.asp
> > >     Home  : http://groups.yahoo.com/group/vbHelp/
> > >     =======================================================
> > >     Post  : [EMAIL PROTECTED]
> > >     Join  : [EMAIL PROTECTED]
> > >     Leave : [EMAIL PROTECTED]
> > > '// =======================================================
> > >
> > > Yahoo! Groups Links
> >
> >
> >
>
>
>
> '// =======================================================
>     Rules : http://ReliableAnswers.com/List/Rules.asp
>     Home  : http://groups.yahoo.com/group/vbHelp/
>     =======================================================
>     Post  : [EMAIL PROTECTED]
>     Join  : [EMAIL PROTECTED]
>     Leave : [EMAIL PROTECTED]
> '// =======================================================
>
> Yahoo! Groups Links
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM
---------------------------------------------------------------------~->


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to