Re: Strange problem
From: Larry Serflaten (serflaten_at_usinternet.com)
Date: 07/28/04
- Next message: Tony Proctor: "Re: How to store a number that is "n/a"?"
- Previous message: Tong+: "Re: Why Format$ function on VB6 does not work with the same format"
- In reply to: stoitchko: "Re: Strange problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 04:23:27 -0500
"stoitchko" <stoitchko@discussions.microsoft.com> wrote
> yes, here is the problem
> even more when i mark this part of the code as comment no error msgs at all
> at vcpp i would use another thread for this but here ...??
The only thing I saw that might be questionable was your use of a VB Keyword:
m_prb.Val = fileIndex ' Val is a Keyword
m_prb.lbMsg = "fkjhdfjfdhj"
m_prb.SetFocus
m_prb.Refresh
Those things are being done together, so what you might try is to combine
them into a single call, passing in the parameters you need for display:
' In m_prb form
Public Sub Update(ByVal Value as Long, ByRef Msg As String)
If Me.Visible then
lblMsg.Caption = Msg
lblMsg.Refresh
prgBar.Value = Value
prgBar.Refresh
End If
End Sub
You could then make a single call to do the update:
m_prb.Update FileIndex, "Whatever..."
Then to insure you are not trying to call on a form that isn't there you
could add a test to be sure it exists:
If Not m_prb Is Nothing Then
m_prb.Update FileIndex, "Whatever..."
End If
Basically you have to defend yourself against anything that could go wrong.
LFS
- Next message: Tony Proctor: "Re: How to store a number that is "n/a"?"
- Previous message: Tong+: "Re: Why Format$ function on VB6 does not work with the same format"
- In reply to: stoitchko: "Re: Strange problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|