AW: Dimmed Sample
Neue Version oben!
Siehe History Über WM_NCACTIVATE VirtualPiano mit Dimmed.dll gruss |
AW: Dimmed Sample
Liste der Anhänge anzeigen (Anzahl: 1)
Hi...
Muss gestehen ich hab mich den Code grad nicht so genau angeschaut aber die Demo scheint Probleme mit Multi-Monitor Betrieb zu haben. Die rechte Hälfte des Forms wurde auf dem rechten Monitor dargestellt. Achja: Vista32 Gruß, Toni |
AW: Dimmed Sample
Zitat:
Denn wer braucht so was hab nur einen Monitor und kanns nicht testen. gruss |
AW: Dimmed Sample
Zitat:
|
AW: Dimmed Sample
[OT]
Gerade in einem alten Projekt (Delphi 5) gefunden:
Delphi-Quellcode:
K.A. wo ich das damals herhatte und ob's bei zwei Monitoren auch klappt :oops:
procedure TeilGrau(b: TBitmap; stufe: byte);
var sp1: byte; x, y: integer; p: PBytearray; g: byte; function rech(b: byte): byte; begin result := (b * stufe + g) div sp1; end; begin sp1 := succ(stufe); for y := 0 to b.height - 1 do begin p := b.scanline[y]; x := 0; while x < b3 do begin g := (p[x] + p[x + 1] + p[x + 2]) div 3; p[x] := rech(p[x]); p[x + 1] := rech(p[x + 1]); p[x + 2] := rech(p[x + 2]); inc(x, 3); end; end; end; procedure TFormCountDown.MakeDesktopGray(Zeit: Integer); var x, y, z: integer; dwStyle: DWord; dc, ddc: HDC; hbm: HBitmap; bmp: TBitmap; // b3: integer; geschwindigkeit: integer; begin geschwindigkeit := 200; dc := createDC('DISPLAY', nil, nil, nil); // --- Bildschirm in einer Bitmap sichern --- ddc := CreateCompatibleDC(dc); hbm := CreateCompatibleBitmap(dc, screen.width, screen.height); selectobject(ddc, hbm); BitBlt(ddc, 0, 0, screen.width, screen.height, dc, 0, 0, srcCopy); // ------------------------------------------- bmp := TBitmap.create; bmp.pixelformat := pf24bit; bmp.width := screen.width; bmp.height := screen.height; b3 := screen.width * 3; BitBlt(bmp.canvas.handle, 0, 0, screen.width, screen.height, dc, 0, 0, srcCopy); z := 255 - geschwindigkeit; y := round(2.5 * z / sqrt(z)); x := 1; while x < y do begin TeilGrau(bmp, z div x); BitBlt(dc, 0, 0, screen.width, screen.height, bmp.canvas.handle, 0, 0, srcCopy); application.processmessages; sleep(10); inc(x); end; // etwas den grauen Bildschirm stehen lassen sleep(2000); // Wiederherstellen des farbigen Desktops BitBlt(dc, 0, 0, screen.width, screen.height, ddc, 0, 0, srcCopy); // freigeben bmp.free; deleteobject(hbm); deletedc(ddc); deletedc(dc); end; GG [/OT] |
AW: Dimmed Sample
Zitat:
|
AW: Dimmed Sample
Zitat:
Alleine schon aufgrund der neuen Desktop Umgebung AktiveDesktop, Desktop usw.. ist das schon zum scheitern verurteilt.. bzw muss man noch eine menge mehr machen. Der Grund meiner DLL ist dieser das sie auch von anderen Sprachen verwendet werden kann. Dazu ist es nur von nöten das man die beiden funktionen auf andere umgebungen übersetzt. Zitat:
Schreibe nur Quelltext den ich auch selber überprüfen kann. Aber hab nichts dagegen wenn es noch jemand anderes einbaut der 2 Monitore hat. gruss |
AW: Dimmed Sample
Dimmed VB6
Modul mDimmed
Code:
Form Form1
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" ()
Code:
Neue Version oben incl. VB6 API und Sample
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 Nur damit jetzt jeder weis warum eine DLL VB6.exe 100K Delphi.exe 1MB Zum vergleich.. ;) gruss |
AW: Dimmed Sample
Moin Emil,
Zitat:
Ist die Delphi-Exe auch mit Runtime-Packages compiliert worden? |
AW: Dimmed Sample
Zitat:
Danke für die richtigstellung. gruss |
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz