We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Show in taskbar

scotster
scotster asked
on
Medium Priority
723 Views
Last Modified: 2011-09-20
Hi, i've created a program using VB in excel. I know there are a lot of major drawbacks to using it but we don't have VB in the work, this may be one of those drawbacks. At the beginning i have hidden the application so that all that is on the screen is my program. However because i have hidden the application the taskbar icon has been done away with and i have no way to just click on it if it gets lost to the back of a window. I have toyed with minimizing the application but it minimizes my form and i also thought about keeping my form on top but decided against that as what i really want is just to be able to click on an icon in the taskbar and for it to jump to the front again as with all other windows/applications. If its possible, could you tell me how to do this?

I know its probably not possible and if it is its probably so simple but i'm just a beginner so sorry if i'm wasting your time.

Thanks

Scott
Comment
Watch Question

Commented:
Hmm... what exactly are you trying to do?

1.) You hide the application (Excel?) but keep your program (forms?) visible.
2.) Since the application (Excel?) is hidden, you can't bring it back. How would you be able to "click on it if it gets lost" if it's hidden?

Confusing.. maybe because it's 2am. :D
Ark
CERTIFIED EXPERT

Commented:
Probably you can use following solutions:
1. Tray icon (area at the bottom right corner, where clocks, sound icon, MSN messenger etc seats).
2. Using hot-key combination when user press, say, Ctrl+Alt+P keys? your app brings to top.

or combination of above 2 ways

Author

Commented:
How would i create a trayicon with my form? I think i tried it using VB but i've never tried it with VB in excel. That would be fine if that would work. As you can tell i am self taught and this far have only had the "help" option as a guide. Oh and here of course.

BTW zzzzzooc its not excel i want to be able to click on if it gets lost  i want an icon for the form on the taskbar for the form that comes up called calib1. Example would be excel loads, shows in taskbar click enable macro's excel disappears calib1 shows. I'd like to have an icon in the taskbar for calib1. After a bit of reading i have found that its virtually impossible to have a showintaskbar for the form as it would only work for excel when using vb in an application. Something to do with child windows or something like that.

Thanks

Scotster

Commented:
Not sure if this can work from VBA in Excel but you can try setting your form's (if it even has a handle?) extended style to be that of one that shows up in the taskbar.


Example..

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_EXSTYLE = (-20)
Private Const WS_EX_APPWINDOW = &H40000
Private Sub Form_Load()
    Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW)
End Sub
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
WOW, i'm not at work just now but i will give that a go as soon as i get there. I wish i could figure things out as well as that lol. My programming skill is slightly lacking as i have only been at it for a month or so and completely self taught so i'm a bit limited. Do you recommend a course or continuing with self teachings?

Thanks for the answer, points will be sent out as soon as i try it.

Thanks again

scotster
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.