Article View: fj.lang.visualbasic
Article #1408Re: VB$B$G2hA|$r2sE>$5$;$kJ}K!$r65$($F$/$@$5$$(J
From: Makoto Miura
Date: Wed, 10 Sep 1997 00:00
Date: Wed, 10 Sep 1997 00:00
53 lines
2139 bytes
2139 bytes
$B$3$s$K$A$O!"$_$&$i$G$9!#(J
Masaya Hirano <masayah@mbox.kyoto-inet.or.jp> wrote in article
<01bcb77f$ebaacc20$14646464@pc-9821xc13>...
> $B$I$l$[$I%9%T!<%I%"%C%W$K$J$k$+2r$j$^$;$s$,!"(J
> API $B$N(J GetPixel $B$H(J SetPixel $B$J$I$$$+$,$G$7$g$&!#(J
>
> picure1.Point(x,y) $B$N(J $B$H$3$m$r(J GetPixel(picture1.hdc, x, y) $B$K!"(J
>
> picure2.Pset(picture1.ScaleWidth - x - 1, _
> picture1.ScaleHeight - y - 1), color
> $B$N$H$3$m$r(J
>
> SetPixel(picure2.hdc, _
> picture1.ScaleWidth - x - 1, _
> picture1.ScaleHeight - y - 1, _
> color)
$B65$($F$b$i$C$?DL$j$K$d$C$F$_$?$N$G$9$,!"$&$^$/9T$-$^$;$s$G$7$?!&!&!&(J
$BESCf$GI=<($,$H$^$C$F$7$^$$$^$9!#(J
$B$I$3$,0-$$$s$G$7$g$&$+!&!&!&(J
-----
Private Declare Function GetPixel Lib "GDI" (ByVal hDC As Integer, _
ByVal X As Integer, ByVal Y As Integer) As Long
Private Declare Function SetPixel Lib "GDI" (ByVal hDC As Integer, _
ByVal X As Integer, ByVal Y As Integer, ByVal crColor As Long) As Long
Private Sub cmdRotate_Click()
Dim nRet As Long, color As Long
Dim X As Integer, Y As Integer
Form1.MousePointer = 11
picture2.Cls
For X = 0 To picture1.ScaleWidth
For Y = 0 To picture1.ScaleHeight
color = GetPixel(picture1.hDC, X, Y)
If color <> -1 Then
nRet = SetPixel(picture2.hDC, picture1.ScaleWidth - X - 1,_
picture1.ScaleHeight - Y - 1, color)
End If
Next Y
DoEvents()
Next X
Form1.MousePointer = 0
End Sub
-----
Technical Details
Message-ID:
<01bcbdff$2689b380$e63a18ca@k4miura.ics.co.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bcb352$3a1e84a0$e63a18ca@k4miura.ics.co.jp> <01bcb77f$ebaacc20$14646464@pc-9821xc13>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 105c2e,190664a32394fe97,start X-Google-Attributes: gid105c2e,public From: "Makoto Miura" <miura@ics.co.jp> Subject: Re: VB$B$G2hA|$r2sE>$5$;$kJ}K!$r65$($F$/$@$5$$(J Date: 1997/09/10 Message-ID: <01bcbdff$2689b380$e63a18ca@k4miura.ics.co.jp> X-Deja-AN: 271314228 References: <01bcb352$3a1e84a0$e63a18ca@k4miura.ics.co.jp> <01bcb77f$ebaacc20$14646464@pc-9821xc13> Organization: Iwate Computing Service Co.,Ltd. Newsgroups: fj.lang.visualbasic