明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1337|回复: 3

[VBA]麻烦各位帮忙

[复制链接]
发表于 2003-10-28 11:12:00 | 显示全部楼层 |阅读模式
想创建一特殊形状的窗体,但是运行的时候提示"找不到DLL的入口点createellipticrgn gdi 32 ",我对于这些还不大清楚,是不是VB安装有问题啊
Option Explicit
Private Declare Function createellipticrgn Lib "gdi32" _
(ByVal x1 As Long, ByVal y1 As Long, _
ByVal x2 As Long, ByVal y2 As Long) As Long
Private Declare Function combinergn Lib "gdi32" _
(ByVal hedstrgn As Long, ByVal hsrcrgn1 As Long, _
ByVal hsrcrgn2 As Long, ByVal ncombinemode As Long) As Long
Private Declare Function setwindowrgn Lib "user32" _
(ByVal hwnd As Long, ByVal hrgn As Long, _
ByVal bredraw As Boolean) As Long

Const rgn_xor = 3
Private Sub form_load()
Dim x1, x2
x1 = createellipticrgn(100, 100, 400, 400)
x2 = createellipticrgn(200, 100, 500, 400)
combinergn x1, x1, x2, rgn_xor
setwindowrgn hwnd, x1, 1
End Sub
发表于 2003-10-28 11:46:00 | 显示全部楼层
不是,应该是VB的窗体还没创建,放到Click、Paint或者Resize等过程之中试试。
发表于 2003-10-28 11:49:00 | 显示全部楼层
声明的API函数与大小写有关,自己查查吧
[WEB]http://vbworld.sxnw.gov.cn/vbapi/index.asp[/WEB]
 楼主| 发表于 2003-10-28 19:01:00 | 显示全部楼层
果然是分大小写的,多谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-28 12:52 , Processed in 0.178608 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表