Click here to Skip to main content
15,913,186 members
Home / Discussions / C#
   

C#

 
AnswerRe: copy the row in the grid view Pin
RepliCrux21-Jun-07 18:00
RepliCrux21-Jun-07 18:00 
Questionmage button for delete in grid view Pin
tauras8121-Jun-07 17:48
tauras8121-Jun-07 17:48 
QuestionC# What is wrong with this code? Pin
mercenary0121-Jun-07 17:22
mercenary0121-Jun-07 17:22 
AnswerRe: C# What is wrong with this code? Pin
Christian Graus21-Jun-07 17:40
protectorChristian Graus21-Jun-07 17:40 
Questionget contextmenu control Pin
samreengr821-Jun-07 15:32
samreengr821-Jun-07 15:32 
AnswerRe: get contextmenu control Pin
Luc Pattyn21-Jun-07 15:39
sitebuilderLuc Pattyn21-Jun-07 15:39 
GeneralRe: get contextmenu control Pin
samreengr821-Jun-07 17:19
samreengr821-Jun-07 17:19 
GeneralRe: get contextmenu control Pin
Luc Pattyn21-Jun-07 23:38
sitebuilderLuc Pattyn21-Jun-07 23:38 
Hi,

void contextMenu_Popup(object sender, EventArgs e) {
	ContextMenu cm=(ContextMenu)sender;
	Control cs=cm.SourceControl;
	log("contextmenu sender="+cm);
	log("contextmenu SourceControl="+cs);
...

SourceControl returns the CONTROL that is showing the ContextMenu;
you cannot get to its Image property, because a general Control doesnt have one.
You must cast it to a PictureBox if you want to perform PictureBox specific
operations.

PictureBox pb=cs as PictureBox;
if (pb!=null) pb.Image=null;

this would remove the image.

In future, dont post "cant" and "does not work" but provide specific information
such as "Compiler gives the following error: ..." or "Running the app gives
following Exception: ..."

Smile | :)


QuestionDataSet Arrays and Stored Procedures [modified] Pin
MAW3021-Jun-07 14:47
MAW3021-Jun-07 14:47 
AnswerRe: DataSet Arrays and Stored Procedures Pin
RepliCrux21-Jun-07 15:18
RepliCrux21-Jun-07 15:18 
GeneralRe: DataSet Arrays and Stored Procedures Pin
MAW3021-Jun-07 17:13
MAW3021-Jun-07 17:13 
GeneralRe: DataSet Arrays and Stored Procedures Pin
RepliCrux21-Jun-07 17:19
RepliCrux21-Jun-07 17:19 
GeneralRe: DataSet Arrays and Stored Procedures Pin
MAW3021-Jun-07 18:25
MAW3021-Jun-07 18:25 
QuestionImprove RichTextBox performance Pin
Latheesan21-Jun-07 11:14
Latheesan21-Jun-07 11:14 
AnswerRe: Improve RichTextBox performance Pin
Luc Pattyn21-Jun-07 11:27
sitebuilderLuc Pattyn21-Jun-07 11:27 
GeneralRe: Improve RichTextBox performance Pin
Latheesan21-Jun-07 13:19
Latheesan21-Jun-07 13:19 
GeneralRe: Improve RichTextBox performance Pin
Luc Pattyn21-Jun-07 13:45
sitebuilderLuc Pattyn21-Jun-07 13:45 
QuestionFind ASCII value Pin
stone_sks21-Jun-07 7:48
stone_sks21-Jun-07 7:48 
AnswerRe: Find ASCII value Pin
PIEBALDconsult21-Jun-07 7:58
mvePIEBALDconsult21-Jun-07 7:58 
GeneralRe: Find ASCII value Pin
stone_sks21-Jun-07 8:07
stone_sks21-Jun-07 8:07 
GeneralRe: Find ASCII value Pin
PIEBALDconsult21-Jun-07 8:11
mvePIEBALDconsult21-Jun-07 8:11 
GeneralRe: Find ASCII value Pin
stone_sks21-Jun-07 8:23
stone_sks21-Jun-07 8:23 
GeneralRe: Find ASCII value Pin
PIEBALDconsult21-Jun-07 8:42
mvePIEBALDconsult21-Jun-07 8:42 
GeneralRe: Find ASCII value Pin
Luc Pattyn21-Jun-07 9:30
sitebuilderLuc Pattyn21-Jun-07 9:30 
GeneralRe: Find ASCII value Pin
PIEBALDconsult21-Jun-07 10:32
mvePIEBALDconsult21-Jun-07 10:32 

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.