Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Status Bar And Timer

Status Bar And Timer

Status Bar And Timer

  I am using VB and MTS with Oracle. Some time in my application I used to run a complex queries. At that time I wold like to display a status bar with a message. But Timer doesn't work. Once I call MTS component from my code, control comes back after the excection is completed. I put Timer in my form. It doesn't work. Control never goes to timer while MTS component is getting excecuted.
   If anybody knows a way,Please respond.


RE: Status Bar And Timer

Dear Renga
there could be several solution to you problem but what i do is to make disconnected recordset during intiiliaze event of form so user wont be able to catch there is some processing going on behind,user can wait for time before he actullay sees records at form,now if u want to refresh the recordset say at some command button click then there could be solution go for "DATABASE RECORDSET PAGING" technique if ur recordset retuning very huge amount of data,in this way you can ask for a page of time to be viewed at a time..
i am posting a code snippets but you have to use "PAGING" at DATABSE level using "Storder Procedure" or whih method u r using then  this code it will work for you...
Senior Software Engineer
   Screen.MousePointer = vbHourglass
    prgCuttingMain.Min = 0
    prgCuttingMain.Max = 220
    prgCuttingMain.Visible = True
    intStatusBar = 10
    prgCuttingMain.Value = intStatusBar
    intStatusBar = 20
    prgCuttingMain.Value = intStatusBar
    Set mobjRsCuttingItems = mobjCutting.GetCuttingItems 'call to MTS
    If Not mobjRsCuttingItems.EOF Then
        For intI = 0 To mobjRsCuttingItems.RecordCount - 1
            mobjRsCuttingItems.Fields(STR_FLD_CUT_ITEMCOUNT) = intI + 1
            If intStatusBar < 200 Then
                intStatusBar = intStatusBar + 5 * intI
            End If
            prgCuttingMain.Value = intStatusBar
        Next intI
    End If
    Set grdCutting.DataSource = mobjRsCuttingItems
    frmCuttingDetails.CuttingDetailRecordSet = mobjRsCuttingItems
    intStatusBar = intStatusBar + 5
    prgCuttingMain.Value = intStatusBar
    intStatusBar = intStatusBar + 5
    prgCuttingMain.Value = intStatusBar
    Call SetCuttingGrid
    intStatusBar = intStatusBar + 5
    prgCuttingMain.Value = intStatusBar
    Screen.MousePointer = vbDefault
    prgCuttingMain.Value = 220
    prgCuttingMain.Visible = False

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close