Selecting Screen

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have a multiple user environment. I want to be able to set the screen on
the other computers from one computer the screen could be different or the
same. How would I do this?

\TERMONE\\ DoCmd.OpenForm "frmSystemClosed"
\TERMTWO\\ DoCmd.OpenForm "frmSystemClosed"
Any help appreciated.
Thanks
DS
 
The following shows you how to get the screen resolution, from there
you will need to modify the test to fit what is returned.

The following can be placed in the code prior to the call to open the
form:

dim scrWidth as integer
dim scrHeight as integer

scrWidth = apiGetsys(SM_CYSCREEN)
scrHeight = apiGetsys(SM_CXSCREEN)

=================================================

The following function should be placed in a code module in your
application, obviously not all of the constants are necessary, but may
come in helpful to remember what you can get from the API.

==================================================
Public Declare Function apiGetSys Lib "user32" _
Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long


'*** Define API Constants ***
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Const SM_CXVSCROLL = 2
Public Const SM_CYHSCROLL = 3
Public Const SM_CYCAPTION = 4
Public Const SM_CXBORDER = 5
Public Const SM_CYBORDER = 6
Public Const SM_CXDLGFRAME = 7
Public Const SM_CYDLGFRAME = 8
Public Const SM_CYVTHUMB = 9
Public Const SM_CXHTHUMB = 10
Public Const SM_CXICON = 11
Public Const SM_CYICON = 12
Public Const SM_CXCURSOR = 13
Public Const SM_CYCURSOR = 14
Public Const SM_CYMENU = 15
Public Const SM_CXFULLSCREEN = 16
Public Const SM_CYFULLSCREEN = 17
Public Const SM_CYKANJIWINDOW = 18
Public Const SM_MOUSEPRESENT = 19
Public Const SM_CYVSCROLL = 20
Public Const SM_CXHSCROLL = 21
Public Const SM_DEBUG = 22
Public Const SM_SWAPBUTTON = 23
Public Const SM_RESERVED1 = 24
Public Const SM_RESERVED2 = 25
Public Const SM_RESERVED3 = 26
Public Const SM_RESERVED4 = 27
Public Const SM_CXMIN = 28
Public Const SM_CYMIN = 29
Public Const SM_CXSIZE = 30
Public Const SM_CYSIZE = 31
Public Const SM_CXFRAME = 32
Public Const SM_CYFRAME = 33
Public Const SM_CXMINTRACK = 34
Public Const SM_CYMINTRACK = 35
Public Const SM_CXDOUBLECLK = 36
Public Const SM_CYDOUBLECLK = 37
Public Const SM_CXICONSPACING = 38
Public Const SM_CYICONSPACING = 39
Public Const SM_MENUDROPALIGNMENT = 40
Public Const SM_PENWINDOWS = 41
Public Const SM_DBCSENABLED = 42
Public Const SM_CMOUSEBUTTONS = 43
Public Const SM_CMETRICS = 44

=======================================

Ron
 
If you programmaticaly changed the resolution on my screen I would hunt you
down and destroy your computer with a large hammer.

That is how most people are.

You should never, ever, under any circumstances change the resolution on a
user's screen. They set it like the want it and really dont' want it changes.

Why do you feel you need to change a user's resolution?
 
I agree with Dave. BESIDES there may be other reasons for not doing
it. Some users may eye situations that mandate NOT using a high
resolution monitor. I have two users who have very large monitors and
need to use low resolution to do their work. I would NOT dare to touch
their resolution.



In a number of apps I have developed, I have had to simply create two
different forms. Basically the same but designed specifically for the
resolutions available and in use. In these apps I have given the user
the option to pick the one that they like with different menu buttons
for the forms. At the same time I could have checked for the
resolution and called what I consider the better resolution. BUT it
still think the two buttons is better. Depending on how the user works
AND the degree that they are perfect-vision challenged, they can
chose. I think it always better for the user to make that decision,
not the developer.

I use a fairly high resolution on my monitor, but I have one user who
has a really large screen and very high resolution and she asked me to
use all of her landscape for the form. But then she had a backup who
simply did not have the ability on her computer to even come close to
that resolutioin. The result was, again, two forms. One for the very
high resolution and one for average resolution.

Yes it was a bear, but then again they are paying the bill.

Ron
 
An alternative is to scale your forms to fit the end-user's screen
resolution. There are some third-party form scaling solutions
available that might help:

A shareware version of a form rescaling module I wrote called
ShrinkerStretcher is available at this web site: http://www.peterssoftware.com/ss.htm

There's a form resizer at http://www.jamiessoftware.tk/resizeform/rf_jump.html
..

Another one: http://sourceforge.net/projects/modscaleform

The Access Developer's Handbook has form resizing code included:
http://www.amazon.com/exec/obidos/ISBN=0782119417/107-8064361-7403703

Hope this helps,

Peter De Baets
Peter's Software - Microsoft Access Tools for Developers
http://www.peterssoftware.com
 
Thanks for the responses.
But, however I think my question was either misunderstood or worded
improperly. I'll take the blame.
What I need to do is this. On one computer I want close down my ordering
system and on the other computers I want the form that is displayed to
change as well. Is this clearer? If not I will try to explain further.
Thanks
DS

Sorry for the confusion.
 
Back
Top