Make It Have A List Of Space Craft?
Sep 4, 2011
I have the design view started but not finished - but I am not sure how to do it.I am new to VB and dont really know how to do much... I want to make it have a list of space craft. It will be 2 main categories... Jump Ships / Drop Ships. Jump Ships will need to be a random number of them pulled from the list (1+ jump ships) but each one has a number of Drop Ships it can carry. Drop Ships will need to be less than or equal to the number of slots on the combined jump ships. So if it pulls up 1 jump ship that jump ship can carry 1-9 drop ships and then it needs to randomly list that many drop ships from the list of drop ships. Then each drop ship can carry certain types of military units - lets call them A, V, M, I.When it makes the list I would like it to pull a random jumpship (preferably 1-3 from the list), then it needs to check how many dropships that jump ship (or group) can carry and randomly select that many drop ships from the list of drop ships. Then when it has those pulled it needs to add up how many units of I,M,V,A they can carry and post those to either a label or whatever. So right now I have a menu strip which will have exit/info, I have a label and text box to name the unit and then I have a button that will be used in order to generate the unit. I want to use a listbox in order to put the list and have it organized as Jump ships and then drop ships.
Can someone point me in the direction of what way would be best to make the randomness, how best to store the info (it would be nice to be able to add new ships to the lists), and just in general the best way to begin the project? I have a label with the text "Name your unit: " and a textbox (textbox1) which is there for the user to put the name of their unit in, and then I have a button I will use to generate the results. My current thought is to use a list array (not sure that is what it is called) to randomly grab ships (but I do not know how to use the # of drop ships to add to it or anything)..
[Code]...
View 6 Replies
ADVERTISEMENT
Sep 25, 2011
How would i get a certain text inside a textbox to equal that text space to space or null to space?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Textbox1.Text.StartsWith(Textbox2.Text + " ") And Not String.IsNullOrEmpty(Textbox2.Text) Then
Textbox1.Text = Textbox1.Text.Remove(0, Textbox2.TextLength)
Textbox3.AppendText("a")
End If
Btw: after i finish this step my project will be finished!
View 4 Replies
Oct 19, 2011
I have an xml file with elements that look like this (abbreviated for clarity):
<post id="1" tags="tag1 tag2 tag3 tag4" />
I want to map this to the following class using Xml Deserialization, but I can't find a way to map the tags attribute to an actual List(Of String).
<Serializable()> _
<XmlRootAttribute("post")> _
Public Class Post
[Code]....
Is there any way to override the default Deserialization?
View 2 Replies
Apr 10, 2009
I'm trying to make a space invaders rip off, and I'm currently stuck on how to make the missile fire from the center of the player's ship. I have the missiles all in a control array, and they move up the screen fine, they just dont start at the x point of the ship, they start on the left margin.
Dim Line As Integer
If Missile(0).Location.Y < 391 Then
Missile(0).Location = New System.Drawing.Point(Line, Missile(0).Location.Y - 5)
[CODE]...
View 8 Replies
Dec 26, 2009
I'm new to database design and am using Visual Basic 2008 Express.
View 5 Replies
Apr 5, 2012
I want code for RichTextBox when I write text it make space automatically before and after some character like Spacial symbol example , I write in RichTextBox this statement :
array()={1,2,3,4}
when I press ENTER this statement change to :
array ( ) = { 1,2,3,4 }
make space between spacial symbol and other character automatically
How I do that In VB.NET 2008?
View 9 Replies
Aug 22, 2010
I'm trying to make the progress bar to display the amount of free space C: has. I have successfully do so with my code which is:
Vb.net
Try
Dim b As String
Dim c As String
Dim dvr As New DriveInfo("c:")
b = CStr(dvr.TotalSize 1000000)
c = CStr(dvr.AvailableFreeSpace 1000000)
[Code] .....
As a last touch to this code I thought I would add a percent bar so it would look more professional. I did so with:
Dim Per As String = (c b * 100)
The problem is that it displays always zero percent why?
View 5 Replies
Nov 5, 2011
I wish to make a project where a teacher views a list box with a list of students of a class. When he selects a name from the first list box the second listbox would change its data to show the grades for that one student.
View 10 Replies
Sep 8, 2011
I am wondering if anyone has any idea how to make the controls stack and fill up the available space left by a control if the control is hidden or removed from the UltraGridBagLayoutPanel.
Example:
[Textbox 1]
[Textbox 2]
[Textbox 3]
[Textbox 4]
[Textbox 5]
If I hide [Textbox 3] as of now, it will disperse the space left equally and pad the remaining text boxes with the space. However, I would like it to do this...
[Textbox 1]
[Textbox 2]
[Textbox 4]
[Textbox 5]
Where all the text boxes will move up and [Textbox 4] will completely consume the space left by [Textbox 3].
View 1 Replies
Sep 8, 2011
I am using a picture box. I want to be able to use the Space or Enter key to change the image in it. For that, I try to use the keydown function as follow:
Private Sub ChestWindow_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.NumPad1[code]....
is the function which changes the image. It works well when I press '1' on my numeric part of the keyboard as a test.The issue is that when I press Space or Enter, the form containing the picturebox closes. (I've already put the keyPreview property to True)
View 13 Replies
Dec 25, 2011
I basically want to implement a list, but have it hold other lists.
View 7 Replies
Aug 14, 2010
Ok now im trying to make a list of EXE's in a certain Directory (C:Program filesKintergamesGames)
Here is the code
Dim di As New IO.DirectoryInfo("c:Program filesKintergamesGames")
Dim diar1 As IO.FileInfo() = di.GetFiles()
Dim dra As IO.FileInfo
[Code]....
View 4 Replies
Jun 23, 2009
I want to try/use this code [URL] now im stuck with the last part, how can i make an Array list?
View 5 Replies
Jan 13, 2010
I'm creating a simulation programe. In one sheet I have a group of cells (AngleConf) that have a drop down list. I would like to make some operations when I change the value of one of these cells. It always works when I insert the new value manually. But it doesn't always works when I change it by selecting the value from the list. I supose that that happens because of some option that I change while I'm working but I can't find out witch one exactly.The code that I think that its implicated:
Sub Worksheet_Change(ByVal Target As Range)
If InRange(Target, Range("AngleConf")) Then
Call resistance 'Actualiser le r�sultat mecanique
[code].....
View 1 Replies
Feb 28, 2011
How to make sure that combo box value is one from it's list?
I don't want to use DropDownStyle property as DropDownList because I have to allow user to write into the box with help of AutoCompleteMode but I have to make sure that inserted text is one offered from the list.
View 3 Replies
Jan 22, 2010
I am trying to make the output appear in a list box that only appears after the button is clicked but cannot figure out how to make the list box invisible until the button is clicked. This is VB 2008 code.
Here is the code I have so far:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
calculatemeals()
[Code]....
View 3 Replies
Jul 20, 2009
I have a small nooby program that I made that just spams a word or phrase that I type and I can set the intervals for how quickly I wanted.
But I was wondering, if I had a txt file with a list of words on it how could I integrate that list of words into my spammer so It would type 1 word on that list and then erase it and enter the next word down the list and so on.
View 5 Replies
Sep 13, 2010
How can I create images on ComboBox list
View 3 Replies
Nov 10, 2009
I'm trying to figure out a code to do the following:If the item is found in the list box, make the item in the list box selected.
View 8 Replies
Apr 14, 2011
Function Monitor() As ActionResult
Dim db = New QuarterDBContext()
Dim items As IEnumerable(Of SelectListItem) = db.getQuarter.[Select](Function(c) New
[code].....
View 36 Replies
Sep 15, 2010
How would I make use of a List(of String) in a structure in vb.net. for example
Structure examplestrut
Public exampleslist As List(Of String)
End Structure
How would I call exampleslist.add("example 1")?
View 1 Replies
Sep 12, 2009
I have made a program that makes and saves every possibility of characters under 7 characters (so far), and it takes about 10 mins to make one million possibilities... this is about 1800 possibilities per second (differering on different CPU's and RAM's)How can i make it more efficient, because i have made some basic calculations, and if i wanted 7 digits of every possible character combination, it will take about 7 billion possibilities... If i had 10 mins per million, that is a long time..
View 8 Replies
May 7, 2010
ok so this is what im trying to do. I want to export a list will all valid emailsThis is what I have in my list viewo when I press export List I want all items to be valid on be saved in a Txt file.I tried
vb.net
for Each Valid in Listview1.items(0).subitemrichtextbox1.text = listview1.items(0).subitem("Valid").textnext
[code].....
View 5 Replies
Feb 3, 2010
I am working on a Card game, and i have a little question. I want to put all the cards in a array or list. The problem is that the list need to be shuffled/randomised. But it should also be able to shrink. Witch of those 2 is better to use? And how can i shuffle them?
View 7 Replies
Jul 2, 2009
how do i make an event for only one checkbox in the checked list box ie there are 3 items
item A
item B < this one needs to have the event...
item C
View 4 Replies
Mar 25, 2012
Is there a succint way in vb.net to create an array or similar of each of the properties in a list?
E.g. If I have a list of 'a' and each 'a' has a property 'b', I want to create an array which contains all the 'b's, in the same index positions as the original list.
View 2 Replies
Mar 6, 2009
What control should I use to create a grid like a ListView or Excel grid?
View 1 Replies
Jun 9, 2011
I am trying to make a program that consists of two list boxes. The first list box contains the names of several employees of a given company, and the second is to display the name, department, ID number, and phone number of the person when the name is double clicked in the first list box. The file I have been given to carry this out with reads as follows. [code] I have no idea what I am doing.I know that I have to use the system imports streamwriter and streamreader, but I really am lost as to how. I don't even know where to begin really.
View 3 Replies
Jun 19, 2012
I want to make a ToDo list with extra info, like this:
Activity1
- Place
- Start time
[Code]....
I want to be able to show and hide the 'place, start time, end time, etc' with a button. I thaught it might be usefull to use Treeview for this, but how do I use Treeview? I got textboxes for activity and place and etc., datetimepicker for start and end date/time. how to use treeviewer for this?
View 1 Replies
Aug 21, 2009
I have a menu strip, which i want the drop down items to show when i move my cursor over it.
View 3 Replies