Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening an existing explorer window
Message
 
To
07/01/2013 17:32:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01434702
Message ID:
01561679
Views:
63
>>>i would like to bring to forefront an actual connection that is currently in the background.
>>>So let's say i have already made conection to 'https://this is my site.com/main.html' and it opens in a window smply called
>>>"This is my site - Windows Internet Explorer" as the title of the explorer window. Neither will actually appear in the forefront
>>>with the code below. Is there a way to open this secondary window? thanks k
>>>
>>>this is the code with the problems shown to the right or each solution
>>>#DEFINE SW_SHOWNORMAL 1
>>>lcUrl = "This is my site - Windows Internet Explorer" &&& this is the window name -- error not a file
>>>lcUrl = 'https://this is my site.com/main.html' &&& this is the window url conection --- makes the internet connection again so that i have two.
>>>
>>>oShell = Createobject("wscript.shell")
>>>oShell.Run(lcUrl)
>>>DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>>> INTEGER hwnd, STRING lpVerb, STRING lpFile, ;
>>> STRING lpParameters, STRING lpDirectory, LONG nShowCmd
>>>ShellExecute(0, "Open", lcUrl, "", "", SW_SHOWNORMAL)
>>
>>
>>See if this is what you need:
>>
>>oCollection = CreateObject( "Shell.Application" )
>>
>>FOR ia=0 to oCollection.Windows.Count-1
>>	WITH oCollection.Windows(ia)
>>		?.FullNAme
>>		iF "iexplore.exe"$LOWER(.FullNAme) and "window title fragment"$lower(.locationName)
>>			*all properties and Methods of InternetExplorer.Application"
>>			* could go here
>>			?"Title: ",  	.locationName		&&Window Title
>>			?"URL: ",		.LocationUrl	&&URL
>>			?"Type: ", 		.Type		&&HTML DOcument
>>			?"Handle: ",	.HWND		&&Handle
>>			
>>	* maximize INternet Explorer, UT Message 684936  
>>			DECLARE INTEGER ShowWindow IN WIN32API ;
>>					INTEGER hWnd, Integer nCmd
>>			cnSW_MAXIMIZE = 3
>>
>>			ShowWindow(.hWnd, cnSW_MAXIMIZE)
>>                                                      EXIT
>>
>>		endif
>>
>>	ENDwith
>>ENDFOR
>>
>>oCollection=.null.
>>RELEASE oCollection
>>
>>
>>Good Luck
>
>That's a lot more than I need. Here's the code I. using
>
>o = CREATEOBJECT("InternetExplorer.Application")
>o.VISIBLE=.T.
>
>
>I'm thinking there is one simple command such as:
>
>o.Maximized= .T. 
>
>
>Is there anything like that available?

No, only .FullScreen. For other options you still can use o.hwnd and showwindow api.
Previous
Reply
Map
View

Click here to load this message in the networking platform