|
-
March 8th, 2003, 10:19 AM
#1
i wonder it is a problem?
static void Main()
{
frmMain fm= new frmMain();
Application.Idle += new System.EventHandler(fm.OnIdle);
Application.Run(mf);
}
public void OnIdle(object sender, EventArgs e)
{
ListInfo.Text = _alPostList.Count.ToString();
}
when i was programming i did like above..
i wonder if i did like above ...is there any overworking on the computer...?
sometimes i used to use this code.. but i might not know what this code means.
Is there really any overworking on computer if i use this code?
-
March 10th, 2003, 04:27 AM
#2
That code doesn't mean anything else then counting of ListBox items in idle time of the appliction... The code is executed whenever the application finish processing and it is going to enter the idle state.
No, it doesn't get much "overworking" of the computer and don't worry to use this chunk of code.
However, I don't know if this is the best solution for displaying number of records in the list... I think, would be enough if you set the label everytime you add or delete record in the list...
Martin
-
March 10th, 2003, 04:53 PM
#3
for displaying data records I would suggest use datagrid on which extensive research has already done ...
paresh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|