|
-
Jun 7th, 2006, 04:11 PM
#1
Thread Starter
Hyperactive Member
I need a fresh pair of eyes
Hi,
I'm now using
VB Code:
For loopy = 1 To number
ShellExecute Me.hwnd, vbNullString, "C:\WINDOWS\explorer.exe", site, vbNullString, SW_MAXIMISE
Next loopy
However, it is launching the websites fine but is not maximising them - any ideas?
Jord
--------------------------------------------------
...and not for myself
I'm opening up websites using explorer.exe and passing the website as a parameter to the executable. I wish to maximise each window that I open, however, the following code does not maximise any windows.
VB Code:
For loopy = 1 To number
runner = Shell("C:\WINDOWS\EXPLORER.EXE " & site, [B]vbMaximizedFocus[/B])
Next loopy
I thought vbMaximizedFocus was suppoed to maximise the window, then I thought that perhaps the fact that the windows are opening iterationally (is that a word ?) could cause the window to lose focus before the command can be applied or some other such complication.
Does anyone have any idea why the windows are maximising themselves and if there are any other ways I could maximise them instead.
Jord
Last edited by intraman; Jun 7th, 2006 at 05:43 PM.
Reason: Not resolved
-
Jun 7th, 2006, 04:22 PM
#2
Re: I need a fresh pair of eyes
Try ShellExecute with SW_MAXIMIZE
-
Jun 7th, 2006, 04:28 PM
#3
Re: I need a fresh pair of eyes
Not sure why you are opening the web pages in windows explorer. Try open with Internet explorer. The following code opens the web page in maximized mode:
VB Code:
Shell "C:\Program Files\Internet Explorer\iexplore.exe http://www.google.com", vbMaximizedFocus
-
Jun 7th, 2006, 04:29 PM
#4
Re: I need a fresh pair of eyes
I recommand ShellExecute as schoolbusdriver said. you no need to specify the path for internet explorer.
-
Jun 7th, 2006, 04:31 PM
#5
Re: I need a fresh pair of eyes
Not sure why
VB Code:
Shell "iexplore.exe http://www.google.co.in/", vbMaximizedFocus
doesn't work. But in run dialog
VB Code:
"iexplore.exe http://www.google.co.in/"
it works.
-
Jun 7th, 2006, 04:42 PM
#6
Re: I need a fresh pair of eyes
I've not tried this, but if you do:-
Shell("C:\WINDOWS\EXPLORER.EXE", vbMaximizedFocus)
i.e. not specifying the site, does it work ?
EDIT:- Yes it does. Might be the asynchronous problems associated with Shell() ?
Better to use ShellExecute.....
Last edited by schoolbusdriver; Jun 7th, 2006 at 04:46 PM.
-
Jun 7th, 2006, 05:04 PM
#7
Thread Starter
Hyperactive Member
Re: I need a fresh pair of eyes
Cheers guys, rated you all
-
Jun 7th, 2006, 10:47 PM
#8
Hyperactive Member
Re: I need a fresh pair of eyes
 Originally Posted by cssriraman
Not sure why
VB Code:
Shell "iexplore.exe http://www.google.co.in/", vbMaximizedFocus
doesn't work. But in run dialog
VB Code:
"iexplore.exe http://www.google.co.in/"
it works.
interesting.
im getting the same here.
perhaps the run box gets extra paths?
maybe these two have something to do with it?
C:\WINDOWS\Prefetch\iexplore.exe-27122324.pf
C:\WINDOWS\system32\dllcache\iexplore.exe
i wonder what method the run box uses...
-
Jun 7th, 2006, 10:56 PM
#9
Re: I need a fresh pair of eyes
I believe you need to put quote marks around the URL. But I also recommend ShellExecute'ing just the URL as that opens it in the default browser (the registered HTTP handler on the system).
Prefetch is just a mechanism Windows uses behind the scenes to speed up starting applications. Ignore it.
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
|