Deklaration: Declare Function AlphaBlend Lib "msimg32.dll" ( _ ByVal hdcDest As Long, _ ByVal xDest As Long, _ ByVal yDest As Long, _ ByVal WidthDest As Long, _ ByVal HeightDest As Long, _ ByVal hdcSrc As Long, _ ByVal xSrc As Long, _ ByVal ySrc As Long, _ ByVal WidthSrc As Long, _ ByVal HeightSrc As Long, _ ByVal Blendfunc As Long) As Long Beschreibung: Parameter:
Rückgabewert: Beispiel: Private Declare Function AlphaBlend Lib "msimg32.dll" ( _ ByVal hdcDest As Long, _ ByVal xDest As Long, _ ByVal yDest As Long, _ ByVal WidthDest As Long, _ ByVal HeightDest As Long, _ ByVal hdcSrc As Long, _ ByVal xSrc As Long, _ ByVal ySrc As Long, _ ByVal WidthSrc As Long, _ ByVal HeightSrc As Long, _ ByVal Blendfunc As Long) As Long Private Declare Sub MoveMemory Lib "kernel32.dll" _ Alias "RtlMoveMemory" ( _ Destination As Any, _ Source As Any, _ ByVal Length As Long) Private Type BLENDFUNCTION BlendOp As Byte BlendFlags As Byte SourceConstantAlpha As Byte AlphaFormat As Byte End Type ' BlendFunction BlendOp-Konstante Private Const AC_SRC_OVER = &H0 ' die Quelle wird über dem Ziel gezeichnet ' 'BlendFunction AlphaFormat-Konstante Private Const AC_SRC_ALPHA = &H1 ' das Quellbitmap wurde schon mit dem Alphawert multipliziert ' Bildfelder einstellen Private Sub Form_Load() Picture1.ScaleMode = vbPixels Picture1.AutoRedraw = True Picture2.ScaleMode = vbPixels Picture2.AutoRedraw = True End Sub ' Alphablending starten Private Sub Command1_Click() Dim Retval As Long, LBF As Long, BF As BLENDFUNCTION ' Struktur mit Blendingwerten füllen With BF .BlendOp = AC_SRC_OVER .SourceConstantAlpha = 128 End With ' Struktur in eine Long-Variable kopieren Call MoveMemory(LBF, BF, Len(BF)) ' Alphablending-Operation durchführen With Picture1 Retval = AlphaBlend(Picture2.hDC, 0, 0, Picture2.ScaleWidth, _ Picture2.ScaleHeight, .hDC, 0, 0, .ScaleWidth, .ScaleHeight, LBF) Picture2.Refresh If Retval = 0 Then MsgBox "Das Alphablending ist fehlgeschlagen" End If End With End Sub Diese Seite wurde bereits 16.575 mal aufgerufen. |
sevISDN 1.0 Überwachung aller eingehender Anrufe! Die DLL erkennt alle über die CAPI-Schnittstelle eingehenden Anrufe und teilt Ihnen sogar mit, aus welchem Ortsbereich der Anruf stammt. Weitere Highlights: Online-Rufident, Erkennung der Anrufbehandlung u.v.m. Buchempfehlung Tipp des Monats April 2024 Skyfloy Chart von Microsoft und dazu noch gratis Tutorial für Microsoft Chart Controls für Microsoft .NET Framework 3.5 sevOutBar 4.0 Vertikale Menüleisten á la Outlook Erstellen von Outlook ähnlichen Benutzer- interfaces - mit beliebig vielen Gruppen und Symboleinträgen. Moderner OfficeXP-Style mit Farbverläufen, Balloon-Tips, u.v.m. |
||||||||||||||||||||||||||||||||
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein. |