SetPixel

Aus API-Wiki
Zur Navigation springenZur Suche springen

Die API-Funktion SetPixel gibt Auskunft über XYZ.

Declare Function SetPixel Lib "gdi32" ( _

                ByVal hDC As Long, _
                ByVal x As Long, _
                ByVal y As Long, _
                ByVal crColor As Long) As Long 


Parameter

hDC

Beschreibung

x

Beschreibung

y

Beschreibung

crColor

Beschreibung


Rückgabe(n)

Die Funktion gibt einen Wert des Types Long zurück.



[OPTIONAL] Beispiel

'Beispielcode... Private Declare Function SetPixel Lib "gdi32.dll" ( _

 ByVal hdc As Long, _
 ByVal X As Long, _
 ByVal Y As Long, _
 ByVal crColor As Long) As Long


Private Sub Command1_Click()

Dim I, J As Long

 With Picture1
   .ScaleMode = vbPixels

   ' Grafik per Zufall erzeugen.
   For I = 0 To .ScaleWidth
     For J = 0 To .ScaleHeight
       SetPixel .hdc, I, J, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
     Next J
   Next I
 End With

End Sub

[OPTIONAL] Hinweise

Diese Funktion setzt die ABC - Runtime Environment voraus. Diese ist kostenlos erhältlich unter: [Adresse].


[OPTIONAL] Betriebsystem

Die Funktion ist unter folgenden Betriebssystemen funktionsfähig:

  • Windows NT 4.0
  • Windows NT 5.0 (2000)
  • Windows XP (ab SP2)
  • Windows Vista (nur x64)


[OPTIONAL] Verwandte Funktionen

Api1 - Beschreibung
Api2 - Beschreibung


Verweise


[PFLICHT] Quelle(n)

  • MSDN US-Libary (nach Möglichkeit Link auf die Beschreibung).
  • Andere Quellen (falls vorhanden)