I recently created an application on my 19" monitor - looked good.
Tried running it on a 17 inch monitor - didn't look so good anymore.
Is there a way that monitor resolution/screen size can be detected, so that
I could keep my controls and form displayed and centered without resorting
to scroll bars?
Same problem with running a form Maximised or minimised.
Is there a way to detect if a form is in it's maximised or minimised state,
and it's current size, so that controls can be centered?
--
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931) 3 2352
* "What-a-Tool" <Di************ ************@No ShitSherlock.Ne t> scripsit: I recently created an application on my 19" monitor - looked good. Tried running it on a 17 inch monitor - didn't look so good anymore. Is there a way that monitor resolution/screen size can be detected, so that I could keep my controls and form displayed and centered without resorting to scroll bars? Same problem with running a form Maximised or minimised.
'SystemInformat ion.PrimaryMoni torSize'
'SystemInformat ion.WorkingArea '
'SystemInformat ion.VirtualScre en'
'Screen.Primary Screen.Bounds'
'Screen.Primary Screen.WorkingA rea'
When using multiple monitors:
'Screen.AllScre ens'
Is there a way to detect if a form is in it's maximised or minimised state, and it's current size, so that controls can be centered?
Check the form's 'WindowState' property in its 'Resize' event.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html>
Hi,
The SystemInformati on.PrimaryMonit orSize will tell you the screen
size in pixels. The forms windowstate property will tell you if the form is
minimized, maximized, or normal.
Ken
------------------
"What-a-Tool" <Di************ ************@No ShitSherlock.Ne t> wrote in
message news:il3sb.1927 7$In3.2057@lake read01... I recently created an application on my 19" monitor - looked good. Tried running it on a 17 inch monitor - didn't look so good anymore. Is there a way that monitor resolution/screen size can be detected, so
that I could keep my controls and form displayed and centered without resorting to scroll bars? Same problem with running a form Maximised or minimised. Is there a way to detect if a form is in it's maximised or minimised
state, and it's current size, so that controls can be centered? --
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931)
Thanks - You guys are the best -
--
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
"What-a-Tool" <Di************ ************@No ShitSherlock.Ne t> wrote in
message news:il3sb.1927 7$In3.2057@lake read01... I recently created an application on my 19" monitor - looked good. Tried running it on a 17 inch monitor - didn't look so good anymore. Is there a way that monitor resolution/screen size can be detected, so
that I could keep my controls and form displayed and centered without resorting to scroll bars? Same problem with running a form Maximised or minimised. Is there a way to detect if a form is in it's maximised or minimised
state, and it's current size, so that controls can be centered? --
/ Sean the Mc /
"I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Hill |
last post by:
I have a perl script that i use to render a html page. In that page i
call out a stylesheet. If the user has a 800x600 display the fonts are
really too big.
Since screen resolution is a function of the client and I have this
javascript ot detect the srecc size:
function ck_res()
{
if ( (screen.width != 1024) && (screen.height != 768) )
{
|
by: Dennis |
last post by:
Is there some way --using, say, DOM or javascript-- to detect the
current pixel width and/or height of a relatively sized table or of
one of its columns or rows. I'm going to be writing javascript to
adjust my page to the viewer's browser window dimensions and this
would sure be great information to have.
Thanks ....
Dennis
|
by: simchajoy2000 |
last post by:
Is there anyway to dynamically detect the screen resolution of a
client's computer in ASP.NET?? All the code I have found on the
internet was specifically for Access forms. I found this code:
'Module Declarations
Const WM_HORZRES = 8
Const WM_VERTRES = 10
Declare Function WM_apiGetDeviceCaps _
Lib "gdi32" Alias "GetDeviceCaps" _
|
by: Brent |
last post by:
Does anyone know the best way to detect and track a visitors screen
resolution. I know the javascript to detect the users resolution but
I am a bit confused on the best way to track and save this. Should I
save it to a database or is it easier to save it to a text file?
|
by: EMW |
last post by:
I created my page to work on a 800x600 size window, but when the user has
his/her screen set on a larger size, they'll get a empty area at the right
side of the screen.
I don't like this, looks unproffessional, so I want to fill it with
something, but only if the size is larger then 800x600.
How can I detect this in the FormOpen part of my...
| |
by: Luis Esteban Valencia |
last post by:
Detect screen resolution? IS THAT POSSIBLE?
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 2.
MIEMBRO ACTIVO DE ALIANZADEV
|
by: JaimeM26 |
last post by:
Does anyone know how to detect and move/resize the Taskbar in VB.NET?
I am able to determine if it is on the top or bottom by comparing the
following 2 items.
System.Windows.Forms.Screen.PrimaryScreen.Bounds()
and
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea
But i am having trouble moving the task bar back to its default
|
by: A. Gaubatz |
last post by:
Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?
Thanks in advance,
*** Sent via Developersdex http://www.developersdex.com ***
|
by: Steve |
last post by:
Hi All
I have an on-screen keyboard within a POS program I have written in VB.net
2005, for touch screen computers
I have it set to 'always on top' so the user can move the cursor to
different text boxes and type using the on-screen keyboard
The keyboard launches via the mouseclick event for any text box
If another form is launched,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |