源码:这个美女怎么不出来啊?还害羞
在菜单里有七个美女可以更换,但是我在菜单里多加一个人物选择时(测试人物)为什么切换的时候会出现“标号为108的资源文件没有找到” 但是我已经在资源文件里添加了108号资源?源码地址: 美女源码 http://bbs.SetHexKey HKEY_CURRENT_USER, "Software\EnderSoft\DesktopKafra\", "Current Kafra", Kafra
'for now, skip any images we don't have yet
On Error GoTo errNewForm
picAni(0).Picture = ImageList2.ListImages("kafra" & Kafra + 1).Picture
picAni(1).Picture = ImageList2.ListImages("kafra" & Kafra + 1 & "a").Picture
picAni(2).Picture = ImageList2.ListImages("kafra" & Kafra + 1 & "b").Picture
picAni(3).Picture = ImageList2.ListImages("kafra" & Kafra + 1 & "c").Picture
Timer1.Enabled = True
GoTo noErr
errNewForm:
Timer1.Enabled = False
noErr:
On Error GoTo 0
Dim i As Integer
For i = 0 To mnuForm.mnuKafraSwitch.UBound
mnuForm.mnuKafraSwitch(i).Checked = False
Next
mnuForm.mnuKafraSwitch(Kafra).Checked = True
frmMain.Hide
SetLayered Me.hWnd, False
KafraName = LoadResString(Kafra + 101)‘这里报错 标号为108资源未找到
Dim tempstr As String
tempstr = LoadResString(Kafra + 111)
With myKafraAniData
.W = Split(tempstr, ",")(0)
.H = Split(tempstr, ",")(1)
.X = Split(tempstr, ",")(2)
.Y = Split(tempstr, ",")(3)
End With
frmMain.Picture = LoadResPicture(Kafra + 111, 0)
myDIB.CreateFromPicture frmMain.Picture
Me.Height = myDIB.Height * Screen.TwipsPerPixelY
Me.Width = myDIB.Width * Screen.TwipsPerPixelX
myRGN.LoadFromResource Kafra + 101
myRGN.Applied(Me.hWnd) = True
SetLayered Me.hWnd, True
SetWindowEffects Me.hWnd, , 255
frmMain.Show
Me.Top = Screen.Height - Me.Height - TaskBarHeight
'If Me.Left > Screen.Width - Me.Width Then Me.Left = Screen.Width - Me.Width
frmMain.Refresh
End Sub
[ 本帖最后由 aaaa7117 于 2011-9-25 11:19 编辑 ]