2013-12-16 2 views
0

저는 Windows 양식 응용 프로그램을 만들고 사용자 데이터가 레코드에 저장되도록 가입 프로세스를 만들었습니다. 나는 또한 로그인 할 때 내 기록을 검색하여 입력 된 전자 메일을 검색하고 암호가 일치하는지 확인합니다. 이제 다음 페이지의 '서명 된 페이지'에서 해당 레코드의 다른 정보를 페이지의 목록 상자에 표시하려고합니다. 어떤 아이디어?로그인 정보를 한 양식에서 다른 양식으로 어떻게 사용합니까?

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSignIn.Click 
    Dim RecordNumber As Integer 
    Dim Found As Boolean 
    Dim foundpword As Boolean 
    Dim UserEmail As String 
    Dim userPword As String 
    Dim OneAccount As fmSignUp.SignUpInfo 
    Dim stripeditem As String 
    Dim strippword As String 
    Dim CurrentUser As String 

    UserEmail = tbEmailSignIn.Text 
    userPword = tbPasswordSignIn.Text 
    Found = False 


    FileOpen(1, filename, OpenMode.Random, , , Len(OneAccount)) 
    Do While (Not EOF(1)) And (Found = False) 


     RecordNumber = RecordNumber + 1 
     FileGet(1, OneAccount, RecordNumber) 
     stripeditem = OneAccount.ContactEmail.Replace(" ", "") 
     strippword = OneAccount.Password.Replace(" ", "") 




     If stripeditem = UserEmail Then 
      Found = True 

     End If 
     If strippword = userPword Then 
      foundpword = True 
     End If 




    Loop 
    FileClose(1) 

여기서 내가 레코드를 선언합니다.

Dim OneAccount As fmSignUp.SignUpInfo 
    filename = "AccountDetails.dat" 
    FileOpen(1, filename, OpenMode.Random, , , Len(OneAccount)) 
    NumberOfRecords = LOF(1)/Len(OneAccount) 
    FileClose(1) 

답변

0

간단한이 상자에 변수 또는 하나의 양식에서 요구하는 모든 정보가 들어 문자열의 목록을 반환 현재 양식 에 공개 방법, 는 다른 형태의 u는 수행 할 수 있습니다

Dim frm As Form1 = new Form1() 
Dim tmp as string; 
tmp = frm.ThatMethod() 

다음을 참조하십시오. Using Variables Across Forms - VB

관련 문제