Click here to Skip to main content
15,918,706 members
Home / Discussions / C#
   

C#

 
Questionwhat @ mean in sql statement? Pin
ShiroAmada12327-Feb-06 0:17
ShiroAmada12327-Feb-06 0:17 
AnswerRe: what @ mean in sql statement? Pin
autekre27-Feb-06 0:25
autekre27-Feb-06 0:25 
GeneralRe: what @ mean in sql statement? Pin
ShiroAmada12327-Feb-06 1:14
ShiroAmada12327-Feb-06 1:14 
QuestionListview Painting Issues Pin
Prater27-Feb-06 0:13
Prater27-Feb-06 0:13 
QuestionForm on a certian location.. Pin
Dave McCool27-Feb-06 0:03
Dave McCool27-Feb-06 0:03 
AnswerRe: Form on a certian location.. Pin
JacquesDP27-Feb-06 1:33
JacquesDP27-Feb-06 1:33 
AnswerRe: Form on a certian location.. Pin
darkelv27-Feb-06 1:54
darkelv27-Feb-06 1:54 
QuestionCompiled Images to Video Pin
superPaul10126-Feb-06 23:47
superPaul10126-Feb-06 23:47 
AnswerRe: Compiled Images to Video Pin
Corinna John27-Feb-06 2:54
Corinna John27-Feb-06 2:54 
GeneralRe: Compiled Images to Video Pin
superPaul10127-Feb-06 3:02
superPaul10127-Feb-06 3:02 
GeneralRe: Compiled Images to Video Pin
Corinna John27-Feb-06 3:27
Corinna John27-Feb-06 3:27 
GeneralRe: Compiled Images to Video Pin
superPaul10127-Feb-06 6:17
superPaul10127-Feb-06 6:17 
Questionhow to set windows system time with C# Pin
dexom26-Feb-06 23:08
dexom26-Feb-06 23:08 
AnswerRe: how to set windows system time with C# Pin
mav.northwind26-Feb-06 23:58
mav.northwind26-Feb-06 23:58 
QuestionDyanamic size of Array Pin
cshivaprasad26-Feb-06 22:52
cshivaprasad26-Feb-06 22:52 
AnswerRe: Dyanamic size of Array Pin
Corinna John26-Feb-06 22:59
Corinna John26-Feb-06 22:59 
AnswerRe: Dyanamic size of Array Pin
Guffa26-Feb-06 23:23
Guffa26-Feb-06 23:23 
QuestionMenus overloads CPU Pin
magja26-Feb-06 22:39
magja26-Feb-06 22:39 
QuestionListview Not Disabling Properly Pin
redfish3426-Feb-06 22:15
redfish3426-Feb-06 22:15 
AnswerFound Simple Solution Pin
redfish3426-Feb-06 23:10
redfish3426-Feb-06 23:10 
Since this listview is not anticipated to hold more than a few dozen items, i simply made a function that took each item icon, converted it to disable, and then put it back. Performance is very satisfactory. Below is my code. Since i had another routine that gets the icons, i did not code the conversion of disabled ==> enabled. For the in-place image converting i used code gotten from a code project article.

private void WinListEnabled(bool enabled)
{
// winlist listview
// normal disable does not color background properly
// and images maintain full color and do not gray;
// so workaround must be used;

if (enabled == true)
{
this.lvwWindowList.Enabled = true;
this.lvwWindowList.BackColor = SystemColors.Window;
this.lvwWindowList.ForeColor = SystemColors.WindowText;
LoadWinList();
}
else
{
this.lvwWindowList.Enabled = false;
this.lvwWindowList.BackColor = SystemColors.ControlLight;
this.lvwWindowList.ForeColor = SystemColors.GrayText;

for (int i = 0; i < this.lvwWindowList.Items.Count; i++)
{
// get item icon
ListViewItem listItem = this.lvwWindowList.Items[i];
Image itemIcon = this.imlWinIcons.Images[listItem.ImageIndex];

// create disabled image
Bitmap active = new Bitmap(itemIcon);
Bitmap disable = new Bitmap(active.Width, active.Height);
Graphics g = Graphics.FromImage(disable);
g.DrawImage(active, 0, 0);
ControlPaint.DrawImageDisabled(g, active, 0, 0, Color.Empty);
g.Dispose();

// replace listview image
this.imlWinIcons.Images[listItem.ImageIndex] = disable;
}
}
}
QuestionOpen File Dialog Pin
Dave McCool26-Feb-06 22:06
Dave McCool26-Feb-06 22:06 
AnswerRe: Open File Dialog Pin
J4amieC26-Feb-06 22:31
J4amieC26-Feb-06 22:31 
AnswerRe: Open File Dialog Pin
mav.northwind27-Feb-06 7:58
mav.northwind27-Feb-06 7:58 
QuestionCompute DataTable Columns Pin
myNameIsRon26-Feb-06 21:50
myNameIsRon26-Feb-06 21:50 
Questiondatarow edit Pin
fmardani26-Feb-06 20:57
fmardani26-Feb-06 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.