- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication31
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void A(object sender, EventArgs e)
- {
- // display G
- int row, column;
- for (row = 0; row <= 6; row++)
- {
- for (column = 0; column <= 6; column++)
- {
- if ((column == 1 && row != 0 && row != 6) || ((row == 0 || row == 6) && column > 1 && column < 5) || (row == 3 && column > 2 && column < 6) || (column == 5 && row != 0 && row != 2 && row != 6))
- textBox1.AppendText("*");
- else
- textBox1.AppendText(" ");
- }
- textBox1.AppendText(Environment.NewLine);
- }
- textBox1.AppendText(Environment.NewLine);
- //Here i want a code so that when i click on my button it will display next letter
- //DISPLAY Z
- for (row = 0; row <= 6; row++)
- {
- for (column = 0; column <= 6; column++)
- {
- if (((row == 0 || row == 6) && column >= 0 && column <= 6) || row + column == 6)
- textBox1.AppendText("*");
- else
- textBox1.AppendText(" ");
- }
- textBox1.AppendText(Environment.NewLine);
- }
- textBox1.AppendText(Environment.NewLine);
- }
- }
- }
How to display next letter using button in c#
Here is my code and i want display letter by clicking button .when i click on button for first time it should display G and when i click for second time it should display Z.

Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2018, 9:10 PM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 22, 2018, 9:08 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 9:49 PM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 22, 2018, 9:52 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2018, 10:03 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 10:04 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 10:10 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2018, 10:15 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 10:18 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 10:21 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2018, 10:22 PM EDT
SONU GUPTA54 reputationPosted Mar 22, 2018, 10:33 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2018, 10:47 PM EDT
SONU GUPTA54 reputationPosted Mar 23, 2018, 12:07 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Mar 23, 2018, 12:31 AM EDT
James AxsomRank #4,887 · 320 reputationPosted Jun 16, 2018, 7:54 AM EDT