473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do you get a window's size when WindowState <> Normal?

Bob
I had the answer to this but lost it. It's an API call but I can't find it
in the API giude. Could someone refresh my momory?

TIA,
Bob
Nov 21 '05 #1
2 2808
"Bob" <no***@nowhere.com> schrieb:
I had the answer to this but lost it. It's an API call but I can't find it
in the API giude.


Form Placement Component
<URL:http://www.codeproject.com/csharp/Placement.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Bob
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eL**************@TK2MSFTNGP15.phx.gbl...
Form Placement Component
<URL:http://www.codeproject.com/csharp/Placement.asp>


I was able to extract what I needed (below).

Thanks.

Bob

----------------

Private Declare Function GetWindowPlacement Lib "user32" _
(ByVal hwnd As IntPtr, _
ByRef lpwndpl As WINDOWPLACEMENT) As Integer

Public Structure WINDOWPLACEMENT
Public length As Integer
Public flags As Integer
Public showCmd As Integer
Public ptMinPosition As POINT
Public ptMaxPosition As POINT
Public rcNormalPosition As RECT
Public Structure RECT
Public Sub New( _
ByVal l As Integer, ByVal t As Integer, _
ByVal r As Integer, ByVal b As Integer)
Left = l
Top = t
Right = r
Bottom = b
End Sub
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
Public Structure POINT
Public Sub New(ByVal iX As Integer, ByVal iY As Integer)
X = iX
Y = iY
End Sub
Public X, Y As Integer
End Structure
End Structure

Public Shared Function GetPlacement( _
ByVal hwnd As IntPtr) As WINDOWPLACEMENT
Dim wp As WINDOWPLACEMENT
GetWindowPlacement(hwnd, wp)
Return wp
End Function
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Benson | last post by:
Hi, I've been looking at the "Oracle9 i Database New Features" guide, from which I quote: XML Generation In response to the challenge of generating XML in bulk from a database, XML generation...
1
by: JZ | last post by:
Is there any way to fill wxComboBox with a dictionary, not a list? All normal combobox widgets in HTML or Flash return id, not label. I would like to display 'A', 'B' and return 'a' or 'b'...
2
by: Nachi | last post by:
Hi, Urgent Help appreciated.... I am getting resultset with first condition and when try to get the resutlset from second condition i am getting the above error in SQL200. I know that i am...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
16
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
45
by: Zytan | last post by:
This returns the following error: "Cannot modify the return value of 'System.Collections.Generic.List<MyStruct>.this' because it is not a variable" and I have no idea why! Do lists return copies...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
0
by: shrik | last post by:
I have following error : Total giant files in replay configuration file are : File name : /new_file/prob1.rec Given file /new_file/prob1.rec is successfully verified. Splitting for giant file...
4
by: shrik | last post by:
I have following error : Total giant files in replay configuration file are : File name : /new_file/prob1.rec Given file /new_file/prob1.rec is successfully verified. Splitting for giant file...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.