掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
画像を縮小し表示するには? (ID:108727)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
これはどうですか? Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, _ ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, _ ByVal nHeight As Long, ByVal hSrcDC As Long, _ ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, _ ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long Private Declare Function SetStretchBltMode Lib "gdi32" (ByVal hdc As Long, _ ByVal nStretchMode As Long) As Long Private Const SRCCOPY = &HCC0020 Private Const COLORONCOLOR = 3 Private Sub Command1_Click() Picture2.Cls Call SetStretchBltMode(Picture2.hdc, COLORONCOLOR) Call StretchBlt(Picture2.hdc, 0, 0, Picture2.Width / 2, Picture2.Height / 2, _ Picture1.hdc, 0, 0, Picture1.Width, Picture1.Height, SRCCOPY) End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.