手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Asp.Net编程>列表

DX: Full Screen GUI Development 2

来源:互联网 作者:西部数码 时间:2008-04-10
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

iY = iParentY 7

iObjectState = iEnabled

Case CloseBtn

iHeight = ddsd.lHeight / 2

iX = iParentWidth iParentX - iWidth - 6

iY = iParentY 7

iObjectState = iEnabled

Case RestoreBtn

iHeight = ddsd.lHeight / 2

iX = iParentWidth iParentX - iWidth - 24

iY = iParentY 7

iObjectState = iEnabled

The DrawObject function is also modified to handle drawing the new controls:

Case MinBtn, MaxBtn, CloseBtn, RestoreBtn

rectObject.Left = 0

rectObject.Right = iWidth

Select Case iObjectState

Case iEnabled

rectObject.Top = 0

rectObject.Bottom = iHeight

Case iPressed

rectObject.Top = iHeight

rectObject.Bottom = iHeight * 2

End Select

If you run the app, you抣l see the new buttons in the upper right hand corner of the window. You抣l also notice that we抳e added a caption for the window. This is held by the sCaption member of the clsWindow class. If you look at the declarations section for the class you抣l also see two other new members:

Private iCaptionX As Integer

Private iCaptionY As Integer

These will be used to draw the caption where it is needed for the specific control type. If you look at the DrawObject function in the class you抣l see we抳e added the code necessary to handle the caption:

Case BaseWindow

''''Nothing needed here since we use the base rectangle

If Len(sCaption) > 0 Then

iCaptionX = iX 10

iCaptionY = iY 5

bDrawCaption = True

Else

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!