Genx Posted December 11, 2006 Posted December 11, 2006 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
Wim Decorte Posted December 11, 2006 Posted December 11, 2006 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.
Genx Posted December 11, 2006 Author Posted December 11, 2006 Hmmm, Cool, thanks -- I just thought there might be a general method for it but, any work around is a good work around.
Wim Decorte Posted December 12, 2006 Posted December 12, 2006 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.
Recommended Posts
This topic is 6599 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now