|
感谢小宝版主,修改后,测试成功~
修改后的按钮单击代码如下:
- Private Sub Command0_Click()
- Dim p1 As POINTF, p2 As POINTF
- Dim tempHwnd As Long
-
- InitGDIPlus
-
- tempHwnd = FindWindowEx(Me.hwnd, 0&, "OFormSub", vbNullString)
- tempHwnd = FindWindowEx(Me.hwnd, tempHwnd, "OFormSub", vbNullString)
- GdipCreateFromHWND tempHwnd, graphics
- GdipSetSmoothingMode graphics, SmoothingModeAntiAlias
-
- GdipCreatePen1 &HFFFF0000, 1, UnitPixel, pen
- GdipDrawLineI graphics, pen, 1, 1, 400, 200
-
- GdipCreatePen1 &HFFFF0000, 1, UnitPixel, pen
- GdipDrawRectangleI graphics, pen, 30, 30, 200, 200
-
- GdipCreateSolidFill &HAA0000FF, brush
- GdipFillRectangleI graphics, brush, 30, 30, 200, 200
- GdipDrawRectangleI graphics, pen, 30, 30, 200, 200
-
- p1.X = 10
- p1.Y = 10
- p2.X = 200
- p2.Y = 100
-
- GdipCreateLineBrush p1, p2, &H8AFF00FF, &HFFFF0000, WrapModeTileFlipXY, brush
- GdipFillEllipseI graphics, brush, p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.X
- End Sub
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|