Assuming your doing something similar to the example below, it should work fine. Is the problem with the location of the code(Perhaps it's not being run)? Is your variable defined properly, and in scope?
nScreenWidth = sysmetric(1)
thisform.width = nScreenWidth
kenweber
GCom2 Solutions
Microsoft Certified Professional