Learnt things
Two things I learned today ...
1. CRectTracker...
Here we want to track the rectangle by the mouse...
Depends upon the events the rectangle must be increase or decreased in size and
it must allow the user for drag and drop events...
It is used to display OLE dialogs... like MS Excel in a MS word
Make use of it to ur own rectangle drag and drop events...
2. what can I do with Thread exception dialog ?
Like System.Threading.ThreadAbortException that displays the thread was hunged error...
try
{
}
catch(System.Threading.ThreadAbortException e)
{
}
catch(Exception e)
{
MessageBox(e.ToString())
}
3.C# list view control
within SelectedIndex_changed event, we displayed the selected item...
selectedIndex_changed()
{
lstView.SelectedItems[0].Text // Displays an error at some time
}
So before accessing it we have to check the condition like
selectedIndex_changed()
{
if(lstView.SelectedItems.Count > 0)
{
lstView.SelectedItems[0].Text // Displays an error at some time
}
}
This will not gives an error....
SelectedIndex_changed () fn called even when the selected index is deselected...
At that time, this event will be fired.. So we are referring the
Selecteditems[0] which is invalid....
1. CRectTracker...
Here we want to track the rectangle by the mouse...
Depends upon the events the rectangle must be increase or decreased in size and
it must allow the user for drag and drop events...
It is used to display OLE dialogs... like MS Excel in a MS word
Make use of it to ur own rectangle drag and drop events...
2. what can I do with Thread exception dialog ?
Like System.Threading.ThreadAbortException that displays the thread was hunged error...
try
{
}
catch(System.Threading.ThreadAbortException e)
{
}
catch(Exception e)
{
MessageBox(e.ToString())
}
3.C# list view control
within SelectedIndex_changed event, we displayed the selected item...
selectedIndex_changed()
{
lstView.SelectedItems[0].Text // Displays an error at some time
}
So before accessing it we have to check the condition like
selectedIndex_changed()
{
if(lstView.SelectedItems.Count > 0)
{
lstView.SelectedItems[0].Text // Displays an error at some time
}
}
This will not gives an error....
SelectedIndex_changed () fn called even when the selected index is deselected...
At that time, this event will be fired.. So we are referring the
Selecteditems[0] which is invalid....
0 Comments:
Post a Comment
<< Home