Hi Dave

Further to my last email I have a TextBox txtShippingDate a Calendar
Control oleControl1
As you advised, in the GotFocus event I have

WITH ThisForm

        .olecontrol1.Left = This.Left
        .olecontrol1.Top = This.Top

ENDWITH

In the DoubleClick event I have

WITH ThisForm

        .olecontrol1.Visible = .T.
        .Returneddate = 1 && used by the Calendar control to populate
the correct Date field with the selected date
        
ENDWITH

When I double click the Caledar control appears but in the wrong place
Yet the properties shown in the debugger are:
ThisForm.txtShippingDate.Top = 110
ThisForm.oleControl1.Top = 110

ThisForm.txtShippingDate.Left = 324
ThisForm.oleControl1.Left = 324

As you advised I set Application.AutoYield to .F.

"I don't believe it"

Cheers

Peter


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Crozier
Sent: 17 March 2008 08:31
To: 'ProFox Email List'
Subject: RE: How to move an OleControl

Peter,
Works for me with the Microsoft date picker no problem if I use the
GotFocus
event in the textbox to move the control. 

Also make sure 

Application.Autoyield=.F.

However, it could be that it is the OLEControl that is causing the
problem.
Which one are you using?

Dave Crozier

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
Of Peter Hart
Sent: 14 March 2008 09:07
To: ProFox Email List
Subject: RE: How to move an OleControl

Hi all

 

I am using an olecontrol as a date picker on a form.

There are quite a few date fields to enter.  These are automatically
populated with today's date on opening the form.  I want to offer the
employee the option of double clicking on a date field which I want to
move to the position of the text box

 

With ThisForm

.oleControl1.Left  =  This.Left

.Top  =  This.Top

.Visible  =  .T.

EndWith

 

This would place the Date Picker (in this case a Calendar control) over
the text box.

 

Unfortunately the control does not move although the properties change
when viewed in the debugger.

 

Any Ideas

 

Cheers

 

Peter Hart

 

 



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to