Form Screen Position - Monitor Size
How would I set the form position to the the bottom right of the screen area.. I am basically thinking of the different sizes of monitor's and resolutions...
The Left and Top properties can be set of course, but...
Thanks in advance
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Fixed Screen Size && Monitor Resolution
I made a form to be maximized when my monitor
tuned to 640x480 resolution.
I Want to keep that size when others using it on
other resolutions. How do i force my application not
to shrink and the controls on the form not to lose their
thanks from advance
Window Position Vs Screen Size
I'm using the SetWindowPos API to open an instance of Word exactly the same size as a control on my form and in exactly the same place as that control (don't ask me why - odd users...). Problem is, I have to apply different factors depending on the screen resolution. For example, this factor of 12 works with my resolution of 1280*1024 and large fonts:
Option Explicit Private Declare Function SetWindowPos Lib "user32" _ (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _ ByVal x As Long, ByVal y As Long, ByVal cx As Long, _ ByVal cy As Long, ByVal wFlags As Long) As LongPrivate Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Sub cmdWord_Click() Dim blnAlreadyOpen As Boolean Dim lngHWnd As Long Dim appWord As Word.Application Const klngHwndTopmost = -1 Const klngHwndNoTopmost = -2 Const klngSwpNoActivate = &H10 Const klngSwpShowWindow = &H40 Const klngLEFT_ADJUST As Long = 50 Const klngTOP_ADJUST As Long = 335 Const klngFACTOR As Long = 12 '# If Word is already open, refer to it; otherwise open it blnAlreadyOpen = (FindWindow("OpusApp", vbNullString) <> 0) If blnAlreadyOpen Then Set appWord = GetObject(, "Word.Application") Else Set appWord = CreateObject("Word.Application") End If '# Get the handle of the Word instance lngHWnd = FindWindow("OpusApp", vbNullString) '# Set the position and activate it SetWindowPos lngHWnd, klngHwndNoTopmost, _ (Me.Left + txtSizeTest.Left + klngLEFT_ADJUST) / klngFACTOR, _ (Me.Top + txtSizeTest.Top + klngTOP_ADJUST) / klngFACTOR, _ txtSizeTest.Width / klngFACTOR, txtSizeTest.Height / klngFACTOR, _ klngSwpNoActivate Or klngSwpShowWindow appWord.Visible = True appWord.Activate End Sub
... but it doesn't work when I reduce it to 800*600 with small fonts - Word is too large when it opens.
Any idea how to find out the resolution and adjust for it?
Form Size On Differnt Size Monitor
I am having a problem with an assignment.The problem is that when i put my assignment from my home computer ("17" monitor)on my college computers ("14" monitors) there are parts of my forms missing.The forms wont fit on the screen.Is there anything i can do?
Need help with this badly!!
Initial Startup Screen Size/position?
I've been running into this problem every once in awhile with my end-users.
The problem has to do with the screen size of my application the first time they launch it. I do save the last screen size and location upon exiting the program, but when they run the program for the first time, it obviously runs with the settings that were saved when I compiled the program.
I am using a 21" monitor with a 1024x768 resolution. I usually just make the main window small enough to view everything and keep it in the center of my screen when I compile it. But I guess customers with smaller screens or lower resolution are saying that my program is off to the far right of their screen when they first start it up.
So I guess my question is, what is the standard/accepted practice for the window size and position when you compile your programs?
Any help would be appreciated..
Form Size = Monitor Size
I want to be able to size my from so I use ScaleMode=true.
I have a row of slider bars that will only fit on a 19 inch monitor
What if my user has a 15 montitor can I set up so all of form can be seen? I looked through forum with no results. Any keywork would be greatfull.
VB.6 User, Since 2002
Next Generation Lighting Controls
Auto - Form Resize - No Matter What Monitor Size
I know this question has been asked 1001 times but I was wondering
whether you could get a form to resize no matter what size of monitor it may be running from???
The problem i've got is that my app could run on different size monitors!!!!
Possibillity To Create A Form Size Greater Then Screen Size
Hello VB users,
I am trying to create a form size greater then screen size.
For example to create a area of a big factory.
To move to a part what is not on the screen you have to use a scroll bar.
Is this possible? If yes, how do I do this?
Making Form Size Greater Than Screen Size
I trying to print a form with graphics. I'm simply using the PrintForm statement. The problem is that the screen size doesn't allow the form to expand to a full page. Meaning, I can only print on the top three-quarters of the page.
My question is how can I make the form height increase to greater than the screen height?
Ideally, I'll display this expanded form in a MDI parent window that allows the user to scroll to the bottem part of the expanded form.
Adjusting Form Size Based On The Screen Size
I want to Set My Vb 6.0 Form Size based on the Screen Width & Height. Its important that i should extend this to all the Controls in a particular form like ToolBar,Tree View, Grid etc.,
How to acheive this? I need the Solution as a reusable code which can be put in a Module (to be used when any form gets loaded).
Thx yaar ...
.. SK ..
Form Screen Position
I am wanting to detect (ie. fire an event) when a user has finished moving a form around the screen. I want the user to be able to click on the capiton bar, move the form and then when the form has finished moving output the new form co-ordinates in a message box or debug window. I can gather the co-oridinates before but getting them after is the problem. Any ideas?
Save Position/size Of Form
I'm trying to give the user of my program the option to save the forms current position and size.
I'm writing the Top, Left, Width and Heigth properties to the registry when the user clicks the "Save position" menu item, and I'm loading them from the registry when the form loads.
The form is called "frmMain" and I'm using the following code:
Private Sub Form_Load()If Len(GetSetting("ETScript", "Options", "FormPos_Top")) > 0 Then Me.Top = GetSetting("ETScript", "Options", "FormPos_Top") Me.Left = GetSetting("ETScript", "Options", "FormPos_Left") Me.Width = GetSetting("ETScript", "Options", "FormPos_Width") Me.Height = GetSetting("ETScript", "Options", "FormPos_Height")End IfEnd Sub Private Sub mnuSavePos_Click()SaveSetting "ETScript", "Options", "FormPos_Top", Me.TopSaveSetting "ETScript", "Options", "FormPos_Left", Me.LeftSaveSetting "ETScript", "Options", "FormPos_Width", Me.WidthSaveSetting "ETScript", "Options", "FormPos_Height", Me.HeightEnd Sub
There is one problem:
The width and height gets stored and loaded correctly, but the Top and Left properties do not.
Well actually, when running through the program in debug mode, I can see that they do indeed get the right values, but for some reason my form is still always loading in the middle of the screen.
Is this default VB behaviour maybe? How can I do this?
I have thoroughly searched the entire project for any "Me.Top" and "frmMain.Top" entries but there were none apart from this, so I'm 100% sure this is the only place where I set the property (apart from during design-time maybe, but that should not matter because the forms top and left are set in the form_load?)
Position Form At Top Centre Of Screen.
Subject says it all. Any suggestions?
My project starts up as maximized but when I press the "normal" button (the one between the maximize and minimize) the form is located in the centre of the screen.
Form's Position In Relation To The Screen
I actually have two questions for you brilliant minds to ponder on...
1) How can I capture a mouse click anywhere on the screen?
2) How can I find the location of a form (or any other window) in realation to the screen. For instance, it's left most edge and it's upper most edge.
Thank you for your help,
Loading Form's Screen Position
while i'm waiting on the webbrowser to load some stuff..i know how to make my form appear..but how do i make it appear on top of my webbrowser control..in the center..and stick there?
Screen Position To Form Control Math.... HELP!
I am using the
Private Declare Function GetCursorPos Lib "user32" (lpPoint As _
POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
Dim a As POINTAPI
Dim b As Long
Dim c As Long
API to read the position of the mouse.
Now I need my form to use twips since I dynamically am adjusting position of all form controls on form resize and I tried pixels and it was a mess.
Now I use the mouse position in conjunction with Microsoft HTML Object library pointing to the currently loaded page in the webbrowser control.
Say a link is on the page. I use the mouse X,Y to check if it is over a link.
The API returns positions that to not work with the browser.
I will be like 30 pixels above a link and it thinks I am on it.
I tried adjusting it and it still didn't work.
Is there some math solution to get the returned X and Y to be X and Y for the browser control? Wouldn't it have to account for different screen resolutions and form sizes?
The code attached is in VB 5.
Thank you for any help
Form Size And Screen Size
I've made a form on friends pc with VB6 and when i transfered it to my pc, i have the problem that the form is displayed in a way that is only a part of it in the screen...
What mean is that the form seems to be larger than the screen how is this possible?
How can i make it to be the same size as the screen?
How To Fix The Form Size To Screen
I've created a form with sstab control on my pc(1280X768 screen resolution)
And i am trying to run the form on other pc(with 1280 X1024 screen resolution).The Form is fully designed with different controls(SStab..combo etc...)
I have the problem that the form is not displaying completely,
i can view only one part of the form.
Is it a problem with the screen resolution??
I used the following different types of code for resize.
but it is not working
??Any suggestionos please
Private Sub Form_Load() Me.Height = Screen.Height Me.Width = Screen.WidthEnd Sub Private Sub Form_Load()fme.Move Screen.Width - me.Width, Screen.Height - Me.Heightend sub Private Sub Form_Load() Me.Move (Screen.Width - Me.Width) / 2, _ (Screen.Height - Me.Height) / 2end sub
Load A Form To Fit Any Screen Size
Please I like to code my form to load without scartering the component put on the form weather it load on 800 X 600 screen or 1020 X 760 resolution. Please help me out
Form Sizing To Fit Within A Given Screen Size
I have an application whose main form is centred on the screen and barely fits at the top and bottom on a screen resolution of 1024 X 1268. Though things fit and look fine at this resolution (on a large monitor to boot) I know that in order for this application to be transferable it must be able to display on smaller monitors and coarser resolutions.
My question is this: Where in the project's code would you put the code that finds the screen dimensions of the monitor the App is being loaded up on, at the display resolution the user is operating on?
Is it just as simple as giving a minimum distance (in twips) from the screen height to the form height and one for the difference from the bottom of the screen to the bottom of the form? Where does one look to find the Property "Screen.Height"?
Form Size Changes With Different Screen Resolution?
i have create a program under the resolution of 1024x768. Is it possible that the form of my program gets stretched even if i distribute this program to the computer of the same resolution, i.e 1024x768.
Form Size Vs. Screen Resolution
how do you determine form size (height and width) based on selected system screen resolution?
example: if monitor resolution is set for 800x600 what would be the form size (height and width) if i wanted the form to be same size as screen?
what is the relation of the height and width indicated in VB6 to the screen resolution?
Making Form To Screen Size.
I have changed resolution to 1024 X 728 pixels.Now wen I open a form in design mode I am not able to drag its width and height.
Height = 11520
ScaleHeight = 1275.275
ScaleWidth = 2000
I aligned some controls on the form to look neatly.But when I run application my Form should completly fill computer screen.I don't want to use WindowStae = Maximized.If i say like that my controls are not aligning properly and not looks good.
Si If I made my form to screen size(15") while in design time so I can place my controls in neat way?
can any one explain how to do that?
What is the difference of Height and scleHeight?
How To Set Form Width To Screen Size?
I have made a text scroll program that runs at the top of the screen. it has a fixed width and hight right now to fit 1024x768
what I need is, when the program starts it makes the form the same width as the screen no matter what screen size the user has.. height can stay the same. form doesnt move so it doesnt need to dock or anything either.
Resizing Form In VBA According To Screen Size
In VBA is there a way for a program to determine the PC screen size and
size a form accordingly to fit the window? Example: I need my form to fit
my monitor's screen size of 800x600 pixel size, etc.
The Casey Group
3799 Route 46 East, Suite 209
Parsippany, NJ 07054
Screen Resolution And Form Size
Can i change the size of my form and associated controls as per theScreen Resoultion?
Please suggest me to achieve this.
Form Size Against Screen Resolution...
Lets see if anybody can handle this problem...
I want to have a form sized larger then screen size. VB Is not letting me have taller form then current screen size, but I need to use one for my program. Even thou I am not showing the form, I only use Form1.PrintForm and it cuts the bottem. In design time, I can enter the heigth number manually, and make it large... In run time, it cuts it...
So... anyone could help me on this ?
Set Form Size Higher Than Screen Resolution
i Would like to set form size higher than screen resolution.
Please don't answer me Form.width = screen.width+x !!!
i have already tryed that but it doesn't work...
I have a form with a layout designed for screen over or equal to 1024X768
but when i load that form in a screen of 800x600 Vb6 decide to cut hardly the form hiding critical buttons...
thank you for your help
Formatting Form To Users Screen Size
my question is probably simple to most of you, but for me it will be realy handy!!
i need to make sure that the forms i built reformats to the users screen setting, example :480x640 or 1024x768...i need the form to stay intact but to stretch like a picture...
thank for you're time
Setting Vb Form Size According To Screen Resolution
I am stuck up with a problem.I designed an application(in VB) which looks great on my system but when I transferred the application to the clients system it doesn't seem to fit in the screen.I tried to change the resolution but some drivers were missing and I couldn't change the resolution.Is there any way we can change the size of the forms according to screen resolution?
Thanks for any help in advance.
Form Size In Different Fonts And Screen Resolutions
I've got one user who uses large fonts and a lower (800x600) resolution on their PC. This causes my form to run off the edges and they can't see the controls or even close the form.
I've read several older threads about this but I'm still not sure how I should approach fixing the issue. Any advice? I tried to have patience but it took to long! -DW
Stretch Image To Form (or Screen) Size
I have a form that opens maximized so it'll cover the entire screen in any resolution. I want an image box to cover and stretch over the entire form (or screen) as well no matter what the resolution. I've tried the followin excerpts of code, but none of them work:
image1.width = screen.width
image2.height = screen.height
image1.width = me.scalewidth
image1.hieght = me.scaleheight
Could someone please tell me what I'm doing wrong?
I also tried changin the form's scale mode property to "pixel" but that didn't do too much.
Edited by - Marce22 on 8/3/2003 11:47:24 AM
N00b Question - Form Not Same Size On Diff. Screen Resolutions
/me new to forums
I start off by making a new form...maximize...put a command button on upper-left-most corner...another on the lower-right-most corner...make .exe
It looked fine on 1024x768, but when I reduced the resolution to 800x600 the button became huge, and the lower-right button was not there. How do I make the form the same size for all resolutions, or, how do I make scrollbars for the form instead? VB does not make one automatically. Actually, maybe the scrollbars idea sounds better, but I don't know how to use them. Please help...
Size Of The Monitor
I'm looking for a way to now the size of my monitor by code , note that i dont mean the resolution of the screen but the size in inchs of the monitor ..
File Size Monitor
Is it possible to monitor the size of any given file using vb6 in realtime? If yes, how can this be done?
Installing To A Different Monitor Size
I'm trying to make a disc to install my vb program. I created a setup.exe from an INNO script. My vb program was developed on my computer which has a 17" monitor. I executed the setup on a computer which has a 13" monitor. The vb screens appeared on the second computer to be of the 17" size. The screen was chopped off at the bottom and right side. I was not expecting this. I though the computer displayed information to fit the screen. Anyway, how can I correct it, how can I make my setup work on any computer?
Monitor Size Problem
I have designed a form with 12000 X 9000 size(Thats all I can drag on my computer) and my monitor size is 15 inch.When I run this it filled to monitor size.But when I run on 17 inch monitor there is some place(2 inch) left around the frame.I don't want to maximize scree to window size,if i do controls are misplacing on the screen.Is there any way to fill the form with in monitor size?
How To Obtain Users Screen Size Then Make That The Forms Size
i want to form load my form to fit the size of the users screen.. so make the height and width = to the screens height and width.. whats the easiest way?
also for components inside the form. like if i resized the form i want the components to stay the same size and resize with it?? i know it has something to do with scaleheight..ect..
To Monitor A Client Screen From VB
is there any api's of contorls or options or projects that we can a monitor a client screen from our application, if so please let me know the details, lot of replies will be helpful,
I am using a keyboard hook to make my function keys into useful function keys instead of having to use the FN button on notebooks.
F9 - Volume Down
F10 - Volume Up
F11 - Mute/Unmute
This is all done. Now I want to use F4 to darken and F5 to brighten my laptop screen. I know that this can be done using the FN key but I don't want key combinations. I want to reach up with one hand. Petty as it seems, it is much more practical. Funny, that is the way Mac does it.
How can I darken and lighten an LCD notebook screen? I don't know DirectX.
Stupid Question On Monitor Size
Suppose you have two monitors.
Monitor one is an 15 inches screen set to a 800*600 resolution.
Monitor two is an 17 inches screen set to a 800*600 resolution.
Will they display the same workarea ?
Will icons from Monitor 2 will be bigger so that they display the same working area ?
Or will Monitor1 and Monitor2 will display the same icons size and Monitor2 will have a bigger work area ?
Help With VB Code To Monitor A Folder Size
Does anybody know how I can monitor the size of a folder, so that when it reaches a particular memory size, a message can appear to alert the user. I think I need to set-up a variable that can be linked to the size of the folder, then possibly a case statement with various messages.
Any help would be appreciated.