Make Multiple Enemies Without Creating A Bunch Of Pictureboxe?

Nov 13, 2009

I have got one picture box to appear from a random point at the top of the form and move down the screen.

But how do I create an infinite amount of these enemies that will travel down the form?

The only way I know how is to just create a bunch of picture boxes and hide them all, and then each time a timer clicks one of them is visible, and starts traveling down the screen. There must be an easier way.

View 1 Replies


ADVERTISEMENT

Creating A Bunch Of Child Forms

Mar 19, 2012

Is there a quick way of creating child forms? I am going to have 20+ and all the code I can find is this below:[code]Can I not make a subroutine and send the form into it to be made a child form? Something like this pseudo code:Is there a fast way like this available?[code]

View 3 Replies

Creating A Bunch Of Child Forms?

Mar 19, 2012

Is there a quick way of creating child forms? I am going to have 20+ and all the code I can find is this below:

Dim MDIChildForm As New form2()
MDIChildForm.MdiParent = Me
MDIChildForm.Show()

Can I not make a subroutine and send the form into it to be made a child form? Something like this pseudo

Private Sub setChildForms()
createChildForm(form2)
createChildForm(form3)

[code]....

View 15 Replies

Creating A Variable For Bunch Of Stuff?

Mar 1, 2012

I want to create a variable that will hold bunch of stuff.

I will be using over 50 IF statements (it's a complicated number game) and the IF statements will be something like this.

If something = 1 then
' do this
' then do that

[Code]....

View 12 Replies

Make A Bunch Of 2d Arrays To Access The Independant Values Easily?

Jun 18, 2009

I need to make basically a bunch of 2d arrays, that I can access the independant values easily. Like multiple properties As an example:

[code]...

Because later I have to access Value1 in a manner that spells out each independantly. I have used some basic Structures to define 1 property and does something with it. But not 2 properties, and I am out of my norm on creating a Class to do something like this.

View 14 Replies

VS 2008 Make A Program Which Takes A Bunch Of Inputs (Name, Age, X2 Score Results)?

Mar 12, 2011

I've recently started programming for Visual Basic Express - 2008, and I'm currently trying to make a program which takes a bunch of inputs (Name, Age, x2 score results) and then turns this into an output at the end which varies depending on the score results.

I've stumbled upon a small hinderance, which is that the very final stage which has a Console.Writeline does not appear after testing the program. So, everything else functions fine, but as soon as it gets past the "Console.WriteLine("All pupils have been calculated, the results are...")" command the program closes itself.I'm not looking for much help, just wondering exactly what is causing this to happen. I also realise that my coding is sub-par and is coded in a slightly odd fashion, but I'd rather just get this one to work and use the mistakes from this one to correct my future work.

View 5 Replies

Game Is Generating Enemy Bullets From Already Killed Enemies

Nov 26, 2009

I am creating a game for my class, it is above the level that I know a bit, but I have learned a lot from creating it.

This is how it it works:

-Every time a timer ticks a picturebox is created and displayed on the form, the picturebox is added to a collection. These enemies then move down the form

-My character fires bullets, and when they hit the enemy the enemy and the bullet gets disabled and removed, but not from the collection

-I have another timer that when it ticks, a random number is generated between 1, and the enemy collection count, so that a enemy missile can randomly come out of an enemy

This all works, but after the enemies are hit and removed from view, bullets still get generated from spots where the enemies once where, so to me that means that the destroyed enemies still remain in the collection.

If I try to remove the picture box from the collection I get an error.

View 3 Replies

Game Is Generating Enemy Bullets From Already Killed Enemies?

Nov 24, 2009

I am creating a game for my class, it is above the level that I know a bit, but I have learned a lot from creating it.My problem is that when my user (doctor) sends out a bullet and it hits the enemy (the enemies are generated into a collection), the picturebox is disabled and no longer visible, but that picturebox spot in the collection for all the enemies is still there.

So when I generate a bullet and shot it from a random enemy in the enmCollection, sometimes that random enemy is one that is already been killed.I tried using enmCollection.Remove(..) whenever the collision with the enemy and a bullet occurs, but it gives me an overflow error or another error.

I've been trying for a day now.Everything in the game works correctly except for this.

[Code]...

View 2 Replies

Making A 2D Game That Has A Player (me) That Shoots Bullets (pictureboxes) And Kills Other Enemies?

Apr 22, 2011

I am making a 2D game that has a player (me) that shoots bullets (pictureboxes) and kills other enemies. The problem is that when there are many bullets on the screen it gets very slow because it has to move every picturebox.

View 11 Replies

Made A Listbox, And Also A Custom Class Called "Enemies"

Mar 26, 2010

So I made a Listbox, and also a custom class called "Enemies". I used a Bindingsource to Bind "Enemies" to the Listbox. "Enemies has three properties which are: "Name as String, Health as String, and Dead as Boolean".The thing I need is when I add a Enemy to the listbox, I want the BackColor of the item to either be Red or Green, depending on if the Item.Dead property is false or true.

View 2 Replies

Creating Xml From Multiple Tables?

Jul 17, 2010

I have 3 tables: Customer, OrderHeader and OrderDetail. Customer and OrderHeader joined by CustomerId, OrderHeader and OrderDetail joined by OrderId.how to create an xml file that combines these 3 tables together having the following structure using ADO.net?

[Code]...

View 5 Replies

Creating And Aborting Multiple Threads

Sep 28, 2010

To get pass the cross referencing error when running a thread, I use this code

[Code]...

But the AddressOf doesn't accept parameters... So how do I get pass that? Or is there another way to use delegate?

View 6 Replies

Creating Application With Multiple Printers?

Aug 15, 2011

I have multiple forms and reports with different print area. Some are designed to print to a thermal label printer and others to department shared printers. Currently the user is able to change the printer in print dialog box and print to differernt printers. I want to be able to create a form where the user can assign different printers for different jobs and not have to worry about it.

The problem is, i have never worked with printing function and my collegues arent too smart so I was wondering if someone can throw me ideas on where to start so i can start googling for it.

View 1 Replies

Creating Installer With Multiple Applications?

Mar 4, 2010

i have published my project and exe file has been created....

now i want to make a installer with some other applications...i have

myproject.exe
.netframework 3.5
adobeflashplayer.exe

now i want to make a single installer that should install these application at once...how should i do that

View 2 Replies

Creating Multiple Controls At Runtime

Jan 21, 2012

I know how to create a control at runtime e.g.[code]Can anyone tell me how to create multiple instances using a for-next loop? e.g.[code]The part I can't work out is how to give each new button a new name... like button1, button2 etc

View 4 Replies

Creating Multiple Excel Charts With .net?

Feb 26, 2012

I'm trying to create multiple Excel charts, in one work sheet using VB.net.This is the code:

Code:
'creating the chart
Dim chartPage As Excel.Chart
Dim xlPump1Charts As Excel.ChartObjects

[code]....

View 1 Replies

Creating Multiple Folder Shortcuts

Mar 19, 2010

When I programmatically create a shortcut to a folder like this:

CODE:

All works fine.

But I need multiple shortcuts. I tried this:

CODE:

But it seems that VB NET is creating the shortcuts over the previous ones and all that I have after runtime is the last one - a shortcut to C:.

How can I create multiple shortcuts to multiple folders in the same folder?

CODE:

View 2 Replies

Creating Multiple Instances Of A Form?

Aug 12, 2009

I have a form (form1) and I havea button on form1 (button1) that will start a second form (form2).How can I make it create multiple instances of form2 when button1 is clicked?i tried a process module that the studio comes as standard but it does not allow me to start multiple instances...how can i do this?

View 14 Replies

Creating Multiple Paint Methods?

Sep 5, 2010

im trying to make multiple methods that handle painting on the same form. right now i just got the one and its the built in form paint one:

Private Sub Form3_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

but when i go to create my own method i start getting issues with the value of e when i use a method like

e.Graphics.FillRectangle

how do i define e and set up my own private sub paint()

View 4 Replies

Creating Multiple Sql Stored Procedures From .net?

Jun 21, 2010

I'm creating a database installer where I have some code to create database, tables, stored procedures, etc.I don't have problems when creating the database, tables and inserting required data. My problem is when my code gets to the stored procedures section.

Here is what I do:I have different text files (database.txt, tables.txt, insertdata.txt, storeprocedures.txt) where my sql syntax is located.I execute every process/text file using the following:

ExecuteSql("master", GetSql("database.txt")) ' Creating 1 database.
ExecuteSql("mynewdatabase", GetSql("tables.txt")) ' Creating 15 tables.
ExecuteSql("mynewdatabase", GetSql("insertdata.txt")) ' Inserting data to many tables.
ExecuteSql("mynewdatabase", GetSql("storeprocedures.txt")) ' Creating 6 stored procedures.

Here is part of the error:In exception handler: Incorrect syntax near the keyword 'PROCEDURE'. "This is the second stored procedure because the variables I get below belong to the second one"

Must declare the scalar variable "@intVariable1".
Must declare the scalar variable "@intVariable1".
Must declare the scalar variable "@intVariable1".
Must declare the scalar variable "@intVariable1".

When trying to create 6 or even 2 stored procedures using the same file 'storeprocedures.txt' is not possible. If I leave just 1 it works but I really want to keep them together.

Creating 15 tables using the same file 'tables.txt' works, inserting data in different tables using the same file 'insertdata.txt' works.This is the general syntax I use:

Create Procedure sp_stored1
@intVariablex int
As

[code].....

Is is possible to create more than 1 stored procedure the way I'm trying to?Do I need to end every stored procedure with specific sql syntax, other than the 'end'?

View 3 Replies

Creating Multiple Sql Stored Procedures?

Aug 15, 2010

Creating multiple sql stored procedures

View 4 Replies

Creating Settings For Multiple Users

Jun 28, 2011

I have a form which has a textbox named "textbox1", and a button named "Button 1". Button 1 is meant to be a submission for textbox1 (i.e. when button1 is pressed, the value of textbox1 is saved and remembered). I want the value of textbox1 to be remembered on any computer, but I need it to be update-able too. I tried using settings to do this like so:

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = My.Settings.TextBox1

[Code]....

but the problem in doing this is it only works for the current user. When the application is then put on another computer the value is blank.

View 4 Replies

IDE :: Creating A Solution With Multiple Projects?

Aug 20, 2009

I thought I'd give VB a go after developing with C# for the past few months. I'm using Visual Studio 2008 and have imported the VB IDE settings. I'm going through the same steps in VB as I've gone through in C# to create my solution for an n-tiered ASP.NET web application, but the results are unexpected. Here's the steps:

1. File > New Project > Other Project Types > Visual Studio Solutions > Blank Solution .... name the solution & choose the location ...

2. At this point, I want to proceed to add projects as follows by right-click on the solution in solution explorer

a. Add > Visual Basic > Web > ASP.NET Web Application ... name / location of the Web Client

b. Add > Visual Basic > Windows > Class Library.. name / location of the Business Layer

c. Add > VB > Windows > Class Library ... name / location of the Data Access Layer

BUT, as soon as I complete step 2a, the solution disappears from solution explorer. "Show all files" is selected. This happens regardless of the project I create first.

View 4 Replies

Sql - Creating Treeview With Multiple Levels?

Mar 20, 2012

I have a requirement to create a multi level treeview in ASP.Net (with VB) but I am completely stuck on how to start this. Currently my treeview is a fixed 2 level approach but now I need to rewrite this to be more dynamic and support extra levels being added into our database tables.So this treeview needs to support as many levels as needed without having to rewrite any code each time we want to add new level, Ideally we will just insert the data at the database level.I think I have the database part designed correctly, I created 2 tables Menu and MenuItemsMenu has 2 columns ItemID and ChildIDMenuItems has 2 columns ItemID and Description Doing this query:

SELECT
menu.Item_ID,
menu.Child_ID ,

[code].....

View 1 Replies

VS 2010 Creating An Application For Multiple OS?

May 25, 2012

I'm trying to develop an application in VB 2010 that will monitor files in a directory that the user specifies. The problem is, this application is going to be installed in diferent computers with diferent Operative Systems (windows 2000 and XP).Is this possible? or should i change mi programming lenguage?Another thing that comes to my mind is that maybe i should use diferent frameworks (i'm afraid that framework 4.0 may not work in Windows 2000).I apologize if i'm posting in the wrong place, i'm new here.

View 2 Replies

Creating Array For Multiple Choice Questions

Nov 3, 2011

I am in the process of creating an array for a set of multiple choice questions but I am having a few problems. I am an absolute beginner at VB and I am creating a quiz that users will select one of three possible questions and then depending on their answer a +1 value will be added to the score. However I do not know where my questions and answers are supposed to go, from what I have read online I have to use (0, 1) format to give possible answers but I do not know how I would make the questions and answers display in textboxes on my form. At the bottom of my code I have also included code to randomise the questions although I am unsure as to if it is correct. At the moment I can run my form fine without any problems but my main issue is to how I will get the questions and answers linked to my textboxes on my form.

Public Class frmTest
Private ran As Random = New Random()
Public intScore As Integer
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
'Turns the message box invisible when start is clicked
lblMessage.Visible = False
[Code] .....

View 5 Replies

Creating Multiple Form Instances In A Subroutine?

Aug 23, 2010

I am trying to create a subroutine that creates multiple instances of a specific form.

Here is my code:Public Sub NewFormInstance(ByVal FormName As Form)

Dim FormInstance As New FormName
FormName.Show()
End Sub

View 3 Replies

VS 2008 : Creating A File With Multiple Sections?

Jan 29, 2010

Is there a preferred method of creating a file with multiple sections? For example a program for a small retail business that might include different categories of sales, etc.I've come up with a primitive way of separating sections of a text file, which I can read and write right now, but I'm not confident that it will always work. I have a feeling it could produce an error down the road.

View 6 Replies

VS 2008 Creating A SQL Statement With Multiple WHERE Conditions?

Feb 27, 2010

I am trying to write a Function which will return a data table, filled with a data from a database.

The Function will accept 6 diffrenet parameters as Optional. Each one of them will be an additional condition to be added to a where clause, if it`s provided when the function is beeing called.

Is there any method in .NET to simply add a new condition to the where clause?

View 10 Replies

VS 2010 - Creating Multiple Instances Of Subs

Jul 31, 2011

I'm creating a twitter account manager using the Twitter API. I have multiple accounts, over 10 of them. I want to automate all 10 of these accounts to do certain things, now the way I started to code the program was so that it would accommodate only one account, and all the codes worked perfectly and were managed by individual timers for individual processes that I wanted done. i could tweet between certain intervals, follow people who tweet certain things without me being on top of it.

Now the problem is that I've been trying to create new instances of subs that I've already created so that I dont have to create 10 new subs with the exact same procedures. I'm pretty sure it's impossible to create copies of subs dynamically or within a loop but it didn't stop me from trying. So question is how can I edit a program that was designed to accommodate and automate only one account, to potentially accommodate over a 100? I don't need codes or anything I need ideas so I can try them, but right now I'm completely blank.

View 2 Replies







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