|
-
Dec 13th, 2005, 07:12 AM
#1
Thread Starter
Addicted Member
Asking for VB program please..???
Dear Experts,
I use Windows XP Pro SP2...
I have a program (created by my own) that is opening on desktop during start up...my questions are:
1. Within the program interface, there is a button called "Finance"..which is when I click that button, it will opens "finance.exe"...So, what kind of codes should I write to open "finance.exe" please...???
2. What kind of codes, when I click "X" (close) or "-" (minimize), that program will go to the start up icon (which is small icon on the right below on the Windows...)..???
Please help me...
Thanks for your kind helps..
Jennifer
-
Dec 13th, 2005, 07:15 AM
#2
Re: Asking for VB program please..???
 Originally Posted by zach007
1. Within the program interface, there is a button called "Finance"..which is when I click that button, it will opens "finance.exe"...So, what kind of codes should I write to open "finance.exe" please...???
VB Code:
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
ShellExecute Me.hwnd, vbNullString, "Finance.Exe", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
 Originally Posted by zack007
2. What kind of codes, when I click "X" (close) or "-" (minimize), that program will go to the start up icon (which is small icon on the right below on the Windows...)..???
Do you want to minimize the program or put it in the system tray?
-
Dec 13th, 2005, 07:23 AM
#3
Re: Asking for VB program please..???
Here's a link to some systray code (code to add an icon next to the clock). It's not that easy, so give us a shout if u need a hand.
http://www.vbforums.com/showthread.p...hreadid=300765
WOka
Last edited by Wokawidget; Dec 13th, 2005 at 09:57 AM.
-
Dec 13th, 2005, 07:34 AM
#4
Re: Asking for VB program please..???
A good systray example:
I do not remeber where I got it from. Hope it any use for you. I still use it. It is very stable and works very well.
There is mentioned in the code that: 'the form must be fully visible before calling Shell_NotifyIcon
Nope!!! Doesn't have to. Well. At least not to me.
With some code-tuning you'll be able to make it very nice. Good luck...
Last edited by Radjesh Klauke; May 15th, 2012 at 03:05 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|