Sub Form_Load () setupflag = False setup_rtn greeting.windowstate = 1 End Sub Sub Form_Paint () If windowstate = 0 Then centerwnd greeting End If End Sub Sub mailchk_tim_Timer () If Not setupflag Then Exit Sub End If On Error GoTo nomail Open maildir + username For Input As #1 Close #1 If Not viewmsg Then viewform.windowstate = 1 viewform.Show ' viewform.SetFocus End If Exit Sub nomail: ' The user has no mail so we get here this code is ' done most of the time. ' If Err <> 53 Then MsgBox "OGMAIL - unexpected error " + Str$(Err) End If Resume getout getout: End Sub Sub sendcmd_Click () greeting.windowstate = 1 ogsend.Show ogsend.windowstate = 0 End Sub