capturing and setting screen resolution in VBA

Is there a way to capture the user's screen resolution, and then set it to a 
different value in VBA?

I have tried unsuccessfully to get all of my users to set their monitor 
resolution no lower than 1024 x 768, but there are some holdouts that insist 
on keeping theirs at 800 x 600.  Some of them still have 17" monitors, and 
with that limited amount viewing area, it's difficult to design the forms 
small enough that they don't have to scroll around to view the entire form.

If it were possible to capture and reset the screen resolution, I would 
first check to see if they're at 800 x 600, then reset it to 1024 x 768. 
When they exit the Access application, I would restore it to 800 x 600.

Is there a way to do this in VBA?

Thanks in advance.

Paul 


0
msnews
2/14/2008 5:16:52 PM
access.formscoding 7493 articles. 0 followers. Follow

4 Replies
1595 Views

Similar Articles

[PageSpeed] 33

I think it's best to program at the lowest resolution being used. If you want 
to resize you will be checking constantly which resolution is being used. 
What if a user switches to a different resolution during there work process. 
I personally use an external display connected to my laptop. I have three 
monitors which range between 15" and 21". My advice use the 800 x 600 
resolution. That way nobody has to scroll through anything...

just my 2 cts.
-- 
Maurice Ausum


"msnews.microsoft.com" wrote:

> Is there a way to capture the user's screen resolution, and then set it to a 
> different value in VBA?
> 
> I have tried unsuccessfully to get all of my users to set their monitor 
> resolution no lower than 1024 x 768, but there are some holdouts that insist 
> on keeping theirs at 800 x 600.  Some of them still have 17" monitors, and 
> with that limited amount viewing area, it's difficult to design the forms 
> small enough that they don't have to scroll around to view the entire form.
> 
> If it were possible to capture and reset the screen resolution, I would 
> first check to see if they're at 800 x 600, then reset it to 1024 x 768. 
> When they exit the Access application, I would restore it to 800 x 600.
> 
> Is there a way to do this in VBA?
> 
> Thanks in advance.
> 
> Paul 
> 
> 
> 
0
Utf
2/14/2008 6:51:02 PM
"msnews.microsoft.com" <BegoneSpam@forever.com> wrote:

>I have tried unsuccessfully to get all of my users to set their monitor 
>resolution no lower than 1024 x 768, but there are some holdouts that insist 
>on keeping theirs at 800 x 600.  Some of them still have 17" monitors, and 
>with that limited amount viewing area, it's difficult to design the forms 
>small enough that they don't have to scroll around to view the entire form.

Maybe those users have poor eyesight and should be getting 19" or 21"
LCD monitors.  They're cheap enough these days.

>If it were possible to capture and reset the screen resolution, I would 
>first check to see if they're at 800 x 600, then reset it to 1024 x 768. 
>When they exit the Access application, I would restore it to 800 x 600.

http://support.microsoft.com/kb/q148395/ for reading the screen
resolution.   I'm sure there is code at vbnet.mvps.org.

However I would never muck with users settings.   That is a rather
arrogant attitude that will upset users.

I don't use Outlook but do run it occasionally for testing code and
such.   And it just ticks me off when software such as Outlook takes
over my settings for my other software.  

Tony
-- 
Tony Toews, Microsoft Access MVP
   Please respond only in the newsgroups so that others can 
read the entire thread of messages.
   Microsoft Access Links, Hints, Tips & Accounting Systems at 
http://www.granite.ab.ca/accsmstr.htm
   Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
0
Tony
2/14/2008 7:48:18 PM
these two website have some good code for sizing forms and the access window 
itself, Can't help you with forcing a screeen resolution though

www.lebans.com
www.mvps.org/access/forms/

"msnews.microsoft.com" wrote:

> Is there a way to capture the user's screen resolution, and then set it to a 
> different value in VBA?
> 
> I have tried unsuccessfully to get all of my users to set their monitor 
> resolution no lower than 1024 x 768, but there are some holdouts that insist 
> on keeping theirs at 800 x 600.  Some of them still have 17" monitors, and 
> with that limited amount viewing area, it's difficult to design the forms 
> small enough that they don't have to scroll around to view the entire form.
> 
> If it were possible to capture and reset the screen resolution, I would 
> first check to see if they're at 800 x 600, then reset it to 1024 x 768. 
> When they exit the Access application, I would restore it to 800 x 600.
> 
> Is there a way to do this in VBA?
> 
> Thanks in advance.
> 
> Paul 
> 
> 
> 
0
Utf
2/15/2008 12:55:00 PM
My thanks to Maurice, Tony and Roger for their observations and suggestions.

Based on what you have said, I'm persuaded that it's not a good idea to 
adjust the user's screen resolution, even it it were possible.

Thank you, gentlemen.

Paul 


0
Paul
2/16/2008 3:13:55 AM
Reply:

Similar Artilces:

Excel file opens with a blank screen
I have an excel file with a few worksheets. Sometimes (But this does not happen every time) after I run a macro that takes data from other files and puts it onto a worksheet in the current file, after I save and close the current file and then reopen the file, it comes up blank. I can still view my vb code, but I cannot see the actual spreadsheets unless I go to View-->Full screen and then reduce the view with the minimize icon on the little toolbar that pops up. What really makes this odd, is that a friend in another lab can run the macro and open the file at his place with no prob...

variable in a set of values
Dear all, In SQL, there is a condition IN . e.g. products in (a,b,c). I want to know whether there exist a same statement in C#. Or maybe I should use other syntax? Thanks. Hi, We'll likely need some details as SQL is not C#. In particular this is the other way round. Most collections have a method that allows to find out if a value is found in the collection. Try for example : http://msdn.microsoft.com/en-us/library/bb384015.aspx You could create an array that contains the a,b, c value and then test if this array contains the products value... -- Patric...

text on document is really small even though it is set at 12 why?
When I am in a word 03 document the text displayed is really small, even though the font size is set at 12. Either that or the page is really big Have you tried changing the zoom rate? -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "suzannah" <suzannah@discussions.microsoft.com> wrote in message news:894012CB-69D6-48BC-92DC-54DBAF71CB7C@microsoft.com... > When I am in a word 03 document the text displayed is really small, even > though the font size is set at 12. Either that or the page is...

Setting print areas on many sheets
Hi I would like to know if there is a way of easily setting the print areas in a workbook automatically. Basically I have a spreadsheet with around 30-50 tabs, depending on what comes in during the week. I need a method of automatically setting the print areas to only select the cells that have data in them, for each tab. Currently I have to go in each one and do it manually, and this takes ages. Could anybody suggest a formula or VB code for me to use? Thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet message...

To set up a command that will insert a row, every fifth row?
Using Excel, how would you set a a command to auto enter a row, every fifth row of your data sheet? shanespop2b, here is some code that will do it, original code by Dave Peterson, modified to your needs Sub Add_Row() 'will add a row after every 5th row 'By: Dave Peterson Dim iCtr As Long Dim LastRow As Long Dim myRng As Range With ActiveSheet LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row Set myRng = Nothing For iCtr = 5 To LastRow Step 5 If myRng Is Nothing Then Set myRng = .Cells(iCtr, "A") ...

Forcing Caps and Spell Checker Settings
Hi, I have two questions. 1) How do you set the cells in Excel to auto change all letters entered to be all caps regardless of how it was entered? 2) How do you set Spell Checker to run after every time you exit an individual cell in Excel? Thanks, Ben Ben, Question 1: Press the Caps Lock key? Question 2: You will have to use programming code... Right-click the worksheet tab, select view code. Delete all text in the large window on the right. Paste in the following: '----------------------------------------------- Option Explicit Private Sub Worksheet_SelectionChange(ByVal T...

How to list all the individual mailbox permissions set by owners?
Hello, Is there a tool/way in ESM for the Ex Admin to list all the permissions which each individual user has set on their mailboxes, i.e., giving other users access to (parts of) their mailboxes? I'm looking for something like PFDAVAdmin for mailboxes. The reason is I need to move a few hundred users from a 5.5 site to a 200X site in different orgs. Fortunately, all the users are in the same AD forest/domain so the same Windows accounts are used on both sides. The Mailbox Migration Wizard will move the data but not the permissions... Thanks, - Alan. ESM will not do this. However,...

Lost password setting after closing outlook 2002.
Hi guys. i configured my outlook 2002 according to my ISP instructions. Unfortunately, everytime i close outlook i lose my password setting. I went to microsoft.down and downloaded all the sp and patches. Does anyone experience with their version of outlook 2002. Justin ...

Setting the color of a cell from a cell
I have two worksheets with similar data. In fact they are almos identical. I would like to use a third worksheet to show the cell which are equal as yellow and those which are different as red. I have made an attempt at writing it, and have searched the forums, bu can't find anyone trying to do this. Here the cell formula in 'sheet3'!A1(copied to the whole sheet): =if('sheet1'!a1='sheet2'!a1,setColor('sheet3'!a1,1),setColor('sheet3'!a1,3)) Here is my code for setColor(): Function setColor(R As Range, C As Integer) For Each X In R X.Interior.Col...

How do I set up dowloading PDF file on web page using Publisher
I am setting up a simple web site using publisher and what to give browsers access to PDF files of media articles etc. How do I set up a link on a web page and where do I put the main PDF file? On your webpage put a text line for the file, i.e., Get this file. Highlite the word FILE or words GET THIS FILE. Right click select Hyperlink and type in the path to where you are storing the pdf file, i.e., downloads/file.pdf Create the folder DOWNLOADS on your website, upload file.pdf into the DOWNLOADS folder. (uppercase is to clarify suggestion and not necessary for actual procedure - al...

lookup in vba
I am trying to write a vba code that accomplished the following exce code, can anyone help =IF(ISNA(VLOOKUP(...)),"",VLOOKUP(...)) I have wrriten the following If WorksheetFunction.IsNA(WorksheetFunction.Lookup(Range("a3") Range("j1:j5"), Range("l1:l5"))) = True Then .... but when I run I get an error messege telling that I can not find th lookup function, I think its due to the fact that the return is N/ since when I put on a cell that has an answear I get a response -- Message posted from http://www.ExcelForum.com This works for me Dim ans ...

Excel VBA
Hi VBAers, In the code below, I am getting an error on the following line: ElseIf ireply = vbNo And ActiveWorkbook = filename Then Sub FN_CreateDOHVSRBatch() Dim filename As String Dim ireply As Integer Application.DisplayAlerts = False Application.ScreenUpdating = False Set wb1 = ActiveWorkbook filename = Worksheets("Amtreference").Range("A2").Text Batchprompt: ireply = MsgBox(Prompt:="Do you wish to create a new batch?", _ Buttons:=vbYesNo, Title:="Create New Service Request Batch") If ireply = vbYes Then ...

Explanation of VBA procedure
Could someone please explain what is happening with this procedure . For Each cell In Sheets("ALL A-C").Range("B25:B1524") With cell .Offset(0, 1).Resize(1, 6).Locked = .Value End With Next cell 1. Does it mean that the cells in columns C through H are all locked if the Value in the corresponding row in column B is true? 2. How does this procedure determine if the value in column B is true or false? 3. How does the Offset procedure work. That is, why Offset(0,1) why not (0,0). And Resize(1,6) instead of (0,6)? 4. How does the loop do its thing as...

always appears an error on screen when send email
when sending message from mic outlook 2000, there always an error appear on the screen ?? mabel wrote: > when sending message from mic outlook 2000, there always an error > appear on the screen ?? See reply to your other post. ...

How do I name a picture as I paste it from VBA? (ActiveSheet.Past.
I want to use VBA (and maybe some variation of the ActiveSheet.Paste command?) to paste the image on the clipboard into Excel under a certain name i.e. "samplepicture". I have tried "ActiveSheet.Paste.samplepicture" and "ActiveSheet.Shapes("samplepicture").Paste" but can't seem to find a good syntax. Leitey, When you paste, it'll be selected. ActiveSheet.Paste Selection.Name = "samplepicture" -- Earl Kiosterud www.smokeylake.com/ ------------------------------------------- "Leitey" <Leitey@discussions.micr...

How to set default cell formattiing to vertical alignment = top ??
How to set 'Alignment', 'Vertical:' cell formatting to be 'Top' as default format for all new worksheets ? -- akm Thanks again for your help. ---- Ah, the miracle of computers!... someone also said "To error is human, but to really screw up it takes a computer!" Take a look at "default workbook" in XL Help. In article <563D9BF8-D599-43E6-9383-AB68FC7CBF01@microsoft.com>, akm <akm@discussions.microsoft.com> wrote: > How to set 'Alignment', 'Vertical:' cell formatting to be 'Top' as default > format for...

Setting up a small office network for Outlook
I have an office network of seven PCs and we have just obtained broadband. How do I set up Outlook so that it can be accessed by all users? Post more info on what you try to accomplish and what you have available; Do you want to have them separate e-mail accounts? Do you have 7 accounts already? Do they need to be able to share data. Do you have a mailserver available? -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Paul Humphries" <anonymous@disc...

"Customized Screen Display" (CTRL-F6) intended to work this way
If I initiate the Touch Screen display in Store Operations POS (by CTRL-F6, set up the desired displays, and then OK) and then scan in an item for sale, a dialog pops up asking to accept requested, backorder, etc. After clicking or pointing to 'accept requested' the item is added to the list of items in the 'body section' but the Touch Screen menus disappear. I need to use CTRL-F6 to get the Touch Display Menus back on Screen. Have I set up the system wrong or is the normal? Thanks in Advance Kent Smith RMSrookie ---------------- This post is a suggestion for Microso...

Full screen slideshow under automation
Context is C# or VB.NET Powerpoint control and enforcing a true fullscreen mode. The "fullscreen" kios mode gives a black band and the top & bottom as well as the task bar. However, when Powerpoint is directly used then the full screen is a true full screen. I was interested on how to invoke a true full screen Thanks code snippet pptPresentation.SlideShowSettings.ShowType = Microsoft.Office.Interop.PowerPoint.PpSlideShowType.ppShowTypeKiosk; pptPresentation.SlideShowSettings.AdvanceMode = Microsoft.Office.Interop.PowerPoint...

How to sort to sets of data so that corresponding numbers match
I am trying to reconcile to accounts. I need to sort both sets of data to each corresponding numbers. Need to be a bit more specific, and example data would help. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ------------------------------�------------------------------�---------------- It's easier to beg forgiveness than ask permission :-) ------------------------------�------------------------------�---------------- "Jason" <Jason@discussions.microsoft.com> wrote in message news:57B6...

Rules wizard set up for rule
I set up the Rules Wizard to send messages with key words in the subject and or message to a certain folder. I have applied the rule and run the wizard, but it still isn't applying the rule. Any ideas? Are you referring to existing messages or new messages that are currently arriving? "enh" <enh@discussions.microsoft.com> wrote in message news:1268A1BD-078B-4C7E-A890-A5C1D35FE9FC@microsoft.com... >I set up the Rules Wizard to send messages with key words in the subject >and > or message to a certain folder. I have applied the rule and run the > wizard...

(?) Set default font and font size in comments?
How do I change and set the default font and font size for comments? The default of Tahoma 8 Bold is too small to see clearly, I want Tahoma 12 Normal. Thanks and regards, -stephen tinius art mail daught com stephen From Debra Dalgleish.............. You can change the font size of new comments by changing the Windows OS appearance settings. (Instructions for Windows XP) Right-click on the desktop, and choose Properties On the Appearance tab, click Advanced. From the Item dropdown, choose Tooltip Choose a font Size, click OK, click OK Note: this will affect all applications a...

setting personalized background for Outlook messages
Rather than using any of Windows background fills or stationary can I use a file of my own as the default background for Outlook messages? If so how do I set it so it becomes the default background? [WinXP/Office '03] ~ Dan Dan;111172 Wrote: > Rather than using any of Windows background fills or stationary can I > use a > file of my own as the default background for Outlook messages? If so > how do I > set it so it becomes the default background? [WinXP/Office '03] Create your own HTML file and place it in %CommonProgramFiles%\Microsoft Shared\Statione...

setting up a fresh install with a copied DB
I'm trying to set up a parallel install of GP 8 sp5 and I'm fairly new to this area so any help would be great, I've got GP installed, a seperate db copied, and the odbc connection set up between the gp server and db server. But I get a message saying "The Great Plains SQL Databases have not been setup for this version of Great Plains...This will need to be completed before continuing." I'm not sure what my next step is to set up a back up of the Database? Again thanks for the help. Doc - Do you have access to KB on MS customer source? Microsoft (MS) has a KB...

VBA inserting chr(10) or vbLf
Hi all, In a for next loop I want to insert at a certain position (below it is position 15) in a cell chr(10) (is that called a line feed?) to put the rest of the content on a new line in the cell. I tried myCell.Characters(15) = vbLf but that will not work. What should the code be? Thanks in advance for your advice. Jack Sons The Netherlands On Mon, 10 May 2010 12:03:40 +0200, "Jack Sons" <j.sons@planet.nl> wrote: >Hi all, > >In a for next loop I want to insert at a certain position (below it is >position 15) in a cell chr(10) (...