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.586 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 Mai 2024 Hermann Röttger Wochentage eines Datumsbereichs ermitteln Wochentage eines Datumsbereichs ermitteln, optional mit Feiertagsberechnung sevAniGif (VB/VBA) Anzeigen von animierten GIF-Dateien Ab sofort lassen sich auch unter VB6 und VBA (Access ab Version 2000) animierte GIF-Grafiken anzeigen und abspielen, die entweder lokal auf dem System oder auf einem Webserver gespeichert sind. |
||||||||||||||||||||||||||||||||
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. |