Question

In: Computer Science

You mission is create a C# program with the following. 1. At the top center of...

You mission is create a C# program with the following. 1. At the top center of the page is a title which displays your name - use a label. a. adjust the font size from the default to a bigger size. b. adjust the font color to a different color than the default c. name the label using a naming convention shown in the chapter. Use this same format for all of your objects. 2. Below the title, centered, place a picture of yourself using the picturebox tool explained in the chapter. a. name the picture box with a meaningful name using the naming convention you used in #1. b. size the picture to fit evenly under your title. c. make sure the picture is properly saved in the right location within the C# application or it won't be copied when you submit the assignment. Do not code a complete location like c:/myfiles .... I won't have the same folders as you. It has to reside in the proper images folder which is located with your other program files. 3. Create TWO buttons on the same line (row) as each other. They should be evenly spaced apart from each other..Same space between the left edge, center, and right edge. a. Give each button a meaningful name using the naming convention you used for #1. b. The left button should display (within the button itself), the words - my favorite quote. c. The right button should display (within the button itself), the words - what I do for fun. 4. Double click the left button. You should now be in the code area for the click event for this button. a. Create the code (only takes one line) to display your favorite quote when the button is clicked. 5. Double click the right button. You should now be in the code area for the click event for this button. a. Create the code (only takes one line) to display a statement about what you do for fun. 6. Place another button below the two buttons, centered under the picture. a. Name the button with a meaningful name using the naming convention you used in #1. b. The words inside the button will be - close program c. Double click the button to enter code under the button. d. Enter a line of code which will display something funny about the person leaving your program. e. Enter a second line of code which closes the program. Test, Test, Test! Make sure it works. I will be testing your program!

Solutions

Expert Solution

1

lable at top center using c# coding

using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
Label  usrName= new Label()
    {
        Size = new Size(30, 30),
        Text = "john milson",
        Anchor = AnchorStyles.None,
        TextAlign = ContentAlignment.MiddleCenter,
        Enabled = false,
        Font = new Font("Black", 6),
        ForeColor = Color.Skyblue.
}
}

}
    };

or

drag and drop the lable and set name as john milson

a.in the above code we want to change font size to 10 and

b.font color to different color

then we use

Font = new Font("yash", 10),

c. lable name as useName

2.

using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

Label usrName= new Label()

{

Size = new Size(30, 30),

Text = "john milson",

Anchor = AnchorStyles.None,

TextAlign = ContentAlignment.MiddleCenter,

Enabled = false,

Font = new Font("Black", 6),

ForeColor = Color.Skyblue.

}  

PictureBox picture = new PictureBox
        {
            Name = "pictureBox",
            Size = new Size(100, 50),
            Location = new Point(14, 17),
            Image = Image.FromFile(@"c:Images   est.jpg"),
            SizeMode = PictureBoxSizeMode.CenterImage
}
}
}        
};


OR

DRAG AND DROP THE PICTURE BOX


Related Solutions

C++ Vectors. Create a program do the following in the program: 1. declare an vector without...
C++ Vectors. Create a program do the following in the program: 1. declare an vector without specifying the size 2. use push_back to add random integers between 100 and 999 to the vector 3. write a function that returns the smallest, largest, and average of the numbers in the vector display the smallest, largest, and average of the numbers in the vector
Create a memory diagram for the following C program when the program reaches point 1. void...
Create a memory diagram for the following C program when the program reaches point 1. void foo (int *a); int bar(int *x); int search(int *c); int main(void) { int q, p=10; q= search(&p); return 0; } void foo(int *a) { *a += 2; //point 1 *f *= 10; } int bar(int *x) { return 2* *x; } int search(int *c) { int z= *c + bar(c); foo(c); return z; }
Write a C program that does the following. (a) Start with comment statements at the top...
Write a C program that does the following. (a) Start with comment statements at the top (before your includes) with the following info: Name, Date (b) Write the following functions: void setupRandArray(int n, int x[], int min, int max) void printArray(int n, int x[], char label[]) float getAverage(int n, int x[]) int getMaximum(int n, int x[]) int getCountInRange(int n, int x[], int min, int max) Note: This function returns the number elements of x that are between min and max...
********************C# C# C#******************** Part A: Create a project with a Program class and write the following...
********************C# C# C#******************** Part A: Create a project with a Program class and write the following two methods(headers provided) as described below: 1. A Method, public static int InputValue(int min, int max), to input an integer number that is between (inclusive) the range of a lower bound and an upper bound. The method should accept the lower bound and the upper bound as two parameters and allow users to re-enter the number if the number is not in the range...
C/ C++ Preferably 1. Write a simple program where you create an array of single byte...
C/ C++ Preferably 1. Write a simple program where you create an array of single byte characters. Make the array 100 bytes long. In C this would be an array of char. Use pointers and casting to put INTEGER (4 byte) and CHARACTER (1 byte) data into the array and pull it out. YES, an integer can be put into and retrieved from a character array. It's all binary under the hood. In some languages this is very easy (C/C++)...
C++ program homework question 1 1. Create and implement a class called clockType with the following...
C++ program homework question 1 1. Create and implement a class called clockType with the following data and methods (60 Points.): Data: Hours, minutes, seconds Methods: Set and get hours Set and get minutes Set and get seconds printTime(…) to display time in the form of hh:mm:ss default and overloading constructor Overloading Operators: << (extraction) operator to display time in the form of hh:mm:ss >> (insertion) operator to get input for hours, minutes, and seconds operator+=(int x) (increment operator) to...
Working with Files in C++. Create the following  program called payroll.cpp.  Note that the file you...
Working with Files in C++. Create the following  program called payroll.cpp.  Note that the file you read must be created before you run this program.  The output file will be created automatically by the program.  You can save the input file in the same directory as your payroll.cpp file by using Add New Item, Text File.   // File:  Payroll.cpp // Purpose:  Read data from a file and write out a payroll // Programmer:  (your name and section) #include <cstdlib>...
Create a C program that performs the following (please comment the codes): a) Create a Stack...
Create a C program that performs the following (please comment the codes): a) Create a Stack ADT. Stack should be implemented using the linked list. b) Enter 10 random integer numbers between 0 to 50 in the stack. c) After pushing each element, print the content of the top of the stack. c) Then pop out those 10 integer numbers and print those numbers. d) Finally destroy the Stack.
I am trying to create a makefile for the following program in Unix. The C++ program...
I am trying to create a makefile for the following program in Unix. The C++ program I am trying to run is presented here. I was wondering if you could help me create a makefile for the following C++ file in Unix and show screenshots of the process? I am doing this all in blue on putty and not in Ubuntu, so i don't have the luxury of viewing the files on my computer, or I don't know how to...
Using C++, you will create a program, where you will create two doubly linked lists. These...
Using C++, you will create a program, where you will create two doubly linked lists. These doubly linked lists will contain integers within them. Using the numbers in both of these linked lists, you add the numbers together, and insert the addition of the two numbers into a singly linked list. the input can be from the user or you just write the input. for example, if one number in the doubly linked list is 817 and in the other...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT