Benutzer mit den meisten Antworten
API merkt sich Daten

Frage
-
Hallo zusammen,
ich habe eine Funktion die sehr schön ist.
<Runtime.InteropServices.DllImport("user32.dll")> _ Public Shared Function AnimateWindow(ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean End Function Public Enum AnimateWindowFlags AW_HOR_POSITIVE = &H1 AW_HOR_NEGATIVE = &H2 AW_VER_POSITIVE = &H4 AW_VER_NEGATIVE = &H8 AW_CENTER = &H10 AW_HIDE = &H10000 AW_ACTIVATE = &H20000 AW_SLIDE = &H40000 AW_BLEND = &H80000 End Enum
Hier kann man die Form vergrößern verkleinern ... wie auch immer.
Wenn ich mit dieser Funktion die Form verschwinden lasse oder einen Button kann ich beim zweiten Aufruf das Control wieder einblenden lassen.
Aber woher weis die Funktion denn die Ursprungsgöße ?
Wo und wie wird das weg gespeichert ?
In der API ?
lieben dank
Bernd
Antworten
-
Hi,
sorry for my response in English, my German is not good enough :-(
No application can create windows by themselves; they are created by the operating system upon request, and the operating system returns a 'handle' in response. The handle is just a kind of pointer, to an internal structure, kept by the operating system, that keeps state information of the window. It is in that state that the restore-size is kept.
Regards, Nico
- Als Antwort markiert Bernd Schlepütz Donnerstag, 17. Mai 2012 08:11
-
Bernd,
most of these values are encapsulated by the window properties in your programming language.
These would be the width and height or size properties of the form.
When the form is minimized or maximized, these values represent the 'normal' size.
If you want to retrieve it through a handle, i think the
GetWindowRect
function can be used.
Regards, Nico
- Bearbeitet Nico Boey Mittwoch, 16. Mai 2012 13:25
- Als Antwort markiert Bernd Schlepütz Donnerstag, 17. Mai 2012 08:11
Alle Antworten
-
Hi,
sorry for my response in English, my German is not good enough :-(
No application can create windows by themselves; they are created by the operating system upon request, and the operating system returns a 'handle' in response. The handle is just a kind of pointer, to an internal structure, kept by the operating system, that keeps state information of the window. It is in that state that the restore-size is kept.
Regards, Nico
- Als Antwort markiert Bernd Schlepütz Donnerstag, 17. Mai 2012 08:11
-
Bernd,
most of these values are encapsulated by the window properties in your programming language.
These would be the width and height or size properties of the form.
When the form is minimized or maximized, these values represent the 'normal' size.
If you want to retrieve it through a handle, i think the
GetWindowRect
function can be used.
Regards, Nico
- Bearbeitet Nico Boey Mittwoch, 16. Mai 2012 13:25
- Als Antwort markiert Bernd Schlepütz Donnerstag, 17. Mai 2012 08:11
-
Hi,
i test the GetWindowRect Funktion.
This Funktion gives me the aktual position and anktual location.
And not the values that the control has before. Like the AnimateWindow Funtion do it.So what i want to do is. Write some functions to animate Controls.
What i want is, i want to save the old values. Position and Size.so first step. save old values then animate the Control.
sekond step. restor the Control to old size and position.thanks
Bernd