廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 109671 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.019789 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言