Grafik invertieren
[Windows 95/98/NT/2000]

26.09.1998


Mit einer einfachen API-Funktion können Sie eine Grafik invertiert darstellen:

ERFORDERLICHE OBJEKTE
1 Picturebox (Picture1)
1 Commandbutton (Command1)

FORM-CODE

   Private Type RECT
      Left As Long
      Top As Long
      Right As Long
      Bottom As Long
   End Type
   Private Declare Function InvertRect Lib "user32" _
      (ByVal hdc As Long, lpRect As RECT) As Long
   Private Sub cmdInvertieren_Click()
      Dim R As RECT
      R.Bottom = 0
      R.Left = Picture.Width
      R.Right = Picture1.Height
      R.Top = Picture1.Height
      InvertRect Picture1.hdc, R
   End Sub
   Private Sub Form_Load()
      Picture1.Picture = LoadPicture("mars.jpg")
   End Sub



 

Download - 14 KB