Hi all
I am trying to reposition controls on a form at runtime and all is working well, except for one control (Microsoft Web Browser olecontrol). I can adjust its width and height, but whatever I have tried fails to move the control to a new Top and Left position on the form.
I have tried setting Top and Left on the control and its object (i.e. on MyOLEControl and on MyOLEControl.Object. I have tried in the form Init, in the form Activate and from a command button Click event after the form has displayed. All to no avail.
Am I missing something here? I can probably resolve the problem by putting the oleControl inside a container and then moving the container, but I would rather not have to do that.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
This happens to me when the anchor is set on the control.
Tracy
On February 26, 2022 6:08:22 PM EST, paul.newton.hudl@gmail.com wrote:
Hi all
I am trying to reposition controls on a form at runtime and all is working well, except for one control (Microsoft Web Browser olecontrol). I can adjust its width and height, but whatever I have tried fails to move the control to a new Top and Left position on the form.
I have tried setting Top and Left on the control and its object (i.e. on MyOLEControl and on MyOLEControl.Object. I have tried in the form Init, in the form Activate and from a command button Click event after the form has displayed. All to no avail.
Am I missing something here? I can probably resolve the problem by putting the oleControl inside a container and then moving the container, but I would rather not have to do that.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Tracy
Anchor is set to 0 - but thanks anyway
Paul -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 26 February 2022 23:33 To: profoxtech@leafe.com Subject: Re: Problem moving controls on a form at runtime
This happens to me when the anchor is set on the control.
Tracy
On February 26, 2022 6:08:22 PM EST, paul.newton.hudl@gmail.com wrote:
Hi all
I am trying to reposition controls on a form at runtime and all is working well, except for one control (Microsoft Web Browser olecontrol). I can adjust its width and height, but whatever I have tried fails to move the control to a new Top and Left position on the form.
I have tried setting Top and Left on the control and its object (i.e. on MyOLEControl and on MyOLEControl.Object. I have tried in the form Init, in the form Activate and from a command button Click event after the form has displayed. All to no avail.
Am I missing something here? I can probably resolve the problem by putting the oleControl inside a container and then moving the container, but I would rather not have to do that.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Have you tried making the control invisible then reposition it and then make it visible again?
Sent from my iPhone
On 27. Feb 2022, at 00:35, paul.newton.hudl@gmail.com wrote:
Tracy
Anchor is set to 0 - but thanks anyway
Paul -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 26 February 2022 23:33 To: profoxtech@leafe.com Subject: Re: Problem moving controls on a form at runtime
This happens to me when the anchor is set on the control.
Tracy
On February 26, 2022 6:08:22 PM EST, paul.newton.hudl@gmail.com wrote: Hi all
I am trying to reposition controls on a form at runtime and all is working well, except for one control (Microsoft Web Browser olecontrol). I can adjust its width and height, but whatever I have tried fails to move the control to a new Top and Left position on the form.
I have tried setting Top and Left on the control and its object (i.e. on MyOLEControl and on MyOLEControl.Object. I have tried in the form Init, in the form Activate and from a command button Click event after the form has displayed. All to no avail.
Am I missing something here? I can probably resolve the problem by putting the oleControl inside a container and then moving the container, but I would rather not have to do that.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Many thanks Christof
I hadn't but I have now and it works - quite bizarre. Do you have any kind of explanation?
Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Christof Wollenhaupt Sent: 27 February 2022 10:50 To: profoxtech@leafe.com Subject: Re: [SPAM] RE: Problem moving controls on a form at runtime
Have you tried making the control invisible then reposition it and then make it visible again?
Sent from my iPhone
On 27. Feb 2022, at 00:35, paul.newton.hudl@gmail.com wrote:
Tracy
Anchor is set to 0 - but thanks anyway
Paul -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: 26 February 2022 23:33 To: profoxtech@leafe.com Subject: Re: Problem moving controls on a form at runtime
This happens to me when the anchor is set on the control.
Tracy
On February 26, 2022 6:08:22 PM EST, paul.newton.hudl@gmail.com wrote: Hi all
I am trying to reposition controls on a form at runtime and all is working well, except for one control (Microsoft Web Browser olecontrol). I can adjust its width and height, but whatever I have tried fails to move the control to a new Top and Left position on the form.
I have tried setting Top and Left on the control and its object (i.e. on MyOLEControl and on MyOLEControl.Object. I have tried in the form Init, in the form Activate and from a command button Click event after the form has displayed. All to no avail.
Am I missing something here? I can probably resolve the problem by putting the oleControl inside a container and then moving the container, but I would rather not have to do that.
Many thanks
Paul Newton
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Remember: ActiveX Controls are essentially mini Windows programs contained in their own (borderless) window. VFP creates a hole in it's own form-window where that ActiveX is then peeking through. For the user there is no visual difference, but programmatically it's a foreign module. With making it invisible, VFP just closes that hole in it's window, and then reopens it, which then forces the ActiveX module to use that hole...
-----Ursprüngliche Nachricht----- Von: ProFox profox-bounces@leafe.com Im Auftrag von paul.newton.hudl@gmail.com Gesendet: Sonntag, 27. Februar 2022 13:21 An: profox@leafe.com Betreff: RE: [SPAM] RE: Problem moving controls on a form at runtime
Many thanks Christof
I hadn't but I have now and it works - quite bizarre. Do you have any kind of explanation?
Paul
Thanks Jürgen
For an extremely clear and easy to understand explanation.
Paul
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Jürgen Wondzinski Sent: 27 February 2022 17:00 To: profoxtech@leafe.com Subject: AW: [SPAM] RE: Problem moving controls on a form at runtime
Remember: ActiveX Controls are essentially mini Windows programs contained in their own (borderless) window. VFP creates a hole in it's own form-window where that ActiveX is then peeking through. For the user there is no visual difference, but programmatically it's a foreign module. With making it invisible, VFP just closes that hole in it's window, and then reopens it, which then forces the ActiveX module to use that hole...
-----Ursprüngliche Nachricht----- Von: ProFox profox-bounces@leafe.com Im Auftrag von paul.newton.hudl@gmail.com Gesendet: Sonntag, 27. Februar 2022 13:21 An: profox@leafe.com Betreff: RE: [SPAM] RE: Problem moving controls on a form at runtime
Many thanks Christof
I hadn't but I have now and it works - quite bizarre. Do you have any kind of explanation?
Paul
[excessive quoting removed by server]