카테고리 없음2011. 11. 30. 08:51

www.softwaredevelopmentdeveloper.com

옥션 아이폰/아이팟 집에서 즐기기 롯데마트 11번가 주민등록번호 도용사실이 있는지 확인해 보세요! CJmall 회원가입 도메인 NO.1-호스팅 NO.1 든든한 웹파트너 가비아 ! 건담 전문몰 건담샵 No.1 중고차 쇼핑몰! SK엔카

아래출처는 http://ad.web2r.net/r.php?c=shop 입니다.'Save And Load Data From The Registery'Add 2 Command Buttons and 3 Text Boxes to your form.'At run-time, Add text to the Text Boxes. Press the second button to save the'3 strings to the registery. Now delete the text from the Text Boxes and press'the first button to load the strings back from the registery.'Insert the following code to your form :'Change 'My Company' to your company name and 'My Prog' to your program name.Const ThisApp = "My Company"Const ThisKey = "My Prog"'The Strings will be saved under the key: 'HKEY_CURRENT_USER\Software\VB and VBA Program Settings\My Company\My ProgPrivate Sub Command1_Click() Dim Name, Phone, PostCode As String 'If the key is not exist, it will return 'Empty'Name = GetSetting(ThisApp, ThisKey, "Name", "Empty")Phone = GetSetting(ThisApp, ThisKey, "Phone", "Empty")PostCode = GetSetting(ThisApp, ThisKey, "PostCode", "Empty")Text1.Text = (Name) Text2.Text = (Phone) Text3.Text = (PostCode) End Sub Private Sub Command2_Click() Dim Name, Phone, PostCode As String 'Text1 will be saved under HKEY_CURRENT_USER\...\My Prog\NameSaveSetting ThisApp, ThisKey, "Name", Text1.TextSaveSetting ThisApp, ThisKey, "Phone", Text2.TextSaveSetting ThisApp, ThisKey, "PostCode", Text3.TextEnd Sub Private Sub Form_Load() Command1.Caption = "load"Command2.Caption = "save"End Sub

크리에이티브 커먼즈 라이선스

Share |

Posted by 아이맥스