Link to home
Start Free TrialLog in
Avatar of Vlad77
Vlad77

asked on

Set Focus

Why ,when I use ListView Object and I write :
ListView1.SetFocus
I receive an error:"Invalid procedure call or argument"
Object is enable ,I cant't understand where is the problem
Please ,help me .
Avatar of RichW
RichW
Flag of United States of America image

Do you have any code in the Listview's events that may be raising this error?  Check your events for the Listview and step through them in debug.
RichW
Is the form which it resides on visible at the moment of setting focus ? It must be, or "Invalid procedure call or argument" will occur.
Avatar of Éric Moreau
the listview and the form must be visible and enabled before setting focus to it.
Avatar of ravininave
ravininave

I think that definately ur enabled property of the list view is False.  Make it true and try again.
it can be if your form where the listview resides isnt actice
ASKER CERTIFIED SOLUTION
Avatar of marconovaro
marconovaro

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