How to setup owner property of common dialog
I have an question about how to setup owner property of common dialog box.
I have created one common dialog box by using the create object function
Set cdlg = CreateObject("UserAccounts.CommonDialog")
I am trying to setup owner property of newly created object by I do not know correct syntax to do that. What I am trying to achieve is to make web browser to be a parent of the newly created dialog box.
I have tried to pass hwnd of the web Browser but I got “Invalid procedure call or argument” message
hwnd1 = Window("name:=Browser Name").GetRoProperty("hwnd")
cdlg.Owner = hwnd1
If I do not specify this property owner of the dialog will be QTP itself but I would like to avoid that.
Thanks in advance for all answers!
Re: How to setup owner property of common dialog
in the code of your dialog, you may try to get browser handle via Windows API