Create A Program That Accepts A Square Array Size 4 By 4

Nov 6, 2010

Trying to create a program that accepts a square array size 4 by 4. Then it should print the totals of the rows and columns. I started with a form and made text boxes and created a print button. I made it so that numbers can be input into the boxes. When hitting the print button, it should print the totals of what was input, however, it isn't doing that. Is there a different way to write the array code so that it will print it? Should i not have text boxes but rather have labels with fixed numbers set in them?

View 11 Replies


ADVERTISEMENT

Create A Multiplication Square For Any Size The User Enters?

Oct 2, 2009

Im using Visual Basic 2005."Devise a program to create a multiplication square for any size the user enters, up to a maximum of 10x10. The program should output something like this for a 4x4 square.

1234
2468
36912
481216

You will need to make use of the RichTextBox, along with concatenation to make the output format correctly within the box.When you have created the working program, document it properly by printing out and annotating the code to explain how it works."

View 4 Replies

[2008] Create A Program Which Accepts A Letter Of The Alphabet?

Mar 12, 2009

I'm trying to create a program which accepts a letter of the alphabet. For each letter a corresponding word beginning with that letter should be output, e.g., �a� or �A� input would give Alpha as the output, �b� or �B� would give Bravo and so on to �z� or �Z� giving Zulu.So if the user enters: "abc" for example, what should happen is a list on the right of the window appears with the words starting with those letters when the user presses calculate.I don't have any code apart form the basics below.

Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub

[code]....

View 7 Replies

Create An Array Size And Type Of Another?

Jul 6, 2010

I want to write an extension method that works with all kinds of arrays (Integer, String, Decimal, ...). It returns an array of the same type and size as the input parameter array.[code]...

View 1 Replies

Create 2-Dimesional Dynamic Array Large Size

Aug 22, 2009

i have a problem with the size of array i want to make a 2-Dimensional array with large size such as

[Code]....

View 9 Replies

Create And Initialize An Array Of Structures Of A Fixed Size?

Mar 6, 2012

I am trying to create and initialize an array of structures of a fixed size. Each struct will be populated when a button is clicked. Here is an example of my struct:

public structure buttonStruct
dim x() as Boolean
dim y() as Boolean

[code]....

In my form_load function I am declaring the array of structs and:

Dim BtnStruct(15) As ButtonStruct
BtnStruct(0).Initialize()

[code]....

Whenever a specific button is clicked, I am trying to collect data and store it in the respective struct and so for example, if button 1 is clicked then I will store the data associated with button 1 into BtnStruct(0). The position of the button is stored in a public variable called BtnNum. If I attempt to store information in the struct inside another function as follows, I receive an error

BtnStruct(BtnNum).x(pos - 1) = temp "btnstruct is not declared. it may not be inaccessible due to its protection level"

View 6 Replies

Program That Accepts A Word?

Sep 28, 2010

I'm trying to write a program that accepts a word and then determinesif the letters in it is in alphabetical order. There will be a message if it is, like with the words almost, imply, abcd and so on. However, if the letters are not in alphabetical order, another message will show.

View 18 Replies

Create A Square Using Graphics?

May 8, 2009

Is it possible to create a square using graphics that will not show in VB.NET? I want to use it for the IntersectsWith function to detect moving rectangles that are around objects.

View 1 Replies

How To Create A Circle And Square

Jul 13, 2010

i need a code the will draw a circle on a picturebox that will have the border color blue and the inside color black. i also need the same thing but for a square.

View 16 Replies

Designing Magic Square - Scanning Array With Function

Mar 18, 2011

I'm designing a 3 x 3 Magic Square, where the 3 x 3 tables are made of up three adjacent list boxes. Upon starting the program, the 3 x 3 square consists only of the character "?" to represent a variable that has yet to be defined. The user will input through text boxes and button presses the characters 1 to 9, replacing the highlighted undefined "?' with the desired number. I'm required to include a Function procedure that can, at any time scan the 3x3 table and return an integer value of -1 if an undefined character "?" is present, a value of 0 if the rows, columns and diagonals do not sum to the same value, or the sum common to all rows columns and diagonals.

To start with I defined a 2D array and undefined.
Dim mSquare(2,2) As String
Dim undefined As String = "?"

Then I used a Sub to set the 3x3 table as undefined which I did not show to save space. Next I used a Sub to update the highlighted characters, allowing only one list box to be selected at a time and which I hope also assigns the the values to the array as they are updated. I removed parts of the code so this post isn't too big.

If lstCol2.SelectedIndex = -1 And lstCol3.SelectedIndex = -1 Then
lstCol1.Items(lstCol1.SelectedIndex) = input
txtInput.Text = ""
End If
For i As Integer = 0 To 2
[Code] .....

What I'm stuck on is the Function design. I'm trying to design something to scan the array, and give back an integer depending on the results, which are to return an integer value of -1 if an undefined character "?" is present, a value of 0 if the rows, columns and diagonals do not sum to the same value, or the sum common to all rows columns and diagonals.

I'm currently trying
Function checkSquare(ByRef mSquare As String) As String
For i As Integer = 0 To 2
[Code] .....

At the moment I keep getting the error "Public Readonly Default Property Chars(index As Integer) As Char". I keep getting an error like this even using a single variable and defining each j individually, and I'm wondering if its possible to pass arrays to functions or do I need to do something else. Is what I'm trying to do even possible? I did a longer method in which I just check all the entries individually but I'm hoping there is a more efficient way. Its my plan B for now.

View 6 Replies

Create Application That Accepts Hindi / Marathi Font In Textbox?

Dec 1, 2011

I want to create a VB.NET application, that is capable of accepting hindi/marathi fonts in the textbox

View 2 Replies

Create Asterisk Square Using For Loops?

Oct 26, 2010

I'm having a little trouble with this assignment for my 1341 Fundamentals class...A copy of the assignment can be found here. The section I'm having trouble with right now is as follows:

Quote:

Add another TextBox and Button to your program window; label the TextBox side: and change the Text of the Button to Print hollow box. Write code to clear the ListBox and then print a hollow square box of asterisks with sides of length equal to the input number. For example, if the number entered is 10, the output should look like

[code]...

View 2 Replies

How To Create Square With Hollow Center

Sep 29, 2011

I want to make a square that its hollow from inside I got an example : I made a Christmas tree but I want my letters around the textbox to make a square with a hollow center.

Public Class Form1
Dim n As Integer
Dim i, j, c As Integer
Dim caracteres As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code] ......

View 1 Replies

Create Small Windows Forms Application That Accepts Pen-based Handwriting?

May 5, 2012

I am trying to create a small windows forms application that demonstrates how a user can use pen-based input(ona Lenovo X220 tablet PC) to enter text (rather than typing on a keyboard) I am using Visual Basic in Visual Studio 2010.I think the control I want to add to my Visual Basic Project is the Microsoft InkEdit ControlThe instructions I see on other parts of microsoft websites refer to a .net framework componed called InkEdit. The instructions I found so far is to right-mouse click on the tool box, click 'choose items' and then select the Inkedit Control from the .NET Framework components.

View 12 Replies

Display Square In Program?

Apr 1, 2011

Write an application that prompts the user to enter the size of the side of a square, then display a hollow square of that size made of asterisks. I have seen javascript using this but nothing with Visual Basic.

View 1 Replies

Array - Form With Text Boxes In A 6x6 Square Pattern - Add The Rows And Columns ?

Nov 18, 2010

I made a form with text boxes in a 6x6 square pattern. It will do a streamreader from a text file a number that indicates the size of the array. Then fill in the boxes with the numbers of the array. Then it will calculate the rows and columns to see if they add up to a single answer. Then it will display to an output window if it is a magic square or not. Meaning if all rows and columns add up to a single number its magic. If they dont add up to the same number then its not magic. Then it will repeat this check and output from the information of the other arrays from the text file.

I know how to code for the streamreader and get it to add the rows and columns. Im not sure about what code I need so it can check the answer if its magic or not and repeat it till the end.

Here are the contents of my text file which it will read from.

CODE:

View 3 Replies

Create A Form That Accepts Names (or Any Strings) As Input And Stores Them In A List Object?

Oct 6, 2010

I'm trying to create a form that accepts names (or any strings) as input and stores them in a object. See attached form sample.Form Image:

Operations: ï Initially the NumericUpDown object on the form should be disabled.The user enters a value (string) in the textbox and clicks the Add button or presses the Enter key to activate that button.The application then stores that name in a List object, and displays the last entry in the Label underneath.The NumericUpDown should become enable after the first entry. The user should be able to move between all the values entered using NumericUpDown.

View 7 Replies

.net - Global RegEx Replace Function To Create HTML From Square Brackets?

Nov 30, 2011

I have some existing code that looks something like this:

[tag:cb cbid="12345" cbwidth="200" cbclassname="calloutbox" cbposition="left"] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
[tag:cb cbid="123" cbwidth="200" cbclass="calloutbox2" cbposition="left"] Suspendisse eleifend enim a magna pretium porttitor.

I need to write a VB .Net global function that will match these [tag:cb] and take the optional parameters and rewrite the string with Html tags.

<div id="12345" width="200" class="calloutbox" position="left">content (based on id)</div>

View 1 Replies

Interface And Graphics :: How Do You Make A GUI Program That Is Not A Square/rectangle

Jan 31, 2010

I can't seem to make a GUI in the shape a circle...

something other than square/rectangle.

View 1 Replies

Create A New Array In Program?

Jun 13, 2009

Possible Duplicate:VB.Net Initialising an array on the fly

This maybe a stupid question, but its got me exasperated. How do I declare a new array inline? Is this possible? I've tried all of the following and they all don't work.[code]...

View 1 Replies

Create JSON Array Using Program?

Mar 5, 2012

How to create this JSON array using vb.net array [code]...

View 1 Replies

Create New Array From 2 Compared Program?

Jan 15, 2012

I have 2 arrays one is a and second is b. how do i compare each of them and insert to new array c?[code]...

View 10 Replies

Create One Array From Two Other Arrays In Program?

Feb 20, 2012

I have two arrays

a={a,b,c,d}

b={1,2,3,4}

now I want to create a 3rd array which should at least contains one numeric number and rest of alphabets, this code will generate unique usernames so it should not repeat the pattern of selection which is present in main array[code]...

View 2 Replies

Interface And Graphics :: Create An Image That Is To Mimic A Single Clock Rotating Hand Within A Square Area?

Aug 20, 2011

I have to create an image that is to mimic a single clock rotating hand within a square area,and the user has to choose the width and speed of the rotation and the direction.i managed to create the square area with a hand inside,with this codes and variables,

(Dim Mygraphics As graphics = e.graphics
mygrqaphics.Draw Rectangle(pens.color x1,x2,y1,y2)

mygraphics draw line(pens.color,x1,x2,y1,y2),now i have to find codes and variables to rotate the hand or line within a square area.one point remaining constant the other moving.

View 1 Replies

Create A Program Which Reads A Text File Into An Array?

May 10, 2009

I'm trying to create a program which reads a text file into an array.

[Code]...

But that's just silly so how can I fix this? Lines isn't being assigned a null value it's being assigned the first line of text in the file which has text in it so I'm confused.

View 5 Replies

VS 2008 Create An Array Of Constant Variables For Program?

Nov 5, 2009

I want to create an array of constant variables for my program. But from everything I read about arrays they are handled by a number. I want to be able to pass back a variable that will hold the name of the constant as well as the value. How would you go about do that.I want to when I type the variable to have the constant name show up as I am typing.

View 4 Replies

Create A Set Of Grammar Rules For Speech Recognition Program With An Array

Jun 15, 2012

I have been trying to create a set of grammar rules for a speech recognition program with an array, but cannot seem to accomplish this task. Here is the general idea:[code]But this did not work, because I cannot convert strings into srgsoneof.

View 18 Replies

PayRoll Calculator On Vb - Program That Accepts Input Of Employee Name, Employee Type, And Number Of Hours Worked

Sep 30, 2009

You need to design and create a program that accepts input of employee name, employee type, and the number of hours worked each week for two weeks.

You must be able to select an employee type. An employee of type Trainee makes $10 per hour. An employee of type Regular makes $15 per hour. An employee of type Manager makes $20 per hour.

The program should calculate the employee pay for the week. The employee should receive 1 times the regular pay for any hours worked over the prescribed 40 hours in a week. The program should output the following information:

-The employees name without trailing or leading spaces

-Regular hours worked

-Regular pay

-Overtime hours worked

-Overtime pay

-Total pay

The Problem that i am having right now is "Displaying " the overtime hours on my "FORM VIEW" i mean i did the math right its just when i type (lblOverHrs.Text = CDec(CDec(OvrHrsWrkWeek1.Text) + CDec(txtOvrHrsWrkWeek2.Text))

Its says the "OvrHrsWrkWeek1 and 2" are not Declared which are..im not really sure where i went wrong..

Heres my code

CODE:

View 4 Replies

Screen Resolution - Change My Program's Size Correct To Make Program,  800x600 Such As Minimum?

Jun 1, 2010

I made vb.net program for 1440x900 resolution, if i run my program on 800x600 or 1024x768, my program's resolution is bigger then windows, so i have problem with resolution. Now i want to change my program's size and i am interested in, wich resolution is correct to make program, 800x600 such as minimum?

View 9 Replies

Increasing The Size Of An Array?

Jun 8, 2011

increasing the size of my array. i have this code but i don't know which of these code does not increase the size of my array even though i increment it.

This is the declarations:
Dim movieArray(0) As String
Dim ratingArray(0) As String

[code].....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved