Link to home
Start Free TrialLog in
Avatar of BHoward
BHoward

asked on

Field taking fouus

I am a vb6 developer.  I have problem setting focus on a field if I run the program using the shell statement.  If I run the application not using the shell statement things works fine.
Any answers?
SOLUTION
Avatar of avi247
avi247

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BHoward
BHoward

ASKER

Hi Guys,

I'm trying to help a friend who is new to vb6.  what he is trying to do from a menu item on his primary form, fire up a stand application called phonebook.  as long as he does it using this method

On Error Resume Next
    Response = Shell("Phonebook.exe", 1)  ' Run phonebook.
    AppActivate Response                         ' Activate phonebook
On Error GoTo 0

he is trying to setfocus on a combobox. nothing happens.  in the development mode of phonebook you can run it in the development and everthing works great.  You can execute the compiled phone and its works ok.   it doesn't work using the above code.  


how do you use the CreateProcess() API?

Thanks,
Bill

Avatar of BHoward

ASKER

Hi Guys,

I solved it myself.  
changing the statement from
   Response = Shell("Phonebook.exe", 1)  ' Run phonebook.
to
  Response = Shell("Phonebook.exe", vbNormalFocus)  ' Run phonebook.

fixes the problem

Bill