Click here to Skip to main content
15,890,043 members
Home / Discussions / C#
   

C#

 
QuestionExcel interop issue Pin
manustone10-Sep-09 21:33
manustone10-Sep-09 21:33 
QuestionCurrent directory problem in MDI container form Pin
mutpan10-Sep-09 20:58
mutpan10-Sep-09 20:58 
AnswerRe: Current directory problem in MDI container form Pin
Christian Graus10-Sep-09 21:03
protectorChristian Graus10-Sep-09 21:03 
GeneralRe: Current directory problem in MDI container form Pin
Lyon Sun11-Sep-09 1:55
Lyon Sun11-Sep-09 1:55 
AnswerRe: Current directory problem in MDI container form [modified] Pin
April Fans21-Sep-09 17:06
April Fans21-Sep-09 17:06 
Questionaccess font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu10-Sep-09 20:52
santosh_anu10-Sep-09 20:52 
AnswerRe: access font colour paterns in ToolStripCombo box Along with name Pin
Henry Minute11-Sep-09 0:05
Henry Minute11-Sep-09 0:05 
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu11-Sep-09 7:09
santosh_anu11-Sep-09 7:09 
hello
if i am using simple combo box on the form the Draw item event appear and i use code on this event is

private void cmbboxClr_DrawItem(object sender, DrawItemEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rect = e.Bounds;
if (e.Index >= 0)
{
string n = ((ComboBox)sender).Items[e.Index].ToString();
Font f = new Font("Arial", 9, FontStyle.Regular);
Color c = Color.FromName(n);
Brush b = new SolidBrush(c);
g.DrawString(n, f, Brushes.Black, rect.X, rect.Top);
g.FillRectangle(b, rect.X + 110, rect.Y + 5, rect.Width - 10, rect.Height - 10);
}
}
-----------------------------
and at form load event i use code

Type colorType = typeof(System.Drawing.Color);
PropertyInfo[] propInfoList = colorType.GetProperties(BindingFlags.Static | BindingFlags.DeclaredOnly | BindingFlags.Public);
foreach (PropertyInfo c in propInfoList)
{
this.cmbboxClr.Items.Add(c.Name);
}

-------------------------------
and at select index change i use the code
private void cmbboxClr_SelectedIndexChanged(object sender, EventArgs e)
{
string color = this.cmbboxClr.SelectedItem.ToString();
this.panel1.BackColor = Color.FromName(color);
}

this will do but when i use toolstripcombo i'm not getting event Draw Item how can i achive the same thing using toolstripcombo my main problem is to access system colour patern along with name to change font or background colour
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
Henry Minute11-Sep-09 9:09
Henry Minute11-Sep-09 9:09 
AnswerRe: access font colour paterns in ToolStripCombo box Along with name Pin
April Fans21-Sep-09 17:15
April Fans21-Sep-09 17:15 
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu21-Sep-09 21:12
santosh_anu21-Sep-09 21:12 
QuestionHow to execute SSIS package from windows service Pin
Rajesh Koriya10-Sep-09 19:51
Rajesh Koriya10-Sep-09 19:51 
AnswerRe: How to execute SSIS package from windows service Pin
Kuthuparakkal21-Aug-12 17:44
Kuthuparakkal21-Aug-12 17:44 
QuestionAccessing bytes in a video as it is playing in windows media player Pin
FoxholeNorman10-Sep-09 17:28
FoxholeNorman10-Sep-09 17:28 
AnswerRe: Accessing bytes in a video as it is playing in windows media player Pin
Christian Graus10-Sep-09 17:52
protectorChristian Graus10-Sep-09 17:52 
GeneralRe: Accessing bytes in a video as it is playing in windows media player Pin
FoxholeNorman11-Sep-09 2:38
FoxholeNorman11-Sep-09 2:38 
QuestionLighten area of a image Pin
hardsoft10-Sep-09 11:35
hardsoft10-Sep-09 11:35 
AnswerRe: Lighten area of a image Pin
Christian Graus10-Sep-09 11:40
protectorChristian Graus10-Sep-09 11:40 
AnswerRe: Lighten area of a image Pin
carlecomm23-Sep-09 15:01
carlecomm23-Sep-09 15:01 
QuestionBinding a toolstrip sub menu combo box Pin
baranils10-Sep-09 10:31
baranils10-Sep-09 10:31 
AnswerRe: Binding a toolstrip sub menu combo box Pin
carlecomm23-Sep-09 2:32
carlecomm23-Sep-09 2:32 
GeneralRe: Binding a toolstrip sub menu combo box Pin
baranils23-Sep-09 2:39
baranils23-Sep-09 2:39 
Questionread the XML file from SkyDrive Pin
Jassim Rahma10-Sep-09 10:29
Jassim Rahma10-Sep-09 10:29 
AnswerRe: read the XML file from SkyDrive Pin
Tony Richards10-Sep-09 11:30
Tony Richards10-Sep-09 11:30 
AnswerRe: read the XML file from SkyDrive Pin
PIEBALDconsult10-Sep-09 12:59
mvePIEBALDconsult10-Sep-09 12:59 

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.