Click here to Skip to main content
15,909,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Stackoverflow Pin
OriginalGriff23-Sep-18 6:04
mveOriginalGriff23-Sep-18 6:04 
GeneralRe: Stackoverflow Pin
Thomas Kiær23-Sep-18 6:14
Thomas Kiær23-Sep-18 6:14 
GeneralRe: Stackoverflow Pin
OriginalGriff23-Sep-18 6:27
mveOriginalGriff23-Sep-18 6:27 
QuestionC# Post files through rest api error Pin
Pradeep Kumar21-Sep-18 13:07
Pradeep Kumar21-Sep-18 13:07 
AnswerRe: C# Post files through rest api error Pin
Richard MacCutchan21-Sep-18 21:37
mveRichard MacCutchan21-Sep-18 21:37 
Questionstore image in DB by Parameters.AddWithValue Pin
Member 1352250120-Sep-18 17:01
Member 1352250120-Sep-18 17:01 
AnswerRe: store image in DB by Parameters.AddWithValue Pin
OriginalGriff20-Sep-18 21:23
mveOriginalGriff20-Sep-18 21:23 
QuestionHow to modify picturebox image when clicked button Pin
mores.JR20-Sep-18 9:54
mores.JR20-Sep-18 9:54 
i have create code like this right now,it is small game. it will show grid pictureboxes when user enter rows and columns in textboxes. also i have several button with image. when i click the button,that mean i choose the image on that button and when i click the picturebox, that image will showing on that picturebox.also user can click button(image) to change the image on picture box.
i don't know how to modify my picturebox image with button.
private void btnGenerate_Click(object sender, EventArgs e)
       {
           //TODO: CLEAR PREVIOUS DRAWN
           panel3.Controls.Clear();

           //set rows and columns
           int rows = Convert.ToInt32(txtRows.Text);
           int columns = Convert.ToInt32(txtColumns.Text);

           PictureBox[,] map = new PictureBox[rows,columns];

           for (int j = 0; j < columns; j++)
           {
               for (int i = 0; i < rows; i++)
               {
                   //show dynamically
                   System.Threading.Thread.Sleep(50);

                   map[i, j] = new PictureBox();

                   map[i, j].Width = 45;
                   map[i, j].Height = 45;
                   map[i, j].BackColor = Color.NavajoWhite;

                   //set first picturebox position
                   if (i == 0 && j == 0)
                   {
                       map[i, j].Location = new Point(100, 100);
                   }


                   map[i, j].Location = new Point(45 * i + 100, 45 * j + 100);
                   map[i, j].BorderStyle = BorderStyle.Fixed3D;

                   //show on the panel
                   panel3.Controls.Add(map[i, j]);



               }
           }

       }

QuestionMessage Removed Pin
20-Sep-18 9:07
Member 1399203720-Sep-18 9:07 
Questioncommunication between two child forms in C# Pin
Member 1332584619-Sep-18 13:10
Member 1332584619-Sep-18 13:10 
AnswerRe: communication between two child forms in C# Pin
OriginalGriff19-Sep-18 19:56
mveOriginalGriff19-Sep-18 19:56 
GeneralRe: communication between two child forms in C# Pin
Member 1332584621-Sep-18 9:07
Member 1332584621-Sep-18 9:07 
GeneralRe: communication between two child forms in C# Pin
OriginalGriff21-Sep-18 23:57
mveOriginalGriff21-Sep-18 23:57 
GeneralRe: communication between two child forms in C# Pin
Member 1332584622-Sep-18 10:44
Member 1332584622-Sep-18 10:44 
GeneralRe: communication between two child forms in C# Pin
OriginalGriff22-Sep-18 21:07
mveOriginalGriff22-Sep-18 21:07 
GeneralRe: communication between two child forms in C# Pin
Member 1332584623-Sep-18 7:26
Member 1332584623-Sep-18 7:26 
GeneralRe: communication between two child forms in C# Pin
OriginalGriff23-Sep-18 7:36
mveOriginalGriff23-Sep-18 7:36 
GeneralRe: communication between two child forms in C# Pin
Member 1332584625-Sep-18 10:13
Member 1332584625-Sep-18 10:13 
Questionhow to make a gird of pictureboxs with c# Pin
mores.JR19-Sep-18 7:15
mores.JR19-Sep-18 7:15 
AnswerRe: how to make a gird of pictureboxs with c# Pin
OriginalGriff19-Sep-18 8:05
mveOriginalGriff19-Sep-18 8:05 
GeneralRe: how to make a gird of pictureboxs with c# Pin
mores.JR20-Sep-18 9:55
mores.JR20-Sep-18 9:55 
QuestionImage processing Pin
Member 266560619-Sep-18 3:39
Member 266560619-Sep-18 3:39 
AnswerRe: Image processing Pin
OriginalGriff19-Sep-18 4:18
mveOriginalGriff19-Sep-18 4:18 
AnswerRe: Image processing Pin
Pete O'Hanlon19-Sep-18 5:05
mvePete O'Hanlon19-Sep-18 5:05 
QuestionApplications settings get messed up Pin
Acuena18-Sep-18 3:32
Acuena18-Sep-18 3: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.