TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pooya monadi
NA
1
1.1k
help me about calculator app in C# language
Nov 3 2013 4:59 AM
I know how to code calculator in C# but i dont know how solve this problem for my app.
i want that use Enter as '=' but i try to run this code but not solve problem.
please help me about this
Button b = new Button();
b.Text = e.KeyChar.ToString();
if (panel1.Enabled)
{
if (e.KeyCode == Keys.Return)
btnequal_Click(null, null);
if (e.KeyChar >= '0' && e.KeyChar <= '9')
{
Numbers(b, null);
foreach (Button c in panel1.Controls)
{
if (c.Text == b.Text)
{
c.Focus();
}
}
}
else
if (e.KeyChar == '+' || e.KeyChar == '-' || e.KeyChar == '/' || e.KeyChar == '*')
{
Operations(b, null);
foreach (Button c in panel1.Controls)
{
if (c.Text == b.Text)
{
c.Focus();
}
}
}
else
if (e.KeyChar == '.')
{
btndot_Click(null, null);
btndot.Focus();
}
else
if (e.KeyChar == '\b')
{
btnbackspace_Click(b, null);
btnbackspace.Focus();
}
}
Reply
Answers (
2
)
How to automate email which will send email at 5PM everyday
to acces databese add csharp not register.