Results 1 to 4 of 4

Thread: Asking for VB program please..???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    185

    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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Asking for VB program please..???

    Quote 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:
    1. Option Explicit
    2.  
    3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    4. (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
    5. ByVal lpParameters As String, ByVal lpDirectory As String, _
    6. ByVal nShowCmd As Long) As Long
    7.  
    8. Private Const SW_SHOWNORMAL = 1
    9.  
    10. Private Sub Command1_Click()
    11. ShellExecute Me.hwnd, vbNullString, "Finance.Exe", vbNullString, "C:\", SW_SHOWNORMAL
    12. End Sub
    Quote 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?

  3. #3
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    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

  4. #4
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    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.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width