Link to home
Start Free TrialLog in
Avatar of Melvin
Melvin

asked on

VB App not on Task Bar

I've created an application using VB6 Enterprise Edition.  The app was installed using InstallShield Express.  When the user starts the application it doesn't show on the Task Bar.  If the user starts other applications while mine is running, my app is hidden in back of the other apps.  The only way to get back to my app is to minimize every other app which then shows my app on the desktop.

How do I add my app to the Task Bar?

Avatar of KDivad
KDivad

Check the ShowInTaskbar property of the form.
'if the form is titleless you need this

Private Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" (ByVal hwnd As Long, _
ByVal nIndex As Long, ByVal dwNewLong As Long) _
As Long

Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU = &H80000

'<<<<<<   Form load  >>>>>>

Private Sub Form_Load()
Call SetWindowLong(Me.hwnd, GWL_STYLE, WS_SYSMENU)
End Sub


Or, you can just make it on top by doing this.

Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long


'Make the form  on top.
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE

Avatar of Melvin

ASKER

The solution that I used to correct my problem was provided by kdivad as a comment.  How do I get credit to that individual?
There should be a link next to my name on any of my posts that says something like "Accept Comment As Answer". If not, then reject the current answer, then the link should be there. If for some reason it's STILL not there, let me know and I'll post an answer.
Avatar of Melvin

ASKER

The solution that I used to correct my problem was provided by kdivad as a comment.  How do I get credit to that individual?

cantell's answer wasn't unsatisfactory. I decided to use someone else's "comment" instead.

ASKER CERTIFIED SOLUTION
Avatar of KDivad
KDivad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial