vb 如何設定讀取密碼在ini文字中

2021-12-28 10:28:53 字數 1235 閱讀 7679

1樓:匿名使用者

應該這下面合適你的要求了。

private sub command1_click()

if dir("f:\password.ini") <> "" then

open "f:\password.ini" for input as 1

line input #1, mima

close #1

if text1.text = mima then

form2.show

unload me

else

msgbox "密碼輸入錯誤", vbcritical, "提示"

text1.setfocus

end if

else

if text1.text = "123456" then

form2.show

unload me

else

msgbox "初始密碼輸入錯誤", vbcritical, "提示"

text1.setfocus

end if

end sub

private sub form_load()

command1.default = true

if dir("f:\password.ini") = "" then

msgbox "請輸入初始密碼", vbokonly, "提示"

text1.setfocus

endif

end sub

2樓:傻傻的瘋豬

private sub command1_click()dim pw as string

if dir("f:\password.ini")="" thenpw="123456" '判斷f:\password.ini是否存在,不存在密碼就是123456

else

open "f:\password.ini" for input as #1

line input #1,pw

close #1

end if

if text1.text =pw thenform2.show

unload me

else

msgbox "密碼輸入錯誤", vbcritical, "提示"

text1.text = ""

end if

end sub

'password.ini這個內容不能為空。'

VB如何連續讀取串列埠資料,vb怎樣讀取串列埠資料並進行處理?

vb6.0mscomm控制元件可以利用oncomm事件連續獲取來自外設傳送的訊號。基於 1 mscomm控制元件的rthreshold 屬性不為0和恰當的接收 2 使用電腦主機板物理com口或pci多串列埠卡上的com口com,這樣的com口是全雙工的,傳送與接收不會衝突。3 高質量的接收 和符合通...

wlan如何設定密碼,如何在相簿設定密碼?

以河南移動客戶為例,wlan業務支援動態密碼和靜態密碼,兩種業務的密碼相互獨立。動態密碼只適用於在webportal認證頁面,有效期短,具有較好的安全性。動態密碼由客戶在每次登陸時申請獲得 靜態密碼由客戶在開通wlan業務時獲得,客戶每次登陸時均可使用同一密碼。1 動態密碼獲取方式 客戶只要點選 申...

如何設定手勢密碼,怎麼設定手勢密碼

首先在手機的應用程式中找到 設定 圖示,設定這個手勢密碼是需要進入到 設定 中進行設定的。找到 設定 以後,點選開啟該項。進入到 設定 專案以後,在該項中,有很多的設定項。往下找,找到 鎖定螢幕與安全 並且點選開啟。注意一下,因為手機的不同,可能這裡名稱會有稍微的出入,如果你的跟 上的不同,可以嘗試...