Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening an existing explorer window
Message
 
 
À
07/01/2013 17:32:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01434702
Message ID:
01561660
Vues:
52
>>>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?

It doesn't have WindowState or Maximized properties, so I guess there is no direct way through the properties of the object.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform