Deutsch
Experimente

Uralte Fenstereffekte aus der User32.DLL

 

p.specht

Seit Windows 2000 umfaßt die Systemkomponente "User32.dll" bis heute einige Fensterauf- und Abbaueffekte, die allerdings nur selten genutzt werden, weil sie z.B. mit neueren Effekten wie Schattenwurf etc. u.U. nicht sehr gut zusammenarbeiten. Weil´s lustig ist, stellt das nachfolgende Progi dennoch einige Effekte zum Selber rumexperimentieren vor.
WindowTitle "Hallo erst mal... Ich weiss ja nicht ob Sie es wussten, aber: ..."
CLS
Def AnimateWindow(3) !"user32.dll","AnimateWindow"
'{To show or hide a window without special effects, use ShowWindow.
' Avoid animating a window that has a drop shadow because it produces visually distracting, jerky animations.
Declare dwtime&,dwflags&
var AW_ACTIVATE&=$00020000'Activates the window. Do not use this value with AW_HIDE
var AW_BLEND&   =$00080000'Fade effect. This flag can be used only if hwnd is a top-level window.
var AW_CENTER&  =$00000010'Makes the window appear to collapse inward if AW_HIDE is used
' or expand outward if the AW_HIDE is not used. The various direction flags have no effect.
var AW_HIDE&    =$00010000'Hides the window. By default, the window is shown.
var AW_HOR_POSITIVE&=$00000001'Animates the window from left to right. This flag can be used with
' roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
var AW_HOR_NEGATIVE&=$00000002'Animates the window from right to left. This flag can be used with
' roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
'You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE
'or AW_VER_NEGATIVE to animate a window diagonally.
var AW_SLIDE&   =$00040000'Uses slide animation. By default, roll animation is used.
' When using slide or roll animation, you must specify the direction. It can be either
' AW_HOR_POSITIVE, AW_HOR_NEGATIVE, AW_VER_POSITIVE, or AW_VER_NEGATIVE.
' This flag is ignored when used with AW_CENTER.
var AW_VER_POSITIVE&=$00000004'Animates the window from top to bottom. This flag can be used with
' roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
var AW_VER_NEGATIVE&=$00000008'Animates the window from bottom to top. This flag can be used with
' roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
'You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE
'or AW_VER_NEGATIVE to animate a window diagonally.
'RESULT (BOOLEAN):
' If the function succeeds, the return value is nonzero.
' If the function fails, the return value is zero.
' The function will fail in the following situations:
'    If the window is already visible and you are trying to show the window.
'    If the window is already hidden  and you are trying to hide the window.
'    If there is no direction specified for the slide or roll animation.
'    When trying to animate a child window with AW_BLEND.
'    If the thread does not own the window. Note that, in this case, AnimateWindow
'    fails but GetLastError returns ERROR_SUCCESS.
' To get extended error information, call the GetLastError function.
' The window procedures for the window and its child windows should handle any
' WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls
' already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT.
' If a child window is displayed partially clipped, when it is animated
' it will have holes where it is clipped.
'} AnimateWindow supports RTL (Run-time library) windows.
usefont "ARIAL",140,90,1,0,0
drawtext 100,100,"1"
waitinput 2000
dwtime&=3000 : dwflags&= 0 \
\'| AW_ACTIVATE& \'not together with aw_hide
| AW_BLEND& \'Fade
| AW_CENTER& \'collapse inward / expand outward
| AW_HIDE& \
| AW_HOR_POSITIVE& \
\'| AW_HOR_NEGATIVE&
\'| AW_SLIDE& \
\'| AW_VER_POSITIVE& \
| AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"2":waitinput 2000
dwtime&=3000 : dwflags& = 1*AW_ACTIVATE& | 0*AW_HIDE& | 1*AW_BLEND& | 1*AW_CENTER& \
| 0*AW_SLIDE& | 0*AW_HOR_POSITIVE& | 0*AW_HOR_NEGATIVE& | 0*AW_VER_POSITIVE& | 0*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"3":waitinput 2000
dwtime&=3000 : dwflags& = 0*AW_ACTIVATE& | 1*AW_HIDE& | 0*AW_BLEND& | 0*AW_CENTER& \
| 1*AW_SLIDE& | 1*AW_HOR_POSITIVE& | 0*AW_HOR_NEGATIVE& | 0*AW_VER_POSITIVE& | 0*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"4":waitinput 2000
dwtime&=3000 : dwflags& = 0*AW_ACTIVATE& | 0*AW_HIDE& | 0*AW_BLEND& | 0*AW_CENTER& \
| 0*AW_SLIDE& | 1*AW_HOR_POSITIVE& | 0*AW_HOR_NEGATIVE& | 1*AW_VER_POSITIVE& | 0*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"5":waitinput 2000:dwtime&=3000
dwflags& = 1*AW_ACTIVATE& | 0*AW_HIDE& | 0*AW_BLEND& | 0*AW_CENTER& \
| 1*AW_SLIDE& | 0*AW_HOR_POSITIVE& | 1*AW_HOR_NEGATIVE& | 1*AW_VER_POSITIVE& | 0*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"6":waitinput 2000:dwtime&=3000
dwflags& = 0*AW_ACTIVATE& | 1*AW_HIDE& | 0*AW_BLEND& | 0*AW_CENTER& \
| 1*AW_SLIDE& | 1*AW_HOR_POSITIVE& | 0*AW_HOR_NEGATIVE& | 1*AW_VER_POSITIVE& | 0*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"7":waitinput 2000:dwtime&=3000
dwflags& = 1*AW_ACTIVATE& | 0*AW_HIDE& | 0*AW_BLEND& | 0*AW_CENTER& \
| 0*AW_SLIDE& | 0*AW_HOR_POSITIVE& | 0*AW_HOR_NEGATIVE& | 0*AW_VER_POSITIVE& | 1*AW_VER_NEGATIVE&
print animatewindow(%hwnd,dwtime&,dwflags&)
usefont "ARIAL",140,90,1,0,0:drawtext 100,100,"OK!":waitinput 2000
end
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
14.06.2021  
 



Zum Experiment


Thementitel, max. 100 Zeichen.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Beitrag  Schrift  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Themenoptionen

1.071 Betrachtungen

Unbenanntvor 0 min.
Gast.081521.08.2024
Thomas Freier27.01.2024
RudiB.02.09.2021
Uwe ''Pascal'' Niemeier23.08.2021
Mehr...

Themeninformationen

Dieses Thema hat 1 Teilnehmer:

p.specht (1x)


Admins  |  AGB  |  Anwendungen  |  Autoren  |  Chat  |  Datenschutz  |  Download  |  Eingangshalle  |  Hilfe  |  Händlerportal  |  Impressum  |  Mart  |  Schnittstellen  |  SDK  |  Services  |  Spiele  |  Suche  |  Support

Ein Projekt aller XProfaner, die es gibt!


Mein XProfan
Private Nachrichten
Eigenes Ablageforum
Themen-Merkliste
Eigene Beiträge
Eigene Themen
Zwischenablage
Abmelden
 Deutsch English Français Español Italia
Übersetzungen

Datenschutz


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie