I solved the problem by doing a setfocus()on the control before showing the form class.
>Hi,
>
>I have a form class with two activeX controls purchased from
www.mabry.com. This form class is used to select files to be imported into my app. I instantiate the class in my startup program. I have the form.visible property set to .F. and then when I want to show the form, I call the show method. Problem is that when I show the form class, one of the ole controls (FileView) is not visible until I actually click on the object. Even if I set the property to true before showing the form - this still happens . . .
>
>**********************
>
>*Code in startup program:
>
>SET CLASSLIB TO filepicker.VCX && instantiate the FilePicker class
>oFilePick = CREATEOBJECT('FilePick2')
>oFilePick.Hide()
>
>
>**********************
>
>* code in another prg manipulating class objects and showing the form
>
>oFilePick.Caption = "Please select the Switch Report to import"
>oFilePick.cmdSelect.Caption = "Import the Selected SWITCH File"
>oFilePick.Visible = .t.
>oFilePick.Show()
>
>**********************
>
>If I set the visible property of the form class as true as design time and then instantiate the form in my start-up program - I don't have the problem of having to click on the object in question to make it visible. However, just before I call the hide() method in the startup program the form flashes on the screen for an instant and I'd rather not have this happen.
>
>Has anyone else come across this behavior?
Al Williams
Anola MB, CANADA