Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSCHART

Status
Not open for further replies.

selimsl

Programmer
Aug 15, 2005
62
TR
Hi!

I have a problem with mschart.I didn't know whether there is a solution about this problem.

Code:
For i = 1 To 30
        MSChart1.Column = 1
        MSChart1.Row = i
        MSChart1.Data = fifo(i)
Next i

Yes,it works,but when new values are transfered to data property of mschart,mschart control flashs.
Can we prevent this?
 
Only way I know is to use an API call to lock the hWnd of the chart until it's done populating data.

Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long

r = LockwindowUpdate(MSChart.hWnd)
<code to fill chart>
r = LockWindowUpdate(0)


 
Thanks for your reply

Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

I write this code,but when I compile my project
a compile error appears
Where should I write this code


 
You normally put them in a separate code module (Project|Add Module) which is saved as a .bas file

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Whether it's in a module or in the form itself, it goes in the declaration area, same place you put your constants, globals, etc.
Sorry, didn't make that clear in my little code example.
 
Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long

r = LockwindowUpdate(MSChart.hWnd)
<code to fill chart>
r = LockWindowUpdate(0)

Unfortunately ,mschart control still flashs .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top