Hi Jay,
If you are just creating a temporary worksheet that you delete later, you can just create it hidden and so it does not have to be shown/drawn....
Otherwise you could issue a small delay between creating and before computing so the page gets drawn and the computation then starts, such as in this example:
Easwar
OriginLab
void test_painting(int iloop=50000)
{
// Make a new page and point to worksheet
WorksheetPage wpg;
wpg.Create("Origin");
Worksheet wks = wpg.Layers(0);
// Issue small delay so worksheet gets drawn
LT_execute("sec -p 0.1;");
// Proceed with time consuming stuff
for(int i = 0; i < iloop; i++)
{
Dataset ds(wks,0);
ds.Data(1,10,0.1)
}
}
Edited by - easwar on 05/25/2006 3:30:54 PM