Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]
|
|
- Shana Randall
- 6 years ago
- Views:
Transcription
1 C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open Visual Studio - Under the Visual C# - Create a new Windows Form Application in visual studio. Call this project tictactoegame and press ok. In the properties window change the following - Size: 650,500 Text: Tic Tac Toe - Moo Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]
2 Add 10 buttons to the form. Find the label in the tool box. Drag and drop the label in the windows form. Select all 9 of the buttons, look at the properties window.
3 find the font option and click on the 3 dotted button on the right. Change the font style to BOLD and Size to 14. CLICK OK Back in the properties window, insert play into the tag option and show a question mark for the Text option. This is what they look like now. Change the button 10 text to Reset. Click on the label 1 Once again click on the 3 dotted button in the properties window.
4 Change the font style to BOLD and size to 12. Click OK. Find the timer object from the tool box and drag and drop it to the form. Change the following to the timer. Name it AITIMER and change the interval from 100 to Basically we want to run this timer for 1 second only. Adding events to the game Select all 9 buttons, click on the small lightning bolt icon on the properties window, find the CLICK event, type buttonclick and press enter. This will take you to the code view, you can come back to the design view from there and do the following. Click on the Timer object
5 Click on the small lightning icon on the properties window, you see only one option for the timer which is TICK. Type playai and press enter. This will take you back to the code view, come back to the design view to do the following Click on the reset button Click on the lightning bolt icon on the properties window and find the click option, type resetgame and press enter. Let's take a look at the code window. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace tictactoegame public partial class Form1 : Form public Form1() InitializeComponent(); private void buttonclick(object sender, EventArgs e) private void playai(object sender, EventArgs e) private void resetgame(object sender, EventArgs e) Add the following code.
6 Right under the Form1() function add the public enum Player public enum Player X, O This sort of class will hold X and O value for us. Knots and Crosses if you will. This line below will create a new instance of the player class we created earlier. We will decide who is the currently player with this line. Player currentplayer; Below is the button click function we linked with all 9 buttons earlier. private void buttonclick(object sender, EventArgs e) var button = (Button)sender; currentplayer = Player.X; button.text = currentplayer.tostring(); button.enabled = false; button.backcolor = System.Drawing.Color.LightGreen; Check(); AITIMER.Start(); var button = (Button)sender; In this line we are creating a variable called button and giving it a value (Button)sender. Since this event is linked to each button we need to find out which button was clicked. currentplayer = Player.X; Since the player can only click on the buttons, we are setting the player to have X symbol. button.text = currentplayer.tostring(); We will change the text on the button with the player X symbol by converting the content to string. button.enabled = false; disable the button once clicked. button.backcolor = System.Drawing.Color.LightGreen; change the back colour to light green. Check(); run the check function AITIMER.Start(); this is the AI timer we created earlier and we are going to start the timer when player made their move.
7 Below is the reset game event. Let's take a closer look at the code inside. private void resetgame(object sender, EventArgs e) label1.text = "??"; if (x is Button && x.tag == "play") ((Button)x).Enabled = true; ((Button)x).Text = "?"; ((Button)x).BackColor = default(color); label1.text = "??"; -- change the label text to double question mark. -- starting a for each loop, inside the brackets we set the condition for the loop as in what to check, we are creating a Control variable called X in this controls meaning in this form. This will loop through each component active in form for example buttons, labels, text boxes, picture boxes etc. if (x is Button && x.tag == "play") -- this line is checking if X is a button AND it has the tag of play. The reason we are doing this is because we have 10 buttons on the screen, 1 for reset and 9 for the game. So we don't want to effect the reset button only the play buttons, this is why we added the tag play to these buttons earlier in the tutorial. ((Button)x).Enabled = true; -- We are enabling the button. ((Button)x).Text = "?"; -- we are changing the text of the button to question mark? ((Button)x).BackColor = default(color); -- finally we are changing the back colour of the button to the default colour. private void playai(object sender, EventArgs e) if (x is Button && x.text == "?" && x.enabled) x.enabled = false; currentplayer = Player.O; x.text = currentplayer.tostring(); x.backcolor = System.Drawing.Color.LightGoldenrodYellow; AITIMER.Stop(); Check(); break; else AITIMER.Stop(); -- this line is starting the for each loop, we are starting to loop through all of the components or controls in this windows form. Loops are usually started with a condition and curly brackets and ending with a curly brackets.
8 if (x is Button && x.text == "?" && x.enabled) -- this line is checking if that x control variable we created earlier in the loop condition. In this if statement we are checking if x is a button AND it has the text? question mark and x is enabled to be clicked on then we will execute the following actions. x.enabled = false; -- first we disabling the x button currentplayer = Player.O; -- currently player is changed to O x.text = currentplayer.tostring(); -- Set the button text O by converting the current player to string. x.backcolor = System.Drawing.Color.LightGoldenrodYellow; -- change the background of the button to light golden colour. AITIMER.Stop(); -- stop the AI timer Check(); -- run the check function break; -- break the loop else -- else meaning if none of the conditions in the if statement are met we simply run the following line AITIMER.Stop(); -- stop the timer private void Check() if ( button1.text == "X" && button2.text == "X" && button3.text == "X" button4.text == "X" && button5.text == "X" && button6.text == "X" button7.text == "X" && button8.text == "X" && button9.text == "X" button1.text == "X" && button4.text == "X" && button7.text == "X" button2.text == "X" && button5.text == "X" && button8.text == "X" button3.text == "X" && button6.text == "X" && button9.text == "X" button1.text == "X" && button5.text == "X" && button9.text == "X" button3.text == "X" && button5.text == "X" && button7.text == "X" ) WON(); label1.text = "X Wins"; else if ( button1.text == "O" && button2.text == "O" && button3.text == "O" button4.text == "O" && button5.text == "O" && button6.text == "O" button7.text == "O" && button8.text == "O" && button9.text == "O" button1.text == "O" && button4.text == "O" && button7.text == "O" button2.text == "O" && button5.text == "O" && button8.text == "O" button3.text == "O" && button6.text == "O" && button9.text == "O" button1.text == "O" && button5.text == "O" && button9.text == "O" button3.text == "O" && button5.text == "O" && button7.text == "O" ) WON(); label1.text = "O Wins"; Check function is created to check whether the player or opponent won the game. We are going to use the if statement to check these conditions. We didn't change the names of the buttons so they are called button1, button2, button3, button4, button5, button6, button7, button8 and button9
9 Once any of these conditions are met in the if statement we run the won function to stop the whole game and disable all buttons. The same theory is being used for the O player. If any of these statements are true then we run the WON function and change the Label text to show who won the game. private void WON() if (x is Button && x.tag == "play") ((Button)x).Enabled = false; ((Button)x).BackColor = default(color);
10 -- we run a for each loop in this function if (x is Button && x.tag == "play") -- we check if x is a button and has the tag of PLAY ((Button)x).Enabled = false; -- then we run the loop and disable all the buttons ((Button)x).BackColor = default(color); -- we restore the buttons to the default system colour. Final Project - Future Improvements on AI - This project currently doesn't use an intelligent AI or an AI that can predict a win or lose scenario, however in the future we might create an algorithm and share it on mooict.com for you to implement into this game. Till then keep learning. Full Code For the game. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace tictactoegame public partial class Form1 : Form Player currentplayer; public Form1() InitializeComponent(); public enum Player X, O private void buttonclick(object sender, EventArgs e) var button = (Button)sender; currentplayer = Player.X; button.text = currentplayer.tostring(); button.enabled = false; button.backcolor = System.Drawing.Color.LightGreen; Check(); AITIMER.Start(); private void playai(object sender, EventArgs e) if (x is Button && x.text == "?" && x.enabled)
11 x.enabled = false; currentplayer = Player.O; x.text = currentplayer.tostring(); x.backcolor = System.Drawing.Color.LightGoldenrodYellow; AITIMER.Stop(); Check(); break; else AITIMER.Stop(); private void resetgame(object sender, EventArgs e) label1.text = "??"; if (x is Button && x.tag == "play") ((Button)x).Enabled = true; ((Button)x).Text = "?"; ((Button)x).BackColor = default(color); private void Check() if ( button1.text == "X" && button2.text == "X" && button3.text == "X" button4.text == "X" && button5.text == "X" && button6.text == "X" button7.text == "X" && button8.text == "X" && button9.text == "X" button1.text == "X" && button4.text == "X" && button7.text == "X" button2.text == "X" && button5.text == "X" && button8.text == "X" button3.text == "X" && button6.text == "X" && button9.text == "X" button1.text == "X" && button5.text == "X" && button9.text == "X" button3.text == "X" && button5.text == "X" && button7.text == "X" ) WON(); label1.text = "X Wins"; else if ( button1.text == "O" && button2.text == "O" && button3.text == "O" button4.text == "O" && button5.text == "O" && button6.text == "O" button7.text == "O" && button8.text == "O" && button9.text == "O" button1.text == "O" && button4.text == "O" && button7.text == "O" button2.text == "O" && button5.text == "O" && button8.text == "O" button3.text == "O" && button6.text == "O" && button9.text == "O" button1.text == "O" && button5.text == "O" && button9.text == "O" button3.text == "O" && button5.text == "O" && button7.text == "O" ) WON(); label1.text = "O Wins"; private void WON() if (x is Button && x.tag == "play") ((Button)x).Enabled = false; ((Button)x).BackColor = default(color);
Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.
Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Before you start - download the game assets from above or on MOOICT.COM to
More informationForm Properties Window
C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click
More informationWe are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.
C# Tutorial - Create a Batman Gravity Run Game Start a new project in visual studio and call it gravityrun It should be a windows form application with C# Click OK Change the size of the to 800,300 and
More informationClick on the empty form and apply the following options to the properties Windows.
Start New Project In Visual Studio Choose C# Windows Form Application Name it SpaceInvaders and Click OK. Click on the empty form and apply the following options to the properties Windows. This is the
More informationStart Visual Studio, create a new project called Helicopter Game and press OK
C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot
More informationThis is the empty form we will be working with in this game. Look under the properties window and find the following and change them.
We are working on Visual Studio 2010 but this project can be remade in any other version of visual studio. Start a new project in Visual Studio, make this a C# Windows Form Application and name it zombieshooter.
More informationStart Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.
C# Tutorial - Create a YouTube Alarm Clock in Visual Studio In this tutorial we will create a simple yet elegant YouTube alarm clock in Visual Studio using C# programming language. The main idea for this
More informationYou can call the project anything you like I will be calling this one project slide show.
C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise
More informationTo start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer
C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version
More informationCALCULATOR APPLICATION
CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
More informationFirst start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button
Create an Interest Calculator with C# In This tutorial we will create an interest calculator in Visual Studio using C# programming Language. Programming is all about maths now we don t need to know every
More informationIBSDK Quick Start Tutorial for C# 2010
IB-SDK-00003 Ver. 3.0.0 2012-04-04 IBSDK Quick Start Tutorial for C# 2010 Copyright @2012, lntegrated Biometrics LLC. All Rights Reserved 1 QuickStart Project C# 2010 Example Follow these steps to setup
More informationExperiment 5 : Creating a Windows application to interface with 7-Segment LED display
Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application
More informationCreate your own Meme Maker in C#
Create your own Meme Maker in C# This tutorial will show how to create a meme maker in visual studio 2010 using C#. Now we are using Visual Studio 2010 version you can use any and still get the same result.
More informationif (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient;
More informationMain Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..
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;
More informationConventions in this tutorial
This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial
More informationObject oriented lab /second year / review/lecturer: yasmin maki
1) Examples of method (function): Note: the declaration of any method is : method name ( parameters list ).. Method body.. Access modifier : public,protected, private. Return
More informationCSIS 1624 CLASS TEST 6
CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed
More informationYour First Windows Form
Your First Windows Form From now on, we re going to be creating Windows Forms Applications, rather than Console Applications. Windows Forms Applications make use of something called a Form. The Form is
More informationThe first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.
4 Programming with C#.NET 1 Camera The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear. Begin by loading Microsoft Visual Studio
More informationNI USB-TC01 Thermocouple Measurement Device
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics NI USB-TC01 Thermocouple Measurement Device HANS- PETTER HALVORSEN, 2013.02.18 Faculty of Technology,
More informationSavoy ActiveX Control User Guide
Savoy ActiveX Control User Guide Jazz Soft, Inc. Revision History 1 Revision History Version Date Name Description 1.00 Jul, 31 st, 2009 Hikaru Okada Created as new document 1.00a Aug, 22 nd, 2009 Hikaru
More informationHow to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.
How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. Author: Carlos Kassab Date: July/24/2006 First install BOBS(BaaN Ole Broker Server), you
More informationWriting Your First Autodesk Revit Model Review Plug-In
Writing Your First Autodesk Revit Model Review Plug-In R. Robert Bell Sparling CP5880 The Revit Model Review plug-in is a great tool for checking a Revit model for matching the standards your company has
More informationDeveloping for Mobile Devices Lab (Part 1 of 2)
Developing for Mobile Devices Lab (Part 1 of 2) Overview Through these two lab sessions you will learn how to create mobile applications for Windows Mobile phones and PDAs. As developing for Windows Mobile
More informationINFORMATICS LABORATORY WORK #4
KHARKIV NATIONAL UNIVERSITY OF RADIO ELECTRONICS INFORMATICS LABORATORY WORK #4 MAZE GAME CREATION Associate Professor A.S. Eremenko, Associate Professor A.V. Persikov Maze In this lab, you build a maze
More informationThe Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:
This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface
More informationD - Tic Tac Toe. Let's use our 9 sparkles to build a tic tac toe game! 2017 courses.techcamp.org.uk/ Page 1 of 9
D - Tic Tac Toe Let's use our 9 sparkles to build a tic tac toe game! 2017 courses.techcamp.org.uk/ Page 1 of 9 INTRODUCTION Let's use our 9 sparkles to build a tic tac toe game! Step 1 Assemble the Robot
More informationII. Programming Technologies
II. Programming Technologies II.1 The machine code program Code of algorithm steps + memory addresses: MOV AX,1234h ;0B8h 34h 12h - number (1234h) to AX register MUL WORD PTR [5678h] ;0F7h 26h 78h 56h
More informationVisual Basic/C# Programming (330)
Page 1 of 12 Visual Basic/C# Programming (330) REGIONAL 2017 Production Portion: Program 1: Calendar Analysis (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores
More informationChapter 12. Tool Strips, Status Strips, and Splitters
Chapter 12 Tool Strips, Status Strips, and Splitters Tool Strips Usually called tool bars. The new ToolStrip class replaces the older ToolBar class of.net 1.1. Create easily customized, commonly employed
More informationRepresenting Recursive Relationships Using REP++ TreeView
Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved. Representing Recursive
More informationChapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.
Chapter 2 Multiple Choice 1. According to the following figure, which statement is incorrect? A. The size of the selected object is 300 pixels wide by 300 pixels high. B. The name of the select object
More informationUNIT-3. Prepared by R.VINODINI 1
Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI
More informationnamespace spojneice { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
Spojnice using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO;
More informationEyes of the Dragon - XNA Part 37 Map Editor Revisited
Eyes of the Dragon - XNA Part 37 Map Editor Revisited I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported operating systems
More informationpojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1
NIZOVI Niz deklarišemo navođenjemtipa elemenata za kojim sledi par srednjih zagrada[] i naziv niza. Ako je niz višedimenzionalni između zagrada[] se navode zarezi, čiji je broj za jedan manji od dimenzija
More information// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI;
More informationC:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using
1 using System; 2 using System.Diagnostics; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Data; 6 using System.Drawing; 7 using System.Text; 8 using System.Windows.Forms;
More informationstring spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI; 1 namespace
More informationHuw Talliss Data Structures and Variables. Variables
Data Structures and Variables Variables The Regex class represents a read-only regular expression. It also contains static methods that allow use of other regular expression classes without explicitly
More informationClass Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2
Class Test 4 Marks will be deducted for each of the following: -5 for each class/program that does not contain your name and student number at the top. -2 If program is named anything other than Question1,
More information// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDIx64;
More informationThe Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework
The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework Solairaju¹, N. Abdul Ali² and R.M. Karthikkeyan 3 1-2 : P.G. & Research Department of Mathematics, Jamal Mohamed College, Trichy 20.
More informationAnswer on Question# Programming, C#
Answer on Question#38723 - Programming, C# 1. The development team of SoftSols Inc. has revamped the software according to the requirements of FlyHigh Airlines and is in the process of testing the software.
More informationClass Test 5. Create a simple paint program that conforms to the following requirements.
Class Test 5 Question 1 Use visual studio 2012 ultimate to create a C# windows forms application. Create a simple paint program that conforms to the following requirements. The control box is disabled
More informationبسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية
بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية وتمتلك الشفرة البرمجية التالية : زر االقسام fr_dept fd = new
More informationQuick Guide for the ServoWorks.NET API 2010/7/13
Quick Guide for the ServoWorks.NET API 2010/7/13 This document will guide you through creating a simple sample application that jogs axis 1 in a single direction using Soft Servo Systems ServoWorks.NET
More informationVisual Basic/C# Programming (330)
Page 1 of 16 Visual Basic/C# Programming (330) REGIONAL 2016 Program: Character Stats (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores and answer keys! Property
More informationVisual C# Program: Simple Game 3
C h a p t e r 6C Visual C# Program: Simple Game 3 In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Opening Visual C# Editor Beginning a
More informationCSC 355 PROJECT 4 NETWORKED TIC TAC TOE WITH WPF INTERFACE
CSC 355 PROJECT 4 NETWORKED TIC TAC TOE WITH WPF INTERFACE GODFREY MUGANDA In this project, you will write a networked application for playing Tic Tac Toe. The application will use the.net socket classes
More informationเว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }
เว บแอพล เคช น using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace
More informationMainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.
APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown
More informationStep 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content
Step 1: Start a GUI Project Start->New Project->Visual C# ->Windows Forms Application Name: Wack-A-Gopher Step 2: Add Content Download the Content folder (content.zip) from Canvas and unzip in a location
More informationTutorial 5 Completing the Inventory Application Introducing Programming
1 Tutorial 5 Completing the Inventory Application Introducing Programming Outline 5.1 Test-Driving the Inventory Application 5.2 Introduction to C# Code 5.3 Inserting an Event Handler 5.4 Performing a
More informationIn this exercise you will gain hands-on experience using STK X to embed STK functionality in a container application created with C#.
STK X Tutorial - C# In this exercise you will gain hands-on experience using STK X to embed STK functionality in a container application created with C#. CONTENTS TUTORIAL SOURCE CODE... 1 CREATE THE PROJECT...
More informationВизуал програмчлал. Багш: Ж. Шинэбаяр /Маг/
Визуал програмчлал Лабораторийн ажил 13. NotePad /Forms Application/. Олон форм үүсгэх; Формуудыг хэлбэршүүлэх; Бусад формуудаас утга авах. Лабораторын ажлыг гүйцэтгэх дараалал: 1. Шинэ project үүсгэн
More informationC# winforms gridview
C# winforms gridview using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
More informationIn-Class Worksheet #4
CSE 459.24 Programming in C# Richard Kidwell In-Class Worksheet #4 Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open. 1. Create a new Project either from the
More informationOverview Describe the structure of a Windows Forms application Introduce deployment over networks
Windows Forms Overview Describe the structure of a Windows Forms application application entry point forms components and controls Introduce deployment over networks 2 Windows Forms Windows Forms are classes
More informationChapter 6 Dialogs. Creating a Dialog Style Form
Chapter 6 Dialogs We all know the importance of dialogs in Windows applications. Dialogs using the.net FCL are very easy to implement if you already know how to use basic controls on forms. A dialog is
More information// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding
// Program 2 - Extra Credit // CIS 200-01 // Spring 2015 // Due: 3/11/2015 // By: Andrew L. Wright //Edited by : Ben Spalding // File: Prog2Form.cs // This class creates the main GUI for Program 2. It
More informationPS2 Random Walk Simulator
PS2 Random Walk Simulator Windows Forms Global data using Singletons ArrayList for storing objects Serialization to Files XML Timers Animation This is a fairly extensive Problem Set with several new concepts.
More informationCIS 3260 Intro. to Programming with C#
Running Your First Program in Visual C# 2008 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Run Visual Studio Start a New Project Select File/New/Project Visual C# and Windows must
More information} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");
Form1 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;
More informationHands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011
Hands-On Lab Lab: Client Object Model Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: RETRIEVING LISTS... 4 EXERCISE 2: PRINTING A LIST... 8 EXERCISE 3: USING ADO.NET DATA
More informationGathering and Modifying Real-Time Software Data in a Visual Studio Environment Mark Rogers November 6, 2008
Gathering and Modifying Real-Time Software Data in a Visual Studio Environment Mark Rogers November 6, 2008 Executive Summary The topics discussed in this application note include gathering real-time software
More informationXNA 4.0 RPG Tutorials. Part 11b. Game Editors
XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on
More informationcreate database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )
create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler
More informationMr.Khaled Anwar ( )
The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program
More informationA Summoner's Tale MonoGame Tutorial Series. Chapter 12. Battling Avatars Continued
A Summoner's Tale MonoGame Tutorial Series Chapter 12 Battling Avatars Continued This tutorial series is about creating a Pokemon style game with the MonoGame Framework called A Summoner's Tale. The tutorials
More informationLIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO.Ports; using Microsoft.FlightSimulator.SimConnect;
More informationBrian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky
Brian Kiser November 2010 Vigilant C# 2.5 Commonwealth of Kentucky Frankfort, Kentucky Table of Contents 1.0 Work Sample Description Page 3 2.0 Skills Demonstrated 2.1 Software development competency using
More informationChapter 13 Working with Threads
Chapter 13 Working with Threads Until relatively recently only advanced programmers understood and knew how to employ threads in application programs. Part of the problem was that using threads was not
More informationnamespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
using System using System.Collections.Generic using System.ComponentModel using System.Data using System.Drawing using System.Text using System.Windows.Forms using Edidev.FrameworkEDI 1 namespace csharp_gen277x214
More informationExamples. Products. W informs Controls > Products > Navigation Bar > Examples. This topic provides how -to examples, grouped by features.
Examples 3564 W informs Controls > Products > Navigation Bar > Examples This topic provides how -to examples, grouped by features. Examples Layout How to: Create a NavBar Control in Code How to: Activate
More informationLab - 1. Solution : 1. // Building a Simple Console Application. class HelloCsharp. static void Main() System.Console.WriteLine ("Hello from C#.
Lab - 1 Solution : 1 // Building a Simple Console Application class HelloCsharp static void Main() System.Console.WriteLine ("Hello from C#."); Solution: 2 & 3 // Building a WPF Application // Verifying
More informationOverview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems
Excel and C# Overview Introduction to DatabaseSupport Systems Building a Web-Enabled Decision Support System Integrating DSS in Business Curriculum 2 Decision Support Systems (DSS) A decision support system
More informationYour Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output
General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution
More informationWindows 7 Control Pack for WinForms
ComponentOne Windows 7 Control Pack for WinForms By GrapeCity, Inc. Copyright 1987-2012 GrapeCity, Inc. All rights reserved. Corporate Headquarters ComponentOne, a division of GrapeCity 201 South Highland
More informationThese are the four symbols which we will use in the picture box to represent the sum instructions.
Create a Maths quiz game in Visual studio with C# Guess the symbol This you will need resource images for the symbols 4 labels 1 picture box called symbol num1 will show the first number num2 will show
More informationTic Tac Toe Game! Day 8
Tic Tac Toe Game! Day 8 Game Description We will be working on an implementation of a Tic-Tac-Toe Game. This is designed as a two-player game. As you get more involved in programming, you might learn how
More informationVisual Studio Windows Form Application #1 Basic Form Properties
Visual Studio Windows Form Application #1 Basic Form Properties Dr. Thomas E. Hicks Computer Science Department Trinity University Purpose 1] The purpose of this tutorial is to show how to create, and
More informationDeveloping for Mobile Devices Lab (Part 2 of 2)
Developing for Mobile Devices Lab (Part 2 of 2) Overview In the previous lab you learned how to create desktop and mobile applications using Visual Studio. Two important features that were not covered
More informationSerial Communications Part 1 - Graphical User Interfaces
#18 Serial Communications Part 1 - Graphical User Interfaces Recap Last month, we finished with our introduction to the Arduino Projects Kit (available from Nuts & Volts and Smiley Micros) and used all
More informationXNA 4.0 RPG Tutorials. Part 2. More Core Game Components
XNA 4.0 RPG Tutorials Part 2 More Core Game Components I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of
More informationInheriting Windows Forms with Visual C#.NET
Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes
More informationFDSc in ICT. Building a Program in C#
FDSc in ICT Building a Program in C# Objectives To build a complete application in C# from scratch Make a banking app Make use of: Methods/Functions Classes Inheritance Scenario We have a bank that has
More information2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project
1. Introduction GDS Google Map is a Desktop.Net User Control, which can be embedded in Windows Forms Applications or hosted in WPF Applications. It integrates an interactive Google Map into your desktop
More information3 Customer records. Chapter 3: Customer records 57
Chapter 3: Customer records 57 3 Customer records In this program we will investigate how records in a database can be displayed on a web page, and how new records can be entered on a web page and uploaded
More informationUsing Template Bookmarks for Automating Microsoft Word Reports
Using Template Bookmarks for Automating Microsoft Word Reports Darryl Bryk U.S. Army RDECOM-TARDEC Warren, MI 48397 Disclaimer: Reference herein to any specific commercial company, product, process, or
More information// Precondition: None // Postcondition: The address' name has been set to the // specified value set;
// File: Address.cs // This classes stores a typical US address consisting of name, // two address lines, city, state, and 5 digit zip code. using System; using System.Collections.Generic; using System.Linq;
More informationChanging Button Images in Microsoft Office
Changing Button Images in Microsoft Office Introduction This document deals with creating and modifying the button images used on Microsoft Office toolbars. Rarely is there a need to modify a toolbar button
More informationChapter 8 Advanced GUI Features
159 Chapter 8 Advanced GUI Features There are many other features we can easily add to a Windows C# application. We must be able to have menus and dialogs along with many other controls. One workhorse
More informationAPÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:
APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende: Interfaz gráfica de wiimocap. Obtención de las variables de los tres acelerómetros. Algoritmos de reconocimiento de posiciones. Inclinación
More informationFinal Exam, 3/17/2016 CIS330, Winter 2016
Final Exam, 3/17/2016 CIS330, Winter 2016 You have 2 hours to complete this exam. You are not allowed to use any books, notes, calculators, or electronic devices. Feel free to separate pages, just make
More informationUser-Defined Controls
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationA Summoner's Tale MonoGame Tutorial Series. Chapter 13. Leveling Up
A Summoner's Tale MonoGame Tutorial Series Chapter 13 Leveling Up This tutorial series is about creating a Pokemon style game with the MonoGame Framework called A Summoner's Tale. The tutorials will make
More informationAPARAT DE MASURA. Descrierea programului
APARAT DE MASURA Descrierea programului Acest program reprezinta un aparat de masura universal. Acest apparat poate fi modificat in functie de necesitatile utilizatorului. Modificarile pe care aparatul
More information