April 22nd, 2012, 10:13 AM
Yes 'photofile is a string variable which is declared as a global variable at the start just inside the Class declaration eg:-
string photofile;
April 21st, 2012, 10:14 AM
Hi Shay640 - I have just been playing around with a PictureBox on a Form so perhaps this may help you :-
I used a ComboBox to hold the names of the pictures which I may wish to display but this...
April 20th, 2012, 09:51 AM
I have a Form with a Panel which just fits on which I use to draw graphics. How can this panel be made to resize when one resizes the Form.?
April 10th, 2012, 05:04 AM
Hi Talkag & PeterB - I have managed to solve the casting of sender to MenuItem and the switch now works. I did it as shown here :-
String nam = ((ToolStripMenuItem)sender).Text;
...
April 10th, 2012, 04:11 AM
Talkag - What you have suggested will not work , as soon as I type in 'switch ( sender)' the word sender is underlined in red signalling an error.
PeterB - What you say in your last two lines is...
April 9th, 2012, 04:08 PM
Pentagon and Hexagon are the names of the menu items clicked on.
April 9th, 2012, 09:19 AM
Is there any way in which an attribute of 'sender' in an event can be used in a 'switch' header'.
I find that I can use 'sender' like this :- if (sender == Pentagon) OK but if I try to use...
March 15th, 2012, 07:38 AM
Many Thanks 'Foamy'I have just made the change you suggest and that works fine now.
March 15th, 2012, 06:54 AM
Thanks for reply foamy. Here is the piece of code where I want to obtain the X and Y values of the point clicked but the compile will no allow e.X and e.Y. :-
private void panel1_Click(object...
March 15th, 2012, 06:42 AM
I am trying to write a graphics program in which I use a Panel on a Windows form as the graphics surface. I have a click event routine which is triggered whn the user clicks on the Panel. I want to...
February 12th, 2012, 06:50 AM
In Visual Basic 2010 I have a PictureBox control which i need to check in code to see if it does not contain an image. Can anyone suggest how i can accomplish this. ?