|
-
Jul 25th, 2001, 09:43 PM
#1
Thread Starter
New Member
HELLLLP!!! This is driving me nuts!
I wrote a simple app to perodically check my outlook email. When it starts the check (after a certain time interval), I pop-up a second, smaller form with it's show method. This second form simply shows the application's progress (with a progress bar) and an out-of-control text box showing the current MailItem's subject text that is being checked. My problem is with the form showing up. The Progress bar and Textbox show up, but the form is hidden. It actually looks transparent. When the check is complete, the form disappears when it's hide method is executed (like it should). Everything seems to be working, except for the fact that the form is transparent. I have checked all of the properties to make sure I wasn't setting the background to transparent or something stupid like that. Could anyone give me any ideas on what I could be doing wrong. I have this feeling that the problem is something really simple and will really piss me off when I figure it out.
Thanks in advance for any help!
Ken Fitz
-
Jul 25th, 2001, 09:50 PM
#2
Are you putting the progress bar and other's code in the Form_Load event? If so, try using the Activate event instead
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 25th, 2001, 11:07 PM
#3
Thread Starter
New Member
Thanks a lot for the reply. I finally figured out that I needed to call
the form's refresh method to display it.
I took out the frmProgress.Show and replaced with the frmProgress.Visible = True and added 'Load frmProgress' in the the main form's load event. This didn't do anything to help me, but I like this method more than calling the form's show method.
To get the Progress Bar form, frmProgress, to display correctly, I added frmProgress.Refresh to the For Each loop.
Here's the code, called from a sub named CheckMail in the main form code module. The main form is called frmEMailBot.
Private Sub CheckMail()
.
.
.
progressValue = 0
frmProgress.txtCheckingSubject.Text = ""
frmProgress.mailProgress.Min = 0
frmProgress.mailProgress.Max = cFolder.Items.Count
frmProgress.mailProgress.Value = progressValue
frmProgress.Visible = True
For Each olMailItem In cFolder.Items
frmProgress.Refresh
frmProgress.txtCheckingSubject.Text = olMailItem.Subject
progressValue = progressValue + 1
frmProgress.mailProgress.Value = progressValue
If olMailItem.Subject = txtSubject Then
txtVBScript = olMailItem.Body
End If
Next olMailItem
frmProgress.Visible = False
End Sub
This works well. I guess without the frmProgress.Refresh, the main form is eating up frmProgress, but not it's controls, making the form look transparent.
I hate these kind of errors, but they sure are learning experiences!
Thanks for the help!
Ken Fitz
-
Jul 26th, 2001, 02:00 AM
#4
Lively Member
try this
i had the same problem with a form and i added
me.show
me.refresh <-- both in the form_load event
and i added me.refresh for every time the progressbar did something
hope this helps
God and VB act in mysterious ways 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|