Interesting -- I thought I had tried that technique without success. Can you try inserting such a line in the DialogBrowseForFolderEvents function and see if it makes a difference?
Jamal On Mon, 9 Feb 2009, Macarty, Jay {PBSG} wrote: > Date: Mon, 9 Feb 2009 15:44:57 -0600 > From: "Macarty, Jay {PBSG}" <jay.maca...@pbsg.com> > Reply-To: gw-scripting@gwmicro.com > To: "gw-scripting@gwmicro.com" <gw-scripting@gwmicro.com> > Subject: RE: Homer shared objects - DialogChoose not getting focus > > Sorry, the statement I actually used was dObj.Window.Activate during the > create processing. > > > -----Original Message----- > From: Jamal Mazrui [mailto:empo...@smart.net] > Sent: Monday, February 09, 2009 3:33 PM > To: gw-scripting@gwmicro.com > Subject: RE: Homer shared objects - DialogChoose not getting focus > > I don't think the dialog created event can be used for activation code > because the dialog is not yet visible during the processing of that event. > > Jamal > On Mon, 9 Feb 2009, Macarty, Jay {PBSG} wrote: > > > Date: Mon, 9 Feb 2009 15:28:00 -0600 > > From: "Macarty, Jay {PBSG}" <jay.maca...@pbsg.com> > > Reply-To: gw-scripting@gwmicro.com > > To: "gw-scripting@gwmicro.com" <gw-scripting@gwmicro.com> > > Subject: RE: Homer shared objects - DialogChoose not getting focus > > > > Jamal, > > I've run into similar issues. I didn't look at the code for DialogChoose as > > yet; however, I have gotten around this issue before using something like > > dObj.activeWindow.Focus. The problem may be that the dialog is getting > > confused when the calling application is java and it can't, as you > > mentioned, make a clear determination of the parent window. I'll play with > > it some more and see what happens. > > > > > > -----Original Message----- > > From: Jamal Mazrui [mailto:empo...@smart.net] > > Sent: Monday, February 09, 2009 3:06 PM > > To: gw-scripting@gwmicro.com > > Subject: RE: Homer shared objects - DialogChoose not getting focus > > > > Hi Jay, > > I've also noticed that dialogs sometimes do not receive activation even > > though they are created as modal. I checked the DialogChoose code in > > HomerSharedObject.vbs and found that the modal attribute is used. I think > > the problem may be related to whether the dialog has an appropriate parent > > window as its owner. I don't know how to create such a parent window for a > > wescriptui dialog. > > > > To resolve such a problem, sometimes I have temporarily monitored window > > creation events and then activated the dialog via an event handler after > > it was created. For an example of this, look at DialogBrowseForFolder. > > > > Jamal > > > > -----Original Message----- > > From: Macarty, Jay {PBSG} [mailto:jay.maca...@pbsg.com] > > Sent: Monday, February 09, 2009 3:08 PM > > To: gw-scripting@gwmicro.com > > Subject: Homer shared objects - DialogChoose not getting focus > > > > Jamal, > > > > I was trying to use the Homer DialogChoose dialog. When I call the method > > and pass the parameters, the dialog is displayed with the buttons I > > requested; however, focus is not placed in the dialog; I have to alt-tab to > > it. When I use the DialogConfirm method, it works fine and focus is > > automatically switched to the dialog but not with the DialogChoose call. > > > > > > > > >