setting screen display based on individual resolution for all forms in an app

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

I have developed a substantial app - perhaps as many as 125 - 150 forms. I
develop on a system that uses normal fonts, 1280 / 1024. I want to set the
scale of each form to replicate my environment, so I created the following
function in a class I call 'globals', which is available throughout the
system, as indicated:
Public Function setscale(ByVal formsender As Form) As Single

'call with:

'Dim glb As globals

'Me.Scale(glb.setscale(Me))

Dim iwidth As Int32

iwidth = SystemInformation.PrimaryMonitorSize.Width

setscale = iwidth / 1280

End Function

I am placing this in the load event of each form. Here's my question: can I
do this so that it is truly global, in a way that would allow me not to have
to call it in each form, but rather only once as part of the app itself?
Also, is there anything I'm missing here - will this work fine as is?

Thanks for any help.

Bernie Yaeger
 
Hi Jan,

Thanks for your response. Actually, this answers part of the problem, the
part about 'controls appearing in different places', but it doesn't address
the resolution scaling issue, although I think I have that under control
now.

Tx again,

Bernie
 
Back
Top