掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
GDIでの円 (ID:101187)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
下記のコードだと、塗りつぶしの円ができてしまいます。 塗りつぶさない円はどうやって書くのでしょうか? Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As Any) As Long Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Sub Command1_Click() Dim hDesktopWnd As Long Dim hDesktopDC As Long Dim rDesktop As RECT hDesktopWnd = GetDesktopWindow() 'デスクトップのハンドルを取得 hDesktopDC = GetWindowDC(hDesktopWnd) 'デスクトップのデバイスコンテキストを取得 Call GetWindowRect(hDesktopWnd, rDesktop) 'デスクトップの大きさを取得 Call Ellipse(hDesktopDC, 500, 500, 400, 400) Call ReleaseDC(hDesktopWnd, hDesktopDC) 'デバイスコンテキストを開放する。 End Sub
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.