It's easier to provide steps to reproduce rather than trying to explain :
-Create a class based on container - say dtcont.
Height = 22
Width = 206
*Custom
Pickerformat = 0
-Put datetimepicker ActiveX control in it
Left=0
Top=0
Height = 22
Width = 206
Format = 0
*Init
if this.Parent.Pickerformat = 1
store 86 to this.parent.width,this.width
this.Object.Format = 1
endif
-Save class
-On a test form put a textbox, class you saved, another textbox (place them so that at least a few chars space at left)
-Select these controls and save as class -say dtmaincont- then delete 3 controls on form
-Put a pageframe wth 3 pages. In each of the pages put the class dtmaincont that's saved and set Pickerformat to 1 for all instances.
-Run the form.
What I get is :
Initially datetimepicker control is visually doubled, one overlapping the other. You can tab to only one of them (with correct left,top) but you can setfocus to 'both' of them with mouse.
If you cycle through the pages, after getting to 3rd page everything is normal.
What gives ? Any suggestions other than creating 2 different classes for different formats ? TIA
Cetin