Results 1 to 30 of 30

Thread: Open URL

  1. #1

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Open URL

    i want to open URL in default browser...
    but it should be strictly minimized no focus on load

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Open URL

    Quote Originally Posted by vbPoet
    i want to open URL in default browser...
    but it should be strictly minimized no focus on load
    VB Code:
    1. Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
    2.     ByVal hWnd As Long, _
    3.     ByVal lpOperation As String, _
    4.     ByVal lpFile As String, _
    5.     ByVal lpParameters As String, _
    6.     ByVal lpDirectory As String, _
    7.     ByVal nShowCmd As Long) As Long
    8.  
    9. ShellExecute Me.hwnd, vbNullString, "http://www.vbforums.com", vbNullString, "C:\", 3

    Quote Originally Posted by allAPI.net
    SW_MINIMIZE
    Minimizes the specified window and activates the next top-level


    Cheers,

    RyanJ
    Last edited by sciguyryan; Jun 4th, 2005 at 07:05 AM.
    My Blog.

    Ryan Jones.

  3. #3

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    hmm not ..
    minimized means .... do not display it in background..
    just open browser and minimize it to taskbar silently ...

  4. #4
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Open URL

    Quote Originally Posted by vbPoet
    hmm not ..
    minimized means .... do not display it in background..
    just open browser and minimize it to taskbar silently ...

    Quote Originally Posted by AllAPI.net
    SW_MINIMIZE
    Minimizes the specified window and activates the next top-level window in the Z order.
    Then try this one:

    VB Code:
    1. Private Const SW_MINIMIZE As Long = 6

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  5. #5

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    i have already tried it before ...
    but not quite right for putting browser on taskbar silently without displaying anywhere on screen

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Open URL

    Why do you want to do this?

    I dont see why you would need to open up a webpage and hide it from the user?

  7. #7

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Quote Originally Posted by Pino
    Why do you want to do this?

    I dont see why you would need to open up a webpage and hide it from the user?
    NO it will not be hidden
    it will be placed on taskbar ...
    and y i want to do this is not to disturb user .. so that he can open number of selected URL at one time and open and view them after opening all of them ..

  8. #8

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    if i wanna HIDE it from user ..
    i can do it by using CreateObject ....
    but i want to place on taskbar.....

  9. #9
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Open URL

    One of these two? None of them work for me, cos I'm using Fx with tabs, but they may work with IE.

    VB Code:
    1. Private Const SW_SHOWMINIMIZED      As Long = 2
    2. Private Const SW_SHOWNOACTIVATE     As Long = 4

  10. #10
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Open URL

    Quote Originally Posted by penagate
    One of these two? None of them work for me, cos I'm using Fx with tabs, but they may work with IE.

    VB Code:
    1. Private Const SW_SHOWMINIMIZED      As Long = 2
    2. Private Const SW_SHOWNOACTIVATE     As Long = 4
    If your using IE then the SW_MINAMIZE one should have worked fine.
    Again, I cannot check because I am using FF also.

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  11. #11

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Actually these arguments are not working .....
    i want that in default browser should open URL and it should kept minimized...
    IT SHOULD BE MINIMIZED...

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    Did you try VbHide?

  13. #13

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    where ...? and how ..
    i m using .. ShellExecute...
    and one other point ... that is i m not HIDING i want to MINIMIZE.

  14. #14

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Actually i just want to open URL and minimize it to taskbar ....

  15. #15
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    I couldn't get it to work using ShellExecute, but if you will settle for Internet Explorer, you can shell it, and hide it.

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.   Shell "\program files\internet explorer\iexplore.exe www.msn.com", vbMinimizedNoFocus
    5. End Sub

    vbMinimizedNoFocus may also work with shellexecute. I didn't try it.

  16. #16

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    hmm absolutely working fine.
    but i also want to know which browser is set to default....
    so that it could be opened ....

  17. #17
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Open URL

    ShellExecuting the URL will automatically open it in the default browser.

  18. #18

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Oops but it will not minimize as i want as DG's code work
    so is there any other way .......

  19. #19

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    OK tell me simply how to know which is default browser ....?

  20. #20
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    Whichever one the user has checked off to be his default browser will open.

  21. #21

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Nops ... it will open in ShellExecute case
    but i want to use Shell ..

  22. #22
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    Then you will have to know which browser the user has. IE is a safe bet, but if he wants to use Fx, then you can't know it. Thats why I use ShellExecute.
    It knows the users choice for you.

  23. #23

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    hmm but ShellExecute ...is not able to minimize to taskbar as Shell do...

  24. #24
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    Sure it does. You just need to use the right flag.

    http://www.mentalis.org/apilist/ShellExecute.shtml

  25. #25

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    Oh no DG...
    when i use ShellExecute it does not place it "Minimized" on taskbar as Shell do ....

  26. #26
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    did you try all of the options? i could have sworn that one worked.

  27. #27

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Open URL

    hmm i have tried all ...

  28. #28
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open URL

    It is very strange. I tried opening a text file, and it works correctly using
    SW_SHOWMINIMIZED, but it wouldn't minimize Fx. Let's see if anyone else has any comments.

    VB Code:
    1. Private Const SW_SHOWMINIMIZED      As Long = 2
    2. Private Const SW_SHOWNOACTIVATE     As Long
    = 4

  29. #29
    Banned ThaRubby's Avatar
    Join Date
    Apr 2005
    Location
    127.0.0.1
    Posts
    356

    Re: Open URL

    erm..shouldnt Shell "start http://google.com", vbminimized work? If it doesnt use comspec.

  30. #30
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Open URL

    Quote Originally Posted by dglienna
    It is very strange. I tried opening a text file, and it works correctly using
    SW_SHOWMINIMIZED, but it wouldn't minimize Fx. Let's see if anyone else has any comments.

    VB Code:
    1. Private Const SW_SHOWMINIMIZED      As Long = 2
    2. Private Const SW_SHOWNOACTIVATE     As Long
    = 4
    No nothing minimises Fx for me either.

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