|
-
May 16th, 2000, 10:38 PM
#1
Thread Starter
Lively Member
I am having an application which creates an instance of IE using the create object method when clicked on a button.
If the user clicks on the button an instance of IE is created and it is opened by using the visible property.
When the user minimise the window and works on the application and at a later time clicks on the button again it should open the existing instance of IE and maximise it.
When I use the window handle and make it visible it works fine if the existing IE window is already in maximised state. but if the existing window is in minimised state then seting the visible property is not working.it just sets the focus to the window but it is still minimised.
I tried to user the Sendmessage API call but it returns 0 and is not successful.
Please help
Thanks in advance
Ramdas
-
May 16th, 2000, 10:42 PM
#2
Fanatic Member
I'm not sure what you are trying to do, but it seems complicated.
All i usually do is:
Code:
Public Sub Command1_Click()
Shell "C:\Program Files\Plus!\IExplore.exe", vbMaximisedFocus
End Sub
That starts an instance of IE in the maximized state with the focus set to it.
Maybe you are looking for something different, but maybe this helps
r0ach™
Don't forget to rate the post
-
May 17th, 2000, 01:13 AM
#3
Thread Starter
Lively Member
on command click I was able to open IE but I need to hanlde the new IE window.
If the user minimises the IE that is opened and again click on the command button I need to maximise the IE that is already available rather than creating a new IE window.
Thanks
Ramdas
-
May 17th, 2000, 09:17 PM
#4
Thread Starter
Lively Member
Any Help???????????
Ramdas
-
May 17th, 2000, 09:40 PM
#5
New Member
What you need is ShowWindow. Using something like SetForeGroundWindow or simply setting the focus to the window with SendMessage will only select the minimized window, but won't maximize it.
Public Const SW_MAXIMIZE = 3
Public Const SW_NORMAL = 1
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Pass the handle of your instance of IE to the hwnd parameter and use one of the SW_ constants for nCmdShow.
-
May 17th, 2000, 10:04 PM
#6
Thread Starter
Lively Member
Thanks TomIrvine
It was bugging me for lat two days. I am not much used to API's. It worked fine.
Thanks a lot.
Ramdas
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
|