|
-
Sep 1st, 2000, 09:58 AM
#1
Thread Starter
New Member
I use sellexecute to open .HTML file with IE, but no matter what nShowCmd code I use it opens in NORMAL mode.
Can someone help?
Thanks
........
Public Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal _
lpDirectory As String, ByVal nShowCmd As Long) As Long
res = ShellExecute(0&, vbNullString, "proba.htm", vbNullString, vbNullString, SW_HIDE)
-
Sep 1st, 2000, 04:46 PM
#2
Thread Starter
New Member
Nothing works
[/code] [/B][/QUOTE]
Nothing works.
-
Sep 2nd, 2000, 04:02 AM
#3
Junior Member
Private Declare Function GetModuleUsage Lib "Kernel32" Alias _
"GetModuleUsage" (ByVal hModule As Integer) As Integer
Private Const SW_HIDE = 0 '// Normal Window
Private Const SW_NORMAL = 1 '// Maximized Window
Private Const SW_MAXIMIZE = 3 '// Minimized Window
Private Const SW_MINIMIZE = 6 '// Hidden Window
-
Sep 2nd, 2000, 07:42 AM
#4
Re: Nothing works
Originally posted by stipsa
[/code]
Nothing works. [/B][/QUOTE]
You sure? I tried my method and it worked fine for me. (Remember to add a Button to the Form then place the code into it).
-
Sep 2nd, 2000, 10:12 AM
#5
Thread Starter
New Member
Re: Re: Nothing works
I have VB6 SP4. You're method works fine for text documents, but not HTML and IE.
I also need to open file from module, not form, but that could be arranged if it works on form.
Maybe IE is forcing documents to open in normal mode, I don't know?
Thanks for trying.
-
Sep 2nd, 2000, 01:59 PM
#6
How about this:
Code:
Shell "C:\Program Files\Internet Explorer\IExplore.exe C:\MyHtml.html", vbNormalFocus
-
Sep 2nd, 2000, 03:19 PM
#7
Thread Starter
New Member
It works!
Yes, that works.
I guess I didn't want to specify path to IEXPLORE and it doesn't work without it.
Thanks.
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
|