CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2491|Reply: 9

VB6 expert...ur help needed

[Copy link]
Post time 13-3-2007 05:51 PM | Show all posts |Read mode
camne eh nk buat progress bar yg loading ikut progress procedure yg kite run?
saye execute procs (oracle) from front end thru a button click, then nk suruh
progress bar tu tunjuk progress execution tu. sbb kalau p.bar tu x gerak, nnt
user ingat hang plak.

ada idea tak?
Reply

Use magic Report


ADVERTISEMENT


Post time 17-3-2007 08:42 AM | Show all posts
ambik progress bar component.then buat function utk p.bar ni...then dekat command button tu...call lah function p bar nih...
selamat mencuba



Function ProgressBar()

    Dim Counter As Integer
    Dim Workarea(7500) As String
    ProgressBar1.Min = LBound(Workarea)
    ProgressBar1.Max = UBound(Workarea)
    ProgressBar1.Visible = True

'Set the Progress's Value to Min.
    ProgressBar1.Value = ProgressBar1.Min

'Loop through the array.
    For Counter = LBound(Workarea) To UBound(Workarea)
        'Set initial values for each item in the array.
        Workarea(Counter) = "Initial value" & Counter
        ProgressBar1.Value = Counter

Next Counter
    ProgressBar1.Visible = False
    ProgressBar1.Value = ProgressBar1.Min


End Function

Rate

1

View Rating Log

Reply

Use magic Report

 Author| Post time 19-3-2007 05:40 PM | Show all posts
makasih hasmal sbb sudi reply..
o...pakai array eh? camne nk relatekan dgn procedure saye tu yek?
Reply

Use magic Report

Post time 20-3-2007 10:44 AM | Show all posts

Reply #3 chiaki's post

maksud awak nak relatekan progress bar dengan procedure ..
-> bila panggil stored procedure progress bar itu akan tunjukkan sesuatu sedang berlaku dalam procedure itu ke?
-> untuk tunjukkan semua progress from clicking the button sampai dia finished?

kalau untuk tunjukan stored procedure sahaja rasanya macam tak boleh je pasal bile kite panggil stored procedure
program kita akan sangkut kat bahagian panggilan itu dan tunggu sehingga stored procedure itu habis
iaitu bila control dapat semula kepada app kita.
Jadi kalau ader progress bar pun nanti dia tetap tidak akan berjalan sehinggalah stored procedure itu habis...

mungkin boleh kalau pakai timer...
Reply

Use magic Report

 Author| Post time 20-3-2007 12:39 PM | Show all posts
ye betul tu stingbeh...itu la masalahnye.
sbb stored procedure yg nk diexecute tu mmg takes time.
so kalau kite x tunjuk ape2 kt front end,contohnye mcm progress bar tu,
nnt user ingat apps kite hanged. padahal dia tgh process kt db.
ape yek cara lain yg leh mengconvincekan user bahawasanya apps tu
tak hanged sebenonye.
Reply

Use magic Report

Post time 20-3-2007 03:14 PM | Show all posts

Reply #5 chiaki's post

There's one way...
Create one table in sql utk store status/proress..
Masa tgh execute stored procedure tu....for each progress...masukkan the status/progress dlm table tu ...example:
1 - Sedang diproses bhg 1...
2 - Sedang diproses bhg 2...

So, dlm VB code tu...just pull out the status/progress dm sql table tu.. so the user tau stored procedure tu tgh buat apa sekarang...
Reply

Use magic Report

Follow Us
Post time 20-3-2007 05:21 PM | Show all posts
pakai timer
timer ini akan enable sebelum panggil stored procedure
timer nie pulak keje dia adalah mengupdatekan progress bar..
bile progress bar penuh dia akan reset balik dan buat balik progress tue..
so bile stored procedure dah selesaikan keje dia
dan control dapat balik kat application then terus jer la offfkan timer tue.

cara lain letak doevents
doevents akan memberi control kepada processor dan dia akan buat keje2 yg lain dalam
sementara tunggu stored procedure habis. kalau letak sebelum panggil stored procedure tak jadi
cube letak buat timer dan letak dalam timer. walaupun application nie tgh processing still masih lagi
boleh tarik2 dia, move2 dia,

cara lain seperti yg dicadangkan choroque, letak msg dalam satu table
then pakai timer untuk baca msg dalam table tue
Reply

Use magic Report

Post time 9-4-2007 06:33 PM | Show all posts
process tu utk save/retrieve data ke?
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 10-4-2007 01:35 PM | Show all posts
procedure tu ada insert, update, select....delete pun ada gak. pastu ada gak yg nested procs.
Reply

Use magic Report

Post time 14-4-2007 11:17 AM | Show all posts
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

31-12-2024 04:59 AM GMT+8 , Processed in 0.055106 second(s), 28 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list