Ga naar inhoud

Internet explorer maximaliseren


anoniem

Aanbevolen berichten

Ik heb de IE op laten starten door een prgramma maar helaas blijft het een kleine IE ik wil graag dat ie automatisch maxilmaliseerd. Wie weet hoe ik dat kan doen, dit is de code waar het om gaat[code:1:9e4e8c1a02] Private Sub Command1_Click() x = Shell("c:/program files/internet explorer/iexplore.exe Begin.html") End End Sub [/code:1:9e4e8c1a02]
Link naar reactie
uit de help: [quote:f47e55a23e]Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero. Syntax Shell(pathname[,windowstyle]) The Shell function syntax has these named arguments: Part Description pathname Required; Variant (String). Name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive. windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus. The windowstyle named argument has these values: Constant Value Description vbHide 0 Window is hidden and focus is passed to the hidden window. vbNormalFocus 1 Window has focus and is restored to its original size and position. vbMinimizedFocus 2 Window is displayed as an icon with focus. vbMaximizedFocus 3 Window is maximized with focus. vbNormalNoFocus 4 Window is restored to its most recent size and position. The currently active window remains active. vbMinimizedNoFocus 6 Window is displayed as an icon. The currently active window remains active. Remarks If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs. Note The Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.[/quote:f47e55a23e]
Link naar reactie
Dit werkt bij mij wel (let op de spatie in de string) [code:1:c9ea670685]Option Explicit Dim x As Double Dim Path As String Private Sub Command1_Click() Path = "C:\Program Files\Internet Explorer\IEXPLORE.EXE " x = Shell(Path + "Begin.html", vbMaximizedFocus) End Sub[/code:1:c9ea670685] En nog wat over de help, komt uit de normale visual basic help. Typ bijvoorbeeld shell in, selecteer dit woord en druk op F1 en zie wat er gebeurd. Groeten, Wouter
Link naar reactie
[quote:83912459b4="sdk"]ik bedoelde dat het deel begin.html moet worden uitgebreid als je daar "path + Begin.html" van maakt, dan opent ie dat gewoon in de ie en niet bijvoorbeeld, www.xxx.xx[/quote:83912459b4] Shell heeft zo z'n eigenaardigheden. Alhoewel het probleem hier waarschijnlijk niet direct ligt, zou ik de ShellExecute API hiervoor gebruiken. Vergeet Internet explorer en roep direct het document op en laat het systeem zelf uitzoeken welke browser de standaard is. [code:1:83912459b4] Public Const SW_SHOWMAXIMIZED = 3 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 Private Sub Button1_Click() if (ShellExecute(0&, vbNullString, "http://www.google.com/", vbNullString, _ vbNullString, SW_SHOWMAXIMIZED) <= 32) then call msgbox("Er is iets misgegaan.") end if End Sub [/code:1:83912459b4]
Link naar reactie

Om een reactie te plaatsen, moet je eerst inloggen

Gast
Reageer op dit topic

×   Geplakt als verrijkte tekst.   Herstel opmaak

  Er zijn maximaal 75 emoji toegestaan.

×   Je link werd automatisch ingevoegd.   Tonen als normale link

×   Je vorige inhoud werd hersteld.   Leeg de tekstverwerker

×   Je kunt afbeeldingen niet direct plakken. Upload of voeg afbeeldingen vanaf een URL in

×
×
  • Nieuwe aanmaken...