Jump to content

Center Window


Genx
 Share

This topic is 5776 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5776 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.