December 11, 200619 yr Hi guys (Probably Wim), I did try googling this first but... How do you center VBScript created objects when you get them to pop up... e.g. how do you get this to center on the screen when it appears: Set ObjFSO = CreateObject("UserAccounts.CommonDialog") ObjFSO.Filter = "All Files|*.*" ObjFSO.InitialDir = "C:" InitFSO = ObjFSO.ShowOpen If InitFSO = True Then Wscript.StdOut.Write ObjFSO.FileName End If
December 11, 200619 yr Hi Genx, The object itself does not have a method to explicitely set its location. Since it probably does remember its last location my guess is that the info is stored in the registry. What I would do is run a registry monitor or comparison tool and move the dialog around to see if that's true. If it is, you can use VBscript to write your values there.
December 11, 200619 yr Author Hmmm, Cool, thanks -- I just thought there might be a general method for it but, any work around is a good work around.
December 12, 200619 yr I don't think VBscript can, but real VB can hook into the Win32 API and move the window for you by subclassing the window.
Create an account or sign in to comment