Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximize IE using foxpro code
Message
 
To
07/01/2013 17:13:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01561652
Message ID:
01561675
Views:
65
>What is the VFP line of code to Maximize IE after creating an IE object that is showing up minimized?

There's no one line of code to do that as there's no native API. However, it's fairly easy if you are using the IE COM object:
loIE = CREATEOBJECT("InternetExplorer.Application")
loIE.Navigate("http://west-wind.com")

DECLARE Sleep ;
  IN WIN32API ;
  INTEGER nMillisecs
    
*** Wait for window to load
DO WHILE(loIe.ReadyState != 4)
   DOEVENTS
   Sleep(200)    
ENDDO

*** Maximize
DECLARE INTEGER ShowWindow IN WIN32API ;
	INTEGER hWnd, Integer nMode
ShowWindow(loIE.Hwnd, 3)
loIE.Visible = .T.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform