
Novice scripting question (screen resolution)...
hi Adam,
This may be a "novice question", but... AFAIK there is no easy answer. That
is, there is no "screen resolution" object for scripting which addresses
this.
When confronted with a problem such as this, my first impulse is to go to:
http://www.codehound.com
to "sniff out" (sorry, couldn't resist) a solution. (CodeHound is an
attempt to index the contents of all the vb sites for searching -- much
better than browsing around on your own).
CodeHound turned up a number of discussions and code for changing screen
resolution at run time, for example:
http://www.vb-world.net/graphics/screenres/index5.html
and,
http://vbarchives.hypermart.net/tiparchive/api/Windows001.htm
Unfortunately, these discussions suggest getting at the screen resolution
via api calls, which can be done in script by using "DynaWrap", but that
generally is a messy business (which I wouldn't recommended for novices).
If you are handy with C++, you best solution might be to write up an ocx or
dll in your favorite language, register it, then call it in script using
"CreateObject"
hook-em horns, jw
Quote:
> I have not done any scripting before and have only fairly recently
> started to learn C++ (if that's somewhat relevant.)
> Can someone either help me out with this, or direct someplace that may
> be a good place to learn it (fairly quickly for this limited application
> of it.) While not that experienced with programming I am proficient
> with computers, so I don't need a tutorial for grandmas. Okay, on with
> the question:
> I am trying to find a way to, in Windows2000, run a script for each user
> on a machine so that when they log in the screen resolution will be set
> to the preferred resolution, whereas Windows now just keeps the one from
> the last user.
> Any help with regards to this would be appreciated. Thank you.
> :Adam J. Tolman