Author | Topic: .NET dialogue not getting focus | |
---|---|---|
Lynn Graybiel | .NET dialogue not getting focus on Thu, 17 Jun 2010 20:42:09 -0400 In using a .NET component that has a dialog method, if I use XbpActivexControl, I get a message on the Create that says the CLSID used is not an activeXcontrol. If I use CreateObject, the dialog appears but the input field in the dialog does not have focus. I can force focus only by clicking on another window and then clicking back to the dialog window. On subsequent calls to the showDialog method of the .NET component, it works as expected. That is, if gains focus at it should. The developer of the component claims that others using C++, C# and Vbasic do not have this issue. Here is a code snippet.: oMs := createObject( "MercuryShield.MercuryShieldUI" ) oMs:mercuryShieldRequest := oReq RP_APPWINDOW:hide() nResult := oMs:showDialog() Dialog is modal RP_APPWINDOW:show() I don't have much experience interfacing to .NET, ActiveX etc. Any help or hints are welcome, please. Lynn Graybiel | |
Nestor Guido | Re: .NET dialogue not getting focus on Fri, 18 Jun 2010 16:15:04 +0200 Hi Lynn, I'm not sure if this will help but try to add a sleep(20) after the RP_APPWINDOW:hide() ...It may be that the hide doesn't have enough time to do it's processing and still has partcial focus when you do your show of the .net dialogue. Kind Regards, Nestor <Lynn Graybiel> wrote in message news:611cc095$542f7cf1$d235@news.alaska-software.com... > In using a .NET component that has a dialog method, if I use > XbpActivexControl, I get a message on the Create that says the CLSID used > is not an activeXcontrol. > > If I use CreateObject, the dialog appears but the input field in the > dialog does not have focus. I can force focus only by clicking on another > window and then clicking back to the dialog window. > > On subsequent calls to the showDialog method of the .NET component, it > works as expected. That is, if gains focus at it should. > > The developer of the component claims that others using C++, C# and Vbasic > do not have this issue. > > Here is a code snippet.: > > oMs := createObject( "MercuryShield.MercuryShieldUI" ) > oMs:mercuryShieldRequest := oReq > > RP_APPWINDOW:hide() > nResult := oMs:showDialog() Dialog is modal > RP_APPWINDOW:show() > > I don't have much experience interfacing to .NET, ActiveX etc. > Any help or hints are welcome, please. > > Lynn Graybiel > | |
Lynn Graybiel | Re: .NET dialogue not getting focus on Fri, 18 Jun 2010 22:26:20 -0400 I think I see the problem or maybe limitation. The AppWindow of this application is an XbpCrt. As a test, I tried the same code under an XbpDlg app window and it works fine. In fact I don't need to hide the app window either. Lynn Graybiel "Nestor Guido" <nestor@softwareclinic.co.za> wrote in message news:51fe36af$54f2ee71$f47c@news.alaska-software.com... > Hi Lynn, > > I'm not sure if this will help but try to add a sleep(20) after the > RP_APPWINDOW:hide() ...It may be that the hide doesn't have enough time to > do it's processing and still has partcial focus when you do your show of > the .net dialogue. > > Kind Regards, > Nestor > > <Lynn Graybiel> wrote in message > news:611cc095$542f7cf1$d235@news.alaska-software.com... >> In using a .NET component that has a dialog method, if I use >> XbpActivexControl, I get a message on the Create that says the CLSID used >> is not an activeXcontrol. >> >> If I use CreateObject, the dialog appears but the input field in the >> dialog does not have focus. I can force focus only by clicking on >> another window and then clicking back to the dialog window. >> >> On subsequent calls to the showDialog method of the .NET component, it >> works as expected. That is, if gains focus at it should. >> >> The developer of the component claims that others using C++, C# and >> Vbasic do not have this issue. >> >> Here is a code snippet.: >> >> oMs := createObject( "MercuryShield.MercuryShieldUI" ) >> oMs:mercuryShieldRequest := oReq >> >> RP_APPWINDOW:hide() >> nResult := oMs:showDialog() Dialog is modal >> RP_APPWINDOW:show() >> >> I don't have much experience interfacing to .NET, ActiveX etc. >> Any help or hints are welcome, please. >> >> Lynn Graybiel >> > > | |
James Loughner | Re: .NET dialogue not getting focus on Fri, 18 Jun 2010 23:34:36 -0400 CRT processes events differently. I doubt that anyone thought about using activeX with CRT objects. Jim On 06/18/2010 10:26 PM, Lynn Graybiel wrote: > I think I see the problem or maybe limitation. The AppWindow of this > application is an XbpCrt. As a test, I tried the same code under an XbpDlg > app window and it works fine. In fact I don't need to hide the app window > either. > > Lynn Graybiel > > > "Nestor Guido" <nestor@softwareclinic.co.za> wrote in message > news:51fe36af$54f2ee71$f47c@news.alaska-software.com... >> Hi Lynn, >> >> I'm not sure if this will help but try to add a sleep(20) after the >> RP_APPWINDOW:hide() ...It may be that the hide doesn't have enough time to >> do it's processing and still has partcial focus when you do your show of >> the .net dialogue. >> >> Kind Regards, >> Nestor >> >> <Lynn Graybiel> wrote in message >> news:611cc095$542f7cf1$d235@news.alaska-software.com... >>> In using a .NET component that has a dialog method, if I use >>> XbpActivexControl, I get a message on the Create that says the CLSID used >>> is not an activeXcontrol. >>> >>> If I use CreateObject, the dialog appears but the input field in the >>> dialog does not have focus. I can force focus only by clicking on >>> another window and then clicking back to the dialog window. >>> >>> On subsequent calls to the showDialog method of the .NET component, it >>> works as expected. That is, if gains focus at it should. >>> >>> The developer of the component claims that others using C++, C# and >>> Vbasic do not have this issue. >>> >>> Here is a code snippet.: >>> >>> oMs := createObject( "MercuryShield.MercuryShieldUI" ) >>> oMs:mercuryShieldRequest := oReq >>> >>> RP_APPWINDOW:hide() >>> nResult := oMs:showDialog() Dialog is modal >>> RP_APPWINDOW:show() >>> >>> I don't have much experience interfacing to .NET, ActiveX etc. >>> Any help or hints are welcome, please. >>> >>> Lynn Graybiel >>> >> >> > > |