Hey everyone,
\r\n
\r\nMy problem would appear to be a simple one but it is one I cannot seem to remedy.
\r\nI have a FORM which contains 2 COMMAND BUTTONS and a WEB BROWSER, in which a basic computer game is displayed.
\r\nIn order to start the process which, controls the computer game, the user must press the start button, however this then Sets the focus on the Start Button which, means the focus is taken off the Web Browser and therefore the desired action does not take place in the game.
\r\nI’ve tried setting the focus to the Web Browser as shown in the code segment below but this doesn\'t seem to work.
\r\nAny help or advice would be much appreciated.
\r\nThanking you in advance.
\r\n
\r\n
\r\n
Code:
\r\n
Private Sub START_Click()\r\n\r\ndirpath = "C:\\LOCATION\\ioFiles\\"\r\n\r\nSlowerFaster.Caption = ""\r\nAmpFeedback.Caption = ""\r\n\r\n\r\n stopStart.FontSize = 18\r\n stopStart.FontBold = True\r\n \r\nglo.TaskID = Shell("C:\\Blank\\getsamples.exe", vbMinimizedNoFocus) \'Start "getsamples.exe"\r\n\r\nSleep 100\r\nWebBrowser1.SetFocus\r\nSleep 100\r\n\r\nstopStart.Caption = "START"\r\n\r\nDoEvents
\r\n
\r\n \r\n\r\n