Chapter #2 - The Form Code
Letīs make a form that will use the sub we created on Chapter #1, on a module, to save and retrieve data from the profile area of our currently logged-in user.
1st of all, our Form will look like this:
|
And now, letīs see that code:
Private Sub Form_Load() Call Load_Up 'What would we be doing if we donīt call it right from the fresh-start?! Form1.Caption = "Hello " & cur_usr 'Say "Hi" to the user. 'If we are talkin 'profiled-user' weīll see something like: '"Hello Johnny" 'if user is un-profiled, weīll see: '"Hello Unnamed" End Sub Private Sub Command1_Click() 'Save button Open dot_ini For Append As #1 'Open it, which-ever it is! (no path-checks, no nuttin!) Write #1, Text1.Text 'Puke the contents of the textbox on the file. Close #1 'Close the file. End Sub Private Sub Command2_Click() 'Close button a = MsgBox("Are you sure you want to exit?", 36, "Confirm: Exit") If a = vbYes Then End End Sub |
Goodbye: Chapter #3