Make A Procedure That Checked If The Xy Position Of One Is Near Another?

May 23, 2012

For a final project in my VB Class, I am making BattleShip. I have all the coding done to place ships and guess others, but my ships are able to intersect. I am having a hard time thinking of how to stop this. I could make a procedure that checked if the xy position of one is near another, but that would only allow it to not intersect at the base point.

How might I get this to work with minimal code that doesn't allow the ships to intersect anywhere? (i.e. the middle of two pieces overlapping)

View 2 Replies


ADVERTISEMENT

Datagridview - Make Checkbox Being Checked

Mar 20, 2011

[Code] The code is to make when one checkbox being checked, other checkbox within the gridview will be unchecked. But this code did not work at all. Is it my event handler wrong or code problem?

View 6 Replies

Make An Event For Only One Checkbox In The Checked List Box?

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

Make A Check Box Change Color When It Is Checked?

Jul 14, 2010

I want to make a check box change color when it is checked. In looking for answers it appears there used to be a fill color option in the properties, now in there is just back color and fore color. I am using VB 2008 Express.

View 2 Replies

VS 2008 Make A Simple Sum Of The Checked Values?

Nov 4, 2009

I have a (checked) listview with values in the subitems. I am trying to make a simple sum of the checked values, but I can't seem to get it to work. The values returned aren't correct.

The idea is that each time I check or uncheck a row it re-calculates the values from subitems(2).

Here's what I was trying:

vb.net
For i = 0 to Listview1.CheckedItems.Count - 1 Label1.Text = CDec(Listview1.CheckedItems(i).Subitems(2).text) + cdec(Listview1.CheckedItems(i).Subitems(2).text)Next i

I have (text) values like 77.50, 115.60, etc.

View 3 Replies

Way To Make Clicked Context Menuitem Checked?

Apr 13, 2010

is there a simpler way to make the clicked context menuitem checked? Because e.clickeditem has no checked property.[code]

View 5 Replies

Make A Checkbox Save If Its Checked When A Form Closes?

Oct 4, 2009

Understandable Answers

1 2 3 4 5
- - - - - Rate yourself And Have A Kitkat
5 5 5 5 5

View 16 Replies

Make A Checked List Box Behave Like A Radio Button?

Feb 27, 2009

Is it possible to make a checked list box behave like a Radio button?

View 1 Replies

Make Display Status Of Checkbox Checked In Datagridview?

Apr 29, 2012

I have a datagridview with 3 columns 1-ID, 2-CategoriesName, and 3-Select

I want to make the status with label status that can be show to users the numbers of categories were selected by checkboxes (It's mean that count or sum the rows been checked by checkbox on each row) and this is the code i got from searching true or false because it did not work so please need helping from forum to steering me in the right direction.

Private Sub dataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs)
Dim dgv1 As New DataGridView()

[Code].....

View 7 Replies

Make Mouse Go To On Position?

Jun 15, 2009

Now I got this "problem"... I'm making an application in Visual Basic 2008 Express Edition with some mouse options, and I was wondering... Do some of you have a clue on how to make the mouse go to on position, right click, move somewhere else, and left click, and then repeat it a X amount of times? The X should have the options to change its value.

View 1 Replies

Make Every Checkbox In A Checked List Box Generate Its Own Click Events?

Oct 9, 2009

How to make every checkbox in a checked list box (VB 08) generate its own click events .

View 1 Replies

Change The Font To Bold If The Box Is Checked To Make It Stand Out In The Document

Dec 9, 2010

I have a form that has 35 checkboxes. I would like to change the font to bold if the box is checked to make it stand out in the document.

View 12 Replies

Make NOT Start From 0,0 But Current Position?

Mar 30, 2012

Private Sub Button7_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button7.Click

[Code]...

oook so this when button7 clicked it will move my mouse to the X:700 and Y:700, but will start from the X:0 and Y:0 but i tried making start from my current mouse position but idk how not working:

View 11 Replies

Make Program Click At A Certain Position?

Aug 27, 2010

I want to make a program in Visual Basic 2008, that moves the mouse to a certain x and y cordinate, and then left clicks, but i am having trouble creating a click operation once it is at that pixel. Can anyone help me make my program click once it is at that pixel?[code]...

View 3 Replies

Minesweeper :: Make Verify Position?

Apr 30, 2012

So I'm developing a minesweeper game and im assigning the mines, but i'm unable to create a algorithm to stop a mine to go to a place where there's already a mine, here's what i have so far:

Public Sub initflags()
Dim line, column As Integer
For line = 0 To 9

[code].....

View 2 Replies

How To Make Stored Procedure

Jun 8, 2011

here willing to educate me about stored procedures, populating the datagridview, and using some bindingsource with 4 butttons, <<,<,>,>>i'm a newbie vb.net programmer willing to learn the use of stored procedures..

View 4 Replies

Make A Procedure To Execute Only Once?

Jun 6, 2012

How to make a procedure to be executed only once when an application is installed freshly.

I mean if my application is installed, i want to execute a procedure only one time at the first use of the application.

View 3 Replies

Make A Sub Procedure For Key Press?

Nov 13, 2010

In my mini program, I want to make it so that if the user presses the backspace or carriage return key, they call a subroutine. I have already written the subroutine, and have no problems there. I want to make it so that if they press the backspace key, they trigger one sub, and if they press the carriage return key they trigger another. I also want to make it so that the key presses are global, i.e not only counted when they have their cursor in a certain area e.t.c.

View 1 Replies

Javascript - Insert Checkbox Checked Value When Checked To Textbox As Comma Separated String

Nov 9, 2010

Insert checkbox checked value when checked to textbox as comma seperated string in vb.net or javascript

suppose i have 3 checkboxes and and 1 textboxes in my webpage.aspx

when i checked checkbox1 and checkbox2 then in textbox it will appear as 1,2 only on checkboxes checked event ...

and i want its revert also :

if i set textbox de

View 1 Replies

Make Relative Cursor Position On The Form?

Jun 3, 2012

I am working on a screen cropping program. The program works by expanding the current for to maximum and the opacity level set to 35% so the screencan be seen from behind. The cropping code is below:

Private Sub disect_mouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
Me.Opacity = 0

[code]....

View 14 Replies

Make Webbrowser Show Certain Position Of Webpage?

Aug 9, 2011

I have a web browser in vb.net and i want to make a chat box but the chat box is private source so i have to actually direct it to the site so what i am asking is how can i lock the web browser to the exact position of the chat box ?

So at the moment it loads the whole page i just want it to load to the position of the chat

View 2 Replies

Checked List Box Checked Data Pass To Listview [with If Uncheck It Is Removed]

Sep 22, 2011

my form contains a checked list box [data coming from the database] a combo box [bind to a database table product] and a listview [was previously a listbox]

[Code]...

View 5 Replies

Loads Up 4 Images If Usb Stick Is Checked And A Different 4 If Memory Card Is Checked?

Feb 20, 2010

project im working on for my course,the idea is a photo printing machine that loads up 4 images if usb stick is checked and a different 4 if memory card is checked. and then whatever image is selected appears in the big picturebox on the left [URL] i have 2 print size options set as radiobuttons, radiobutton 1 = 6x4, which costs 25cent per photo, radiobutton 2 = 8x10, and is 50cent per photo.i also have a textbox which will display the number of copies to be printed So here's my dilemma, when the print button is selected alongside one of the radiobuttons i want it to display a message saying something like this "you have selected (whatever the amount of copies)of this photo sized 6x4, or 8x10 depending on which radiobutton is selected, and i want it to display the total cost which is the number of copies multiplied by the rate for the print size selected, then an option saying "Do you wish to proceed" Yes or No.

I did something similar to this in class earlier in the year but cant remember it, it was an airline booking program with 3 types of payment cash, visa or mastercard,upon booking a message popped up saying there is a certain percentage discount for using visa or mastercard

View 5 Replies

Forms :: Radio Button Checked And Not Checked At Same Time

May 15, 2010

im making dynamic sql statement rmode is a radio button and tmode is a combo box

[Code]...

View 2 Replies

Got A Checked Listbox On Form Which Saves The Checked Items?

Jun 6, 2012

I've got a checked listbox on my form which saves the checked items to a spot in my database on the .ItemCheck event.But there's a problem, when I begin checking items, I check the box and click off it, but it doesn't save. (This is if I've only chosen one item)

If I choose two or more items it will save, but unchecking them takes a lot of clicking around to figure it out.Is there a better event that I can use? I've tried the SelectedIndexChanged and that has the same result, there's a lot of clicking around in the checkboxes to end up with the desired selected items, and it does not allow a single item.

View 6 Replies

Can't Make Application Window The Size And Position Saved In Registr

Dec 12, 2011

No matter what I've done, I can't make my application window the size and position saved in the registry. Below is the code at the end of my Form1_Load: [code]

View 1 Replies

Listview Checked Item - Get The ID Of The Person Whose Box Is Checked With Sub

Apr 30, 2011

In a listview with check boxes, there are two fields being loaded, ID and Lastname. With this information I want to get the ID of the person whose box is checked with this sub:

[Code]....

View 3 Replies

VS 2008 Checked Treeview Get All Checked Nodes?

Sep 22, 2009

I trying to get what I think should be a simple thing. I have a checked treeview. I need to get the text of each checked node into a string. For the life of me I can't get it. I am trying to loop thru all the nodes and see if they are checked but I keep getting a "object reference not set to an instance of an object" but I don't know why.

Dim value As String
Dim node As TreeNode
Dim i As Long

[Code]....

View 2 Replies

Select A Character By Position To Make Bold In A Rich Field Text Box In VB 2008?

Aug 2, 2010

I understand that within a rich field text box you can search for a string and then format that string, but I am looking to change the formating of a certain position in a string regardless of what character is at that position.Can this be done in VB 2008?

View 3 Replies

Working With Arrays - Make It Global And On Form Load I Wanna Show It's First Position And On A Button' S Click

Apr 8, 2012

Dim LabelArray(12) As Integer
LabelArray(0) = Label3.BackColor = Color.White
LabelArray(1) = Label4.BackColor = Color.White

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

i have made an array. first of all i want to make it global and on form load i wanna show it's first position and on a button' s click i want to increase it's position by one how can i do that

View 2 Replies







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