广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 109693 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
zsx123665 手机 会员卡
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x16 鲜花 x95
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[Basic][求助] 求 vb6 高手 (解决!!)

详细专案:


Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Function GetIniS(ByVal inifilename As String, ByVal SectionName As String, ByVal KeyWord As String, Optional ByVal DefString As String) As String
    Dim ResultString As String * 128, Temp%
    Dim s$, i%
    Temp% = GetPrivateProfileString(SectionName, KeyWord, "", ResultString, 144, inifilename)
    If Temp% > 0 Then
        For i = 1 To 128
            If Asc(Mid$(ResultString, i, 1)) <> 0 Then
                s = s & Mid$(ResultString, i, 1)
            End If
        Next
    Else
        Temp% = WritePrivateProfileString(SectionName, KeyWord, DefString, inifilename)
        s = DefString
    End If
    GetIniS = s
End Function


Private Sub Command1_Click()
On Error GoTo wtf
Image1(0).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(1).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(2).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(3).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(4).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(5).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(6).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(7).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Image1(8).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Label1(9).Caption = "N/A"
Label1(10).Caption = "N/A"
Label1(11).Caption = "N/A"
Label1(12).Caption = "N/A"
Label1(14).Caption = "N/A"
Label1(15).Caption = "N/A"
Label1(16).Caption = "N/A"
Label1(17).Caption = "N/A"
Label1(13).Caption = "N/A"
Label3(0).Caption = Label3(0).Caption - 1
Timer1.Enabled = True
Image1(Index).Picture = LoadPicture(App.Path & "\Data\Background\Maps\kengdie.bmp")
Label1(Index).Caption = ""
Dim i As Integer
Label2.Caption = (Label3(0).Caption - 1) * 9
For x = 0 To 8
 Label1(i).Caption = Trim(GetIniS(App.Path & "\Data\Setting\Maps.LS", "maps", Label2.Caption))
 Label1(i + 9).Caption = Trim(GetIniS(App.Path & "\Data\Setting\Maps.ini", "name", Label1(i).Caption))
 If Len(Dir(App.Path & "\Data\Background\Maps\" + Label1(i ..

访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容



[ 此文章被zsx123665在2012-07-05 16:12重新编辑 ]




献花 x0 回到顶端 [楼 主] From:台湾亚太线上服务股份有限公司 | Posted:2012-07-02 22:10 |
ebolaman 手机 会员卡
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖

级别: 副版主 该用户目前不上站
版区: 程式设计
推文 x38 鲜花 x458
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

表单的 Object 名称要用 专案浏览器 表单左边的名称

Frist (Main.frm)

Frist 是 Object 名称,Main.frm 是档案名称



因此将名称改一下


Private Sub Image1_Click(Index As Integer)
Frist.Image1.Picture = Image1(Index).Picture
Frist.fk.Caption = Label1(Index).Caption
Dim y As Integer
y = Image1(Index).Tag + (Label3(0).Caption - 1) * 9
Dim z As String
z = y
x = WritePrivateProfileString("map", "lastchoice", z, App.Path & "\Data\Setting\Save.ini")
Unload Me
End Sub


My BOINC stats :

献花 x1 回到顶端 [1 楼] From:台湾教育部 | Posted:2012-07-03 22:44 |
zsx123665 手机 会员卡
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x16 鲜花 x95
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 ebolaman 于 2012-07-03 22:44 发表的 : 到引言文
表单的 Object 名称要用 专案浏览器 表单左边的名称
Frist (Main.frm)
Frist 是 Object 名称,Main.frm 是档案名称

因此将名称改一下
.......

你实在太强了 QAQ
原来是名称搞错 然怪一直找不到原因 Thx U (^_^) 


献花 x0 回到顶端 [2 楼] From:台湾亚太线上服务股份有限公司 | Posted:2012-07-04 12:50 |
ebolaman 手机 会员卡
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖

级别: 副版主 该用户目前不上站
版区: 程式设计
推文 x38 鲜花 x458
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 zsx123665 于 2012-07-04 12:50 发表的 : 到引言文


你实在太强了 QAQ
原来是名称搞错 然怪一直找不到原因 Thx U (^_^) 


不客气~


My BOINC stats :

献花 x0 回到顶端 [3 楼] From:台湾教育部 | Posted:2012-07-04 18:52 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.015431 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言