Thema: Dimmed Sample

Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#28

AW: Dimmed Sample

  Alt 30. Mär 2012, 19:21
Dimmed VB6

Modul mDimmed
Code:
Option Explicit

Public Declare Function GetDesktopWindow Lib "user32" () As Long

Public Declare Function FadeCreate Lib "Dimmed.dll" ( _
    ByVal WinHandle As Long, _
    ByVal FadeTime As Long, _
    ByVal clLight As Long, _
    ByVal clDark As Long _
) As Boolean

Public Declare Sub FadeDestroy Lib "Dimmed.dll" ()
Public Declare Sub InitCommonControls Lib "comctl32" ()
Form Form1
Code:
Option Explicit

Private Initialize As Boolean

Private Sub cmdDimmed_Click()
 
   Initialize = FadeCreate(Me.hWnd, 3500, RGB(255, 255, 255), RGB(0, 0, 0))
   
End Sub

Private Sub cmdDimmedDesktop_Click()
 
  Initialize = FadeCreate(GetDesktopWindow, 3500, RGB(255, 255, 255), RGB(0, 0, 0))
 
End Sub

Private Sub Form_Load()
 
  Call InitCommonControls
  Me.Caption = "Dimmed Sample " + "DLLVers. " + Dimmed_GetVersion
 
End Sub

Private Sub Form_Unload(Cancel As Integer)
 
  If Initialize Then
      FadeDestroy
  End If
 
End Sub
Neue Version oben incl. VB6 API und Sample
Nur damit jetzt jeder weis warum eine DLL

VB6.exe 100K Delphi.exe 1MB
Zum vergleich..

gruss

Geändert von EWeiss (31. Mär 2012 um 14:59 Uhr)
  Mit Zitat antworten Zitat