Make RadioButton Only Usable A Limited Number Of Times?

May 15, 2009

I need to know to limit the number of times a radio button can be used. Maybe the number of times the radio button has been used can be stored in an XML file, and when the user wants to reset the counter all they would have to do it delete this file. I really don't know, that's why I'm asking you. But,the program will append a string every time a button is clicked with a radio button selected, I just need to know how to, for instance only allow RadioButton2 to be used in this manner say... 15 times.

View 5 Replies


ADVERTISEMENT

Make A Coin Toss Program Where One Toss A Coin A Certain Number Of Times Then Repeat It A Certain Number Of Times?

Nov 21, 2010

i am trying to make a coin toss program where you toss a coin a certain number of times then repeat it a certain number of times.
the problem i have is "heads(counter2)" the word "heads" has a blue error line under it how do i sort the error out and also is all the code right

Public Class Form1
Dim tosses, repeat, heads As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code]....

View 1 Replies

Convert The Results To A Usable Color Number?

Oct 11, 2010

When I use GetPixel(x,y) I get a string varible of this:

Color [A=000, R=000, G=000, B=000]

How do I convert this to a color?

View 4 Replies

Make VB Code Usable With Multiple Clients?

Sep 21, 2011

l have just written a vb.net application and would like to install it on the server such that various users would access the central database on the server how would l achieve that in vb.net

View 1 Replies

Random Number Generator Generating Same Number Many Times?

Sep 17, 2011

I have this program generating a firstname and lastname from a file. When I run this program I enter information in three textboxes. The first two are the salary low and high(salary1.text, salary2.text) and the last one is the number of "copies"(copies.text) that I want.. When I put a number such as 10 in the text box it outputs some of the same names. The firstname file has around 100 records and the lastname file has about 1000 records Why is it generating the same name The problem is even worse if I do something like 1000 copies.. it outputs the same thing 8 times and then does something different another 8 times

Public Class Form1
Dim sex As String
Function randomfirstname()
Dim infile As IO.StreamReader

[code]....

View 1 Replies

Make Loop To Make Certain Thing Happen About 10-30 Times Without Taking In Too Much Memory / CPU?

Oct 16, 2011

A few years ago I have been busy creating this application but it didn't succeed, now Im coming back to it and similar problems occur. Basically I use SetPixel on a given window to draw a line, work fine, but the line goes away as the window redraws itself.The problem: I have been putting timers and threads on it to make sure the line is being drawn. Is there any way to make a loop to make a certain thing happen about 10-30 times without taking in too much memory/CPU?

View 7 Replies

Number Of Seconds Between Times

Jul 16, 2009

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim timeN As DateTime
Dim timeF As Date = #7/11/2009 12:43:20 PM#
Dim timeR As TimeSpan
timeN = DateAndTime.Now
timeR = ?????
End Sub
End Class
TimeN is system time. TimeF is a fixed date and time. All I need is the number of seconds between fixed and system(now) for timeR (and counting).

View 5 Replies

ListView.CheckBoxes: Make Checkboxe Work Like A RadioButton?

Jul 25, 2008

I have a VB.Net Winform showing checkboxes inside the ListView which works fine. I want to know how to make the checkbox work like the RadioButton. ie. I should allow the user to click only one checkbox on the listview. If there are 2 checkboxes in 2 rows and then when the 2nd checkbox is checked, the first checkbox "Checked" should be cleared. When the 2nd checkbox is clicked the 1st checkbox "check" to be cleared.

View 5 Replies

VS 2008 : Make The Radiobutton ON When Webbrowser Is Fully Loaded?

Jul 10, 2011

I wonder how to make the Radiobutton ON when webbrowser is fully loaded, and the Radiobutton OFF when the page is loading. It's like boolen. Im using Webbrowser1.If you do not understand im mean this:

1. Click on a link on a site.

2. The Radiobutton gone OFF.

3. When the page is 100% loaded, the Radiobutton gone ON.

View 1 Replies

Checking If The Number Of Times Have Sum Of Grades Is =6?

Nov 16, 2009

i am using a combo-box to add different grades to a column in a datagrid and i am using a loop to check if the sum the total number of sum i have made when ever i select a a grade from the combo-box.This is because i want to only add six grade and not more than six but the code i am using is giving me problems This is my code.This code is adding the total grade for me bur i want to check with a loop that will only allow the adition of only six different grade but when i run my program and begin to select the grades it just give me a message form my message box 'This is calculating the grades of an applicant

Private Sub cmbgrade_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbgrade.TextChanged
If Me.cmbgrade.Text = "A" Then
Me.txttotalaggregate.Text = (CInt(Me.txttotalaggregate.Text) + 1).ToString
End If

[code]....

View 1 Replies

Count Number Of Times A Textbox Was Used?

Apr 10, 2011

This text book i have is not very good at all. the exercise's at the end of each chapter ask u to code projects without first covering the basic of what u will need do to code them. (Programming in Visual Basic 2008 Julia Case Bradley + Aninta C. Millspaugh)

Design and code a project to calculate the amount due and provide a summaray of rentals. All movies rent for $1.00 and all customers receive a %10 discount. The form should contain input for the member number and the number of movies rented. INside a groupbox display the rental amount, the 10 percent discount, and the amount due. inside a second groupbox, display the number of customers served and the total rental income.(afterdiscount).Include buttons for Calculate, clear, print and exit. The clear button clears the information for the current rental but does not clear the sumarry information. A print button allows the user to print the form. Do not allow bad input data to cancel the program; instead display a message to the user.[code]...

View 1 Replies

Counting How Many Times Certain Number Appear In One Column

May 31, 2010

I have an SQL database with a single table with several colunmns. I want to count how many times a certain number appears in one of the columns. E.g. I have the following:
A B C
8 4 6
0 9 3
1 4 6
4 7 1

I want to count the number of times 4 is used in column B. I have looked at using the following, but not sure if this is even the right approach:
Dim db as New MainTblDataSet
Dim BCount = Aggregate B In db.MainTbl Into Count(B.B = num)
where num=the number I am counting the instances of (4 in this case).
The hope is that BCount will equal 2, but it returns 0 every time.

View 3 Replies

How Many Times We Enter A Number Into An Inputbox

Nov 16, 2011

Basicly my instructor said that we have to make a program that will count how many times we enter a number into an inputbox, he also said we had to use a while loop. [code]

View 4 Replies

Increase Number Of Times It Pings?

Oct 29, 2009

On the ping method, how do you increase the number of times it pings? I'd like it to ping 80 times at once.

View 4 Replies

Loop Words For A Number Of Times?

Feb 10, 2009

Is there a way to loop words for a number of times (like i want to loop a word for only 10 times....How would I go by doing that?)

Quote:

Originally Posted by EXample Like I want to have a textbox and If i put 10 in the textbox It would loop the word ten times or is I put 20 in the textbox it would loop 20 times ..and ..etc...and ...etc...

View 11 Replies

Random Number Of 6 (1 ,6), And To Loop It 3 Times?

Feb 16, 2009

I need a random number of 6 (1 ,6), and to loop it 3 times. I tried this but it gives me error for - if myRandom.next(1,6) Then:

Dim myRandom As Random()
For i As Integer = 1, 3
If myRandom.next(1, 6) Then
End If
Next

Also I need to know the code for putting a picture into a picture box.

View 4 Replies

Make Button Read Code Sectors If Radiobutton Is Selected

Jun 9, 2011

I have my program all programmed but, i want to have only one button! How can i make it so if the radio button is selected it will do a certain sector of the code when the the actual button is pressed iv had a good attempt at if - A fail attempt but heres what i did

[Code]...

View 4 Replies

Make Groupbox's Controls Readonly When Is Radiobutton Clicked In Prorgram?

Jul 28, 2010

I have many textbox inside a group box so when radio button is clicked i want to make these controls readonly. Is it possible,and again on another radio button click again i want to make readonly false in vb.net.

View 1 Replies

VS 2008 : Make Message Box Show Radiobutton Text And Textbox?

May 21, 2010

I'm trying to make a game shop.the shop has items, and you pick which item you want through a radiobutton. Then it has a textbox that asks for the quantity of how many you want. Then how click a button, and I want a message box to pop up saying "You have purchased # (whatever item)(s)" The radiobutton text has the name of the item.

View 3 Replies

Change Code To Work A Certain Number Of Times?

Dec 23, 2011

My code gets a list of words from a txt file and chooses the words randomly. However, the same word can appear more than once and i need to know how to stop this from happeningHere is the code:

Dim aryName As String() = Nothing
aryName = File.ReadAllLines(Application.StartupPath & "Randomfnames.txt")
Dim randomWords As New List(Of String)

[code].....

View 3 Replies

Client That Appears Same Number Of Times As There Are Keywords

Dec 13, 2011

I know it sounds strange but let me it explain. It has a purpose, but really all I'm looking for is the item with the most duplicates.I know it's possible and I've had a few ideas already, though none were successful or practical.What I'm doing here that requires this is creating an intuitive search for clients in a database. You type in a single field and click search. Behind scenes each keyword broken down from the single input field is searched through the table of clients, hitting each column and returning matches. the results are large in numbers, but truly it's the client that appears the same number of times as there are keywords.

View 1 Replies

Counting Of Number Of Times Arrow Pressed?

Jun 21, 2012

i made a tool which detects arrow keys .When i click up it shows the word up in text box when i click down arrow it shows down word vice versia.

My problem is i want to count the number of times i clickd an arrow and want to save it in text doc with time and date

View 7 Replies

Number Of Times A Character Appears In A String?

Nov 11, 2009

How can I count the amount of times a character appears in a string?

The assignment is to create a program with 2 text boxes, label, and a button. We then need to type a phrase into the first text box, and a character in the second. Then click the button and then the label will display the output of how many times the character in the second text box appears in the first.

I have all the above setup except for how to display the amount of times the character appears in the first text box, here's a picture:

View 8 Replies

Recordset Returns 3 Times The Number Of Rows

Dec 15, 2010

I'm trying to run a simple select statement using an ADO recordset. But the resulting recordset returns 3 times the number of rows. For example the query should return 20 rows but is repeating 2 more times and returning 60 rows. When I run the query in Oracle it returns 20 rows.

Here's the code.

sSql = "Select * from Sector"
cnnOracle.Open("DRIVER={Microsoft ODBC for Oracle};SERVER=REPDATA.world;UID=auser;PWD=auser;")

[Code]....

View 9 Replies

VS 2010 Looping Code X Number Of Times?

Apr 3, 2011

Okay, so basically I'm trying to have my application randomly select items from a (multiselect) listbox. I want the user to enter the amount of items they would like randomly selected and it should all happen at the same time. I have the random shuffle down but it only selects one song each time you click the button. How can I loop this code as many times as the user specifies in the textbox?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
Dim shuffle As New Random
Main.songlist.SelectedIndex = shuffle.Next(0, Main.songlist.Items.Count - 1)

[code].....

View 1 Replies

Count The Number Of Times Letter A - E Is In The Input String?

Mar 16, 2010

input = "my mother is a great lady" output = A -3, B - 0, C - 0, D - 1, E - 2

I wanted to count the number of times letter A - E is in the input string.

View 7 Replies

Count The Number Of Times When A User Enters A Character?

May 20, 2009

count the number of times when a user enters a character followed by , and I want to count , number of times. So far here is what I have if you also know a little about the split function can you check to see if what I have is right?

Private Sub Strat0_LostFocus()
Dim q1 As New rdoQuery
Dim LO As Integer

[code]....

View 6 Replies

Counting The Number Of Times A Character Is Encountered In A String?

Feb 18, 2012

I am trying to count the number of times a specific character is in a string. The problem is when I run the program the letter doesn't advance from "d" in the string "debugging" and doesn't display the number of time the character "g" is found.

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Dim letterCount As Integer

[code].....

View 4 Replies

Message Box Pops Up 100 Times, Depending On The Number Of Errors?

Jul 17, 2009

I have a list of 100 assets that are pulled from AS400 and shown on a gridview alongside a dropdown box with 6 possible status and a textbox.

If the user selects a status other than "Found" (whether it's "Not Found", "Scrapped", "Sold", "Transferred","Other"), the user cannot leave the textbox empty. They must insert a comment into the textbox. Once the user is done he clicks "Save" and if, let's say, the status is "Sold" and the textbox is empty for all assets then a Message Box pops up saying "Please fill the textbox".

The problem is, the message box pops up 100 times (or once for every asset that has the error).

1) What can I do so that the message box only appears once even when 100 assets have the error?

2) Also, when the message box appears and I click "OK" the information the user had filled up to that point gets erased.

SAVE CLICK EVENT

Protected Sub Save_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Grabar.Click
Dim comando As String = ""

[Code].....

View 4 Replies

Random Number Generator Generates Same Numbers 19 Times Out Of 20 ?

Apr 1, 2010

I am trying to write a random number function that can just be called from my main module to generate different random numbers. I have tried this several different ways and I am having odd results. Approximately 19 times out of 20 the numbers come back exactly the same, but approximately 1 in 20 they come back as two different numbers. Im using Visual Basic Studio 2008. Here is the code I have so far, or rather, the current version of my many tests I have been running to try and figure it out. Sometimes it takes many runs of the program before the two seperate numbers apear.I've been researching it and have come up with nothing so far.I know I could put them in the module section as two different randoms and it works, but I get extra points if i use a couple classes in my program.This is the main module.

Module Module1
Sub Main()
Dim randomNumOne As New RandNum[code]...........

View 4 Replies







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