VS 2008 Creating A Small Application - Loops ?

Mar 24, 2010

I am trying to learn by creating a small application to help my son learn math. It works but I know there are better ways of accomplishing what I need.

For example:

'Declare variables
Dim num1 As Double = CDbl(frmMath.txtNum1.Text)
Dim num2 As Double = CDbl(frmMath.txtNum2.Text)
Dim answer1 As Double = CDbl(frmMath.txtAnswer.Text)

[CODE]...

I imagine I would need something like a do while loop?

View 1 Replies


ADVERTISEMENT

VS 2008 : Creating Asterisk Square Using For Loops?

Oct 26, 2010

I'm having a little trouble with this assignment for my 1341 Fundamentals class... 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]....

You may want to use a For loop inside a For loop. Use a string to build each line of output before you send it to the ListBox. Your program should produce correct output even if the input is 0 or 1. Be sure to catch all exceptions and handle them intelligently. After this step, your program window should look like this.

NOTE: I had some trouble getting the desired output for the 10 and 4 user inputs to print out right... Rather than there being 2 rows next to each other, they should be spread apart by the number of asterisks on the top (and bottom...) thus creating the "asterisk square".

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim first, last As Integer
Try

[code]....

View 3 Replies

Create A Small Application That Can Make Small Calculations?

Feb 1, 2010

On form 1 , i have a number of buttons that open up different websites.What i want to do is when i click a button on form 1 , i want forum 2 to show ( Form2.show() ) , Form 2 will have a list (Buttons) of internet browsers.

View 4 Replies

VS 2008 : Write A Small Application That Is Able To Read What Button Is Pressed On The Gamepad?

Sep 13, 2009

I have this gamepad: [URL]I want to write a small application that is able to read what button is pressed on the gamepad.I've seen this thread:[URL]but this does not read the input of the controller, it only initialize it.[URL]

View 7 Replies

[2008] Write A Small Application That Just Writes In Certain Cells Of A Set Page Of An Excel Sheet?

Feb 17, 2009

Basically, i have to write a small application that just writes in certain cells of a set page of an excel sheet, the sheet will always be the same layout.

View 2 Replies

VS 2008 Write A Small Application That Simply Monitors Website Watching For Specific Hyperlink Text To Appear?

Feb 11, 2010

I am trying to write a small application that simply monitors my web site watching for specific hyperlink text to appear. I have been searching around and trying different approaches for a few days and have to accept defeat on this.Basically I need to be able to type in part of a hyperlink or the actual text of the hyperlink into a textbox to be watched for. When it is seen it opens the link in a new window.

Dim theElementCollection As HtmlElementCollection
theElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
For Each curElement As HtmlElement In theElementCollection

[code]....

View 1 Replies

Using .net Windows Application.Application Containing One Process With For And While Loops?

Jul 23, 2009

Am using vb.net windows application.Application containing one process with for and while loops.When i click on stop button then it should stop processing and it should losd gui.

View 5 Replies

Creating A Small Admin Reporting Tool That Gathers Certain Information On Some PCs

Nov 25, 2009

I am creating a small admin reporting tool that gathers certain information on some PCs. Unfortuantly the user that is running the tool doesnt have access and I cant give access to those particular machines. What I have done is created a user on these machines that can get this information.I would like to then have the reporting tool run certain parts of the code as this user so the information can be obtained, without any intervention from the user running the tool. Can I hardcode this user into the code so that it runs the code as the user?

View 4 Replies

VS 2010 Creating A Shift Rota System For A Small Number

Dec 7, 2010

i am creating a shift rota system for a small number of staff basically there is a 3 week rota

week 1 - late
week 2 - early
week 3 - off

i am getting confused on how to calculate which week the member of staff is currently on eg week 1 / 2 / 3 i think i need a datediff with a mod to calculate it but thats where im getting confused (if im even right on that part)

View 3 Replies

SQLDataReader - Creating A Small Program To Read From An SQL Server, Loading Result Into An Array

Nov 15, 2011

I'm creating a small program to read from an SQL server, loading result into an array, pivoting the array to my liking and mailing it out to selected members of a group. It's going to be run once a day with Windows schedule. I have the connection, query and mail sorted, but not the datareader to array bit.

(line 26)?
Imports System.Data
Imports System.Data.SqlClient
Imports System.Net.Mail

[CODE]...

View 1 Replies

VS 2010 - Create A Small Game In VB2010 - Creating A GIF And Placing It In The Picturebox And Moving It

Aug 9, 2011

I'm trying to create a small game in VB2010. The gameplay is as follows:

civilians would walk/stand in a room/street and suddenly an evil character would pop from the ground/wall. This evil character would suddenly vanishes too. So, the player has to shoot it to kill the character. The evil character, civilians, etc. would be random. Also, there would be sound effects too. That is the popping up of the evil character, it's voice, the civilians voice, etc. I'm trying to make it as simple as possible but without degrading the quality of the game play. I think, I could somewhat create the graphics for the characters, scenes, etc. and can get the sound effects recorded.

So, the difficult part is,[ ] how could I make it a smoother for playing the game ?
[ ] what would be the best way to do animations ?
[ ] Creating a GIF and placing it in the picturebox and moving it ?
[x]how to play the music in background and at the same time play sound effects on certain instance ?

View 2 Replies

Monthly Payment Calculation, For Loops To Do While Loops?

Oct 8, 2011

the purpose of the program is to display the monthly payments on the loan.My homework is to use do while loops instead of for loop.Here is the code for the for loop.

Option Explicit On
Option Strict On
Option Infer Off

[code].....

Now I'm having some trouble displaying the output using the do while loop, and I'm pretty sure it's a loop problem on my code. However, I cannot seemed to find out what's wrong. I looked at the examples of do while loop in my textbook, but I couldn't find anything useful to my problems of my program.This is the output for the do while loop.

Here's the do while loop code

Option Explicit On
Option Strict On
Option Infer Off

[code].....

View 3 Replies

Series - Practice Loops In Console Application

Mar 19, 2010

To practice loops in console application more

sth like this one:

CODE:

so this is my code that worked but only gave 1 as an answer which is wrong

CODE:

View 12 Replies

[2008] Creating A Wpf Window Application?

Jan 19, 2009

What would be the reason of creating a wpf window application?

View 6 Replies

Contain Functions(They All Have For Loops) Don't Work In For Loops?

Mar 6, 2011

When I use a For loop in a For loop the Contains Statement dosen't work! Even my custom one! I even tested mine and it works 100% And neither that or the String.Contains function work inside of For Loops And, I know both of them use loops to search through a string.

My function(It will atleast search once):

Function RealContains(ByVal load As String, ByVal needle As String) As Boolean
load = load.ToLower

[CODE].....................

View 10 Replies

Arrays In A Small Application?

Mar 16, 2009

I'm having trouble getting started with this application I need to do. Here are the details:

Its an application to calculate student grades for a group project. Create a text file to store names of 5 students, line by line. In a separate file enter peer evaluations from 0 to 1.0. Enter these numbers for evaluations:

1.0, 0.8, 0.9, 1.0, 0.6
0.2, 0.9, 0.5, 0.6, 0.7
0.5, 1.0, 1.0, 1.5, 0.9
0.9, 0.9, 0.9, 1.0, 1.0
1.0, 0.9, 1.0, 0.8, 0.9

This means that student 1 gave 1.0 evaluation for himself , 0.8 for student 2, 0.9 for student 3 etc.Student 2 gave 0.2 for student 1, 0.9 for him- herself, 0.5 for student 3 etc. Read these into a 2-dimensional array. If any of the values is greater than 1.0, set them to 1.0. The program should calculate the average evaluation for a student. While doing so, the program should ignore evaluations that student gave to him-herself. Populate a list box with student names when the form loads. The user should enter a project grade (same for everyone) in a textbox. Then the user can select a student from a list and click �Calculate� button. The program should display the project grade for that student by multiplying average evaluation by the grade for the whole group (project grade).

View 13 Replies

Completing A Small Application?

Feb 15, 2012

What I'm trying to do its a small application to convert *.dat files to AVI this is an in house format that we use.I already accomplish listing a folder content in this case *.dat files, this seams to be working fine where I'm a little bit stuck is trying to call a dos program from the Convert button (Button2) what I need to be able to is to pick one of the *.dat files on the ListBox1 click on the button and voila the file is converted.this is how the little think looks[URL]..the dos program would actually be in c:videoserver and the program name is videoconsole.exe and this command needs an argument /f:

[Code]...

View 2 Replies

VS 2008 Creating A Password Application With Do Loop

Oct 19, 2011

VS 2008 Creating a Password Application with Do Loop

View 4 Replies

Make A Small Application With 6 Textboxes?

Mar 8, 2012

What am i trying to do is this:I want to make a small application with 6 textboxes, the user should only can type numbers and the numbers should not be bigger than 20 so then when u click a button (btn_1) it should write the numbers to a txt file.after that i want to read all this numbers and if there are some same (repeated) numbers to display them in a label.

dim wrt as new system.io.streamwriter ("c:/test.txt")

wrt.write (textb1.text & textb2.text & ......)

wrt.close()

View 9 Replies

Developed A Very Small In-house Web Application

Jan 13, 2011

I've developed a very small in-house web application with visual basic on VS2010. Can anyone give me any advice or literature s to how i can put the site on a server?

View 5 Replies

Thread Safety, Application Design - Console App That Loops Through A Queue And Processes Each Record In A Datatable?

Jul 25, 2011

I have a Console app that loops through a queue and processes each record in a datatable. Each process is long and time-consuming (connecting to a remote website, downloading files, reading them and adding them to the database). I'm trying to implement threading for speed's sake but am having cross-threading issues. (The job takes 8 hours or so to run and the cross-threading doesn't start happening until a couple hours into the run.)I'm trying to figure out how to make my code thread safe. I don't update or rely on any non-local variables, and I don't need to return anything. I've tried locking which works but defeats the purpose of the multiple threads. What other things should I be looking for?

[code]...

View 1 Replies

Creating An Excel Application In .net Using Visual Studio 2008?

May 11, 2011

I am creating a excel application in VB.net using VisualStudio 2008.while adding reference Microsoft.office.interop.excel we have both managed ( On the .NET TAB) and unmanaged (on the COM TAB).currently i am referencing the COM tab but it is not showing the errors properly.

can i use the excel interop on .NET tab?which one is the better way to reference and what is the difference between those two?

View 2 Replies

VS 2008 Creating A 'Visio' Like Drawing Application - Zoom

May 27, 2009

I have started a little project for myself to become a little more accustomed to drawing in VB.NET. I decided to make an application that looks a little bit like Microsoft Visio.

Until now, I have been able to create an image 'layer' on a blank PictureBox by clicking somewhere in the PictureBox. When I click on such an image layer, it is selected (and a blue rectangle, and its text are drawn). I can also drag the selected image layer.

The code for this is as follows:
The ImageLayer class:

vb.net
Public Class ImageLayer
#Region " Properties "

[Code]....

how to do all this; I'm starting to fear this project is going to be a little much for me...

So, do I really have to do everything manually? So the images locations, their size etc should all depend on the zoom level? Or is there something 'premade' I can use?

View 4 Replies

Make A Small Program For Ticketing On A Parking For A Small Hotel?

Aug 27, 2010

I need to make a small programm for ticketing on a parking for a small hotel.So i have 2 Printers pariking In (for delivery of the tickets) and 2 Readers PArking Out.Both Printers and REaders are working Serial.So i need to poll the serial ports of the printers and readers every second.The data is stored on a SQL database so i need to read and write in the database.Can i do this with 1 PC and 1 programm or 1 PC and 4 programms that are runnning at the same time ?

View 2 Replies

Make A Small Application To Print From .net 2010

Sep 16, 2011

I am trying to learn and make a small application to print from VB.net 2010 to my usb label printer.

View 3 Replies

Write A Small Application That Will Show GPU Temperature

Oct 19, 2011

I'm trying to write a small application that will show the GPU temperature.I'v found the following documentation about the subject: url...according to this documentation, I can use the nvcpl.dll file (which is a part of the NVIDIA driver) like this:[code]Now the problem is that this code keeps sending back 0, which means somethin is wrong here and the function is not working.

View 1 Replies

Writing A Small Application That Downloads Some Files Over Ftp?

Jun 28, 2010

I'm writing a small application that downloads some files over ftp, the incoming directory is monitored by FileSystemWatcher_Created, on creation I want to extract some text from the file and call another application with the text as parameters the problem I have is the FileSystemWatcher_Created procedure is triggered before the file has finished downloading, I could download it elsewhere and move into the monitored directory but some of the files may be quite large and Im wondering if there is an efficient way of waiting until the file is ready? along the same lines what is the best way to queue the tasks as there can be many files coming it at one time, I've looked at threading but would that be suitable for such a task as there will still be a bottleneck at the application called by FileSystemWatcher_Created ?

heres an outline of what im doing:

Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
'read text file

[code]....

View 1 Replies

VS 2008 Creating Folder Structure In User's Application Data?

Mar 16, 2010

I want to store my log files in the user's Application Data folder (to avoid all the hassle with Windows 7/Vista UAC permissions). By default, though, the app creates the folder structure like thisAppData/CompanyName/AssemblyName/AssemblyVersion/I just want a single folder without the AssemblyName and AssemblyVersion. Other than removing that info from the project, is there any other to just create a single

View 1 Replies

For..Next Loops VB 2008?

Dec 7, 2009

have a problem where I have an application that allows someone to enter two integers. The app then displays all the odd numbers between both integers and all of the even numbers between both integers. There are two text boxes and two labels: even and odd. How would I code a For..Next loop for this type of app. The part where I get confused is what do I determine and how do I

View 18 Replies

Build A Small Application That Will Automatically Visit A Few Websites?

Jun 19, 2010

I'm trying to build a small application that will automatically visit a few websites. The list of the websites I want to be stored inside a txt file like:

website1.com
website2.com
website3.com

and when I press the "Start" button, my application will open the websites from the txt file, one by one with a delay of 10 or more seconds before loading the next website, in a webbrowser control.

View 6 Replies







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