|
-
Jun 4th, 2005, 06:21 AM
#1
Thread Starter
Fanatic Member
Open URL
i want to open URL in default browser...
but it should be strictly minimized no focus on load
-
Jun 4th, 2005, 06:33 AM
#2
Re: Open URL
 Originally Posted by vbPoet
i want to open URL in default browser...
but it should be strictly minimized no focus on load
VB Code:
Public 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
ShellExecute Me.hwnd, vbNullString, "http://www.vbforums.com", vbNullString, "C:\", 3
 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.
-
Jun 4th, 2005, 06:55 AM
#3
Thread Starter
Fanatic Member
Re: Open URL
hmm not ..
minimized means .... do not display it in background..
just open browser and minimize it to taskbar silently ...
-
Jun 4th, 2005, 07:00 AM
#4
Re: Open URL
 Originally Posted by vbPoet
hmm not ..
minimized means .... do not display it in background..
just open browser and minimize it to taskbar silently ...
 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:
Private Const SW_MINIMIZE As Long = 6
Cheers,
RyanJ
-
Jun 4th, 2005, 07:18 AM
#5
Thread Starter
Fanatic Member
Re: Open URL
i have already tried it before ...
but not quite right for putting browser on taskbar silently without displaying anywhere on screen
-
Jun 4th, 2005, 07:22 AM
#6
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?
-
Jun 4th, 2005, 07:28 AM
#7
Thread Starter
Fanatic Member
Re: Open URL
 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 ..
-
Jun 4th, 2005, 07:30 AM
#8
Thread Starter
Fanatic Member
Re: Open URL
if i wanna HIDE it from user ..
i can do it by using CreateObject ....
but i want to place on taskbar.....
-
Jun 4th, 2005, 08:22 AM
#9
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:
Private Const SW_SHOWMINIMIZED As Long = 2
Private Const SW_SHOWNOACTIVATE As Long = 4
-
Jun 4th, 2005, 08:25 AM
#10
Re: Open URL
 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:
Private Const SW_SHOWMINIMIZED As Long = 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
-
Jun 5th, 2005, 12:15 AM
#11
Thread Starter
Fanatic Member
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...
-
Jun 5th, 2005, 12:18 AM
#12
-
Jun 5th, 2005, 12:23 AM
#13
Thread Starter
Fanatic Member
Re: Open URL
where ...? and how ..
i m using .. ShellExecute...
and one other point ... that is i m not HIDING i want to MINIMIZE.
-
Jun 5th, 2005, 12:55 AM
#14
Thread Starter
Fanatic Member
Re: Open URL
Actually i just want to open URL and minimize it to taskbar ....
-
Jun 5th, 2005, 02:19 AM
#15
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:
Option Explicit
Private Sub Form_Load()
Shell "\program files\internet explorer\iexplore.exe www.msn.com", vbMinimizedNoFocus
End Sub
vbMinimizedNoFocus may also work with shellexecute. I didn't try it.
-
Jun 6th, 2005, 04:22 AM
#16
Thread Starter
Fanatic Member
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 ....
-
Jun 6th, 2005, 07:37 AM
#17
Re: Open URL
ShellExecuting the URL will automatically open it in the default browser.
-
Jun 7th, 2005, 09:24 AM
#18
Thread Starter
Fanatic Member
Re: Open URL
Oops but it will not minimize as i want as DG's code work
so is there any other way .......
-
Jun 7th, 2005, 09:10 PM
#19
Thread Starter
Fanatic Member
Re: Open URL
OK tell me simply how to know which is default browser ....?
-
Jun 7th, 2005, 09:12 PM
#20
Re: Open URL
Whichever one the user has checked off to be his default browser will open.
-
Jun 7th, 2005, 09:18 PM
#21
Thread Starter
Fanatic Member
Re: Open URL
Nops ... it will open in ShellExecute case
but i want to use Shell ..
-
Jun 7th, 2005, 09:25 PM
#22
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.
-
Jun 7th, 2005, 09:29 PM
#23
Thread Starter
Fanatic Member
Re: Open URL
hmm but ShellExecute ...is not able to minimize to taskbar as Shell do...
-
Jun 7th, 2005, 11:42 PM
#24
Re: Open URL
Sure it does. You just need to use the right flag.
http://www.mentalis.org/apilist/ShellExecute.shtml
-
Jun 8th, 2005, 01:25 PM
#25
Thread Starter
Fanatic Member
Re: Open URL
Oh no DG...
when i use ShellExecute it does not place it "Minimized" on taskbar as Shell do ....
-
Jun 8th, 2005, 02:25 PM
#26
Re: Open URL
did you try all of the options? i could have sworn that one worked.
-
Jun 8th, 2005, 09:37 PM
#27
Thread Starter
Fanatic Member
-
Jun 8th, 2005, 11:07 PM
#28
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:
Private Const SW_SHOWMINIMIZED As Long = 2
Private Const SW_SHOWNOACTIVATE As Long
= 4
-
Jun 8th, 2005, 11:24 PM
#29
Banned
Re: Open URL
erm..shouldnt Shell "start http://google.com", vbminimized work? If it doesnt use comspec.
-
Jun 9th, 2005, 04:14 AM
#30
Re: Open URL
 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:
Private Const SW_SHOWMINIMIZED As Long = 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|