你所说的这个功能我做过我是做成了
不过我看你的程序很难看懂 不知道你的那些
变量都是什么?
你能不能再说清楚一点?
不过我看你的程序很难看懂 不知道你的那些
变量都是什么?
你能不能再说清楚一点?
解决方案 »
- 如何使用ADOX创建空mdb文件?
- 求任意多边形最大内圆,小女子不胜感激,谢谢!!!!
- 麻烦哪位大虾,帮我看看这个WIN32程序,为什么我鼠标位置不对?
- 各位大虾 请问怎样获取任意ACCESS数据库中数据表的名称啊?
- 安装msdn时老是不成功。显示无效的驱动器,是什么原因呢?
- 帮帮忙,怎样替换.h文件
- 请问放置控件时怎样设置控件上的字体?谢谢
- 怎样在工程中加入自已写的类(一个头文件跟一个源文件)高手进来看看
- 各位大虾, 怎样才能知道被分区的移动硬盘的逻辑卷属于同一个物理设备?
- ?命令行下关机的命令是什么?他的参数有那些?急
- 一个按钮的问题
- 在C++中,哪位大侠能说一说".","->","::"的用法区别和注意事项?
我是在一个窗体中放了两个frame,现在想将两个frame以外的地方全部删除。现在我也做成了,不过还有些问题。
Private Sub Form_Resize()
Me.Move Screen.Width - Me.Width, Screen.Height - Me.Height ', Pic.Width + 100, Pic.Height + 300
Label1.Move 150, 150, Frame1.Width - 300, Frame1.Height - 300
Pic.Move 0, 0, Frame2.Width, Frame2.Height
'=================使frame1和frame2成为圆角矩形并使窗体除frame1和frame2外的区域清除======
Dim Dl As Long, i As Integer
Dim MeWidth As Long, MeHeight As Long, MeTop As Long, MeLeft As Long
Dim MyRet(2) As Long, MyCombineRgn(2) As Long
'-------------frame1成为圆角矩形
MeWidth = (Frame1.Width) / Screen.TwipsPerPixelX
MeHeight = (Frame1.Height) / Screen.TwipsPerPixelY
MyRet(0) = CreateRoundRectRgn((Frame1.Left + 40) / Screen.TwipsPerPixelX, (Frame1.Top + 0) / Screen.TwipsPerPixelY, MeWidth + Frame1.Left / Screen.TwipsPerPixelX, MeHeight + (Frame1.Top) / Screen.TwipsPerPixelY, 50, 50)
'-------------frame2成为圆角矩形
MeWidth = (Frame2.Width) / Screen.TwipsPerPixelX
MeHeight = (Frame2.Height) / Screen.TwipsPerPixelY
MyRet(1) = CreateRoundRectRgn((Frame2.Left + 40) / Screen.TwipsPerPixelX, Frame2.Top / Screen.TwipsPerPixelY, MeWidth + Frame2.Left / Screen.TwipsPerPixelX, MeHeight + (Frame2.Top) / Screen.TwipsPerPixelY, 50, 50)'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
((Frame2.Left + 40) / Screen.TwipsPerPixelX一定要"+40"才能使保留的位置正,真想不通。
''''''''''''''''''''''''''''''''''''''''''''''''''''' '-------------使窗体除frame1和frame2外的区域清除
MeWidth = Me.Width / Screen.TwipsPerPixelX
MeHeight = Me.Height / Screen.TwipsPerPixelY
MyRet(2) = CreateRoundRectRgn(0, 0, MeWidth, MeHeight, 50, 50)
For i = 0 To 2
MyCombineRgn(i) = CreateRoundRectRgn(0, 0, MeWidth, MeHeight, 0, 0)
Next i
Call CombineRgn(MyCombineRgn(0), MyRet(2), MyRet(0), 1)
Call CombineRgn(MyCombineRgn(1), MyRet(2), MyRet(1), 1)
Call CombineRgn(MyCombineRgn(2), MyCombineRgn(1), MyCombineRgn(0), 2)
Dl = SetWindowRgn(Me.Hwnd, MyCombineRgn(2), True)
'-----------清除内存中的垃圾
Dim i As Integer
For i = 0 To 2
DeleteObject MyRet(i)
Next i
'=================完毕:使frame1和frame2成为圆角矩形并使窗体除frame1和frame2外的区域清除====
Me.Refresh
End Sub