Increasing A Number By A %
Apr 27, 2010
Another question for you... I have a program which lists the population from 1998 to 2002. The pop in 1998 was 300,000 but I need it to increase by three percent every year. My code works but for each year it has 300,000 as the pop. lic Class Population
[Code]...
View 9 Replies
ADVERTISEMENT
Nov 19, 2009
I would like to know how to write the code for increasing number.For example. When I type a number in a textbox, after I pressed a button, it will increase from the number I've typed in the textbox with 1.For example : if i type 100 in the textbox,the number will go on.
101
102
103... to infinity
I am using sendkey..
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim n As Integer
For n = 1 To loop
[code]....
View 5 Replies
Jun 22, 2010
Why did they choose to add a new keyword AndAlso, instead of just changing the functionality of the existing And keyword?
Why would one want to use And, instead of AndAlso anyway?
Is it not just increasing the number of keywords unnecessarily?
View 3 Replies
Feb 13, 2012
What I want to do here is to increase the number on a label for next combobox item selected
eg.
Items Label
Tom 1
Jane 2
Mary 3
John 4
etc.. etc..
etc.. etc..
etc.. etc..
View 2 Replies
Apr 24, 2011
How do i make the number in a particular column of an MS Access database to add up by 1(one) each time a button is clicked? I have tried the following code but everytime its clicked, it just seems to "replace" the 1 which is already in the database.
If CheckedListBox1.GetItemChecked(i) = True Then
ds.Tables(0).Rows(i).Item(10) = +1
da.Update(ds, "Students")
End If
View 1 Replies
Jul 19, 2009
Here is a code to print a dataview grid:
Imports System.Data
Imports System.Data.OleDb
Imports Excel = Microsoft.Office.Interop.Excel
[Code]....
How to increase the number of cells dynamically according to the need?
View 13 Replies
Jun 8, 2011
increasing the size of my array. i have this code but i don't know which of these code does not increase the size of my array even though i increment it.
This is the declarations:
Dim movieArray(0) As String
Dim ratingArray(0) As String
[code].....
View 5 Replies
Feb 24, 2012
I have a small page, with a button on it. When I click the button I'd like the code to look at a a field (call the field "InvoiceNumber") in a table (call it "InvoiceTable"), take the last number stored, increment it by "1" then store it back in the "InvoiceTable" and display the new invoice number on the page.Currently the button is called "New Invoice", so clicking this button is going to create a new invoice, with a number one newer than the latest one in the table.
View 2 Replies
Oct 18, 2010
I'm using Visual Studio 2005. I want the output of these ten numbers arranged in increasing order... 22, 15, 10, 12, 12, 13, 21, 21, 20 and 9.
View 3 Replies
Jun 19, 2009
I am currently running through a loop with 20 threads. These loops contain a series of 3 HTTPWebRequests (relatively CPU intensive). At the beginning, CPU usage never spiked above 10%. After about 7 hours of run time, CPU is spiking up to over 40%. I believe that this will eventually lead to the program crashing (it has before in less time, I modified some things and it seems to be running longer). What kind of intense CPU spikes are associated with threading? More importantly, how can the duration of runtime affect CPU usage by so much?
View 11 Replies
Jan 27, 2012
I placed a button on my form that measured 59mm in width (approx 2.25 inches for any Americans).When you run the project as you'd expect it still measures 59mm.However when I set the form as a child to my MDIParent and run the project the button now measures 67mm (well over 2.5 inches) an increase of 13.5%.Is this a bug or do I need to just change some setting somewhere?
View 6 Replies
Sep 4, 2009
My Encrypted code is :Asdos!Obqlds,Knodt+404620Y+20-05+24 Now, how can i manipulate the characters by decreasing each odd character's ASCII value by one and increasing each even character's ASCII value by one?
i.e. in the above code..
A becomes B
S becomes R
[code].....
View 11 Replies
Jul 9, 2011
I am struggling to do what i want with classes at the moment as they are killed off at the end of a method, can somebody let me know how to make the classes live until i tell them to die? so that i can create one and refer to it from another method at another time? For example On form load i create a class Dog.Then later on i want to get info from the Class Dog. But it is no longer instantiated
View 6 Replies
May 19, 2011
I'm building a VB.NET 2010 app that tracks battery usage. Run the app, start logging, then let the battery go flat. At the end, you get a nice graph that shows you how long the battery took to run down. Compare it to previous results and you can see how battery life is doing.
But this is supposed to be an unattended app, so it's not feasible for me to sit down and use word, browse the Internet, listen to music, play games etc. for four hours (especially at work!), so I'm looking for a way to artificially increase CPU usage to chew through the battery faster, and simulate how a battery would probably be used throughout a work day.
I've managed to inflate the memory usage using:
Dim a as long
Dim ptr(0 To 20000) As IntPtr
For a = 1 To 20000
[Code]....
I increase CPU usage in VB.NET? I've tried creating new threads with constant loops, but I get the funny feeling that VB.NET optimizes these kind of things to prevent memory and CPU hogging apps from taking over
View 3 Replies
Apr 25, 2010
I'm guessing the reason this macro isn't doing what I want it to is because of an error on my part in the code. Basically, I want the values in the cells pointed out in the code to be increased by 10% each time the button is pushed.
Here is the code:
Sub Add10percent()
IncreaseColumnValuesBy10Percent 2, 0.1
IncreaseColumnValuesBy10Percent 4, 0.1
IncreaseColumnValuesBy10Percent 6, 0.1
IncreaseColumnValuesBy10Percent 8, 0.1
[Code] .....
View 2 Replies
Apr 20, 2011
I have a application which is written in background worker. Inside the background worker i am creating the multiple threads . The application has one notify icon. When i creating threads the notify icon gets duplicated for each thread. Suppose if i am running three threads means , there are 4 icons in the system tray.
View 3 Replies
Feb 8, 2012
My application has 1 main form and three other forms which raise events to my main form. I noticed that the memory starts at 77,000 K and increases substationally over a few hours maby be to 250,000k and ever increases.The main form has a dataset and a bound datagridview which gets refreshed with data. Basically it's a taxi booking application. The booking form raises an event to the main form and the main form refreshes the jobs and displays them on the dgv.
View 8 Replies
Sep 10, 2010
I'm attempting to have my page automatically scroll to the top when there is an error message to present to the user. Following a tip I found searching, I've enclosed the Javascript scrollTo function in a setTimeout function to avoid a conflict with AJAX remembering the scroll position. Here is the relevant [code]....
This is working fine for me locally, but when I move the code up to our test server, it does not seem to take effect.I have tried increasing the length of the timeout, but no dice.
View 2 Replies
Jul 30, 2010
how can i increase the stack size on my ui thread from within my app?my app recursively draws onto a bitmap which is then displayed in a picturebox + only causes an error when i increase the size of the bitmap. i.e. the same drawing operation on a smaller bitmap works ok.
View 23 Replies
Jan 30, 2011
I'm writing a program that solves sudoku puzzles, but it keeps giving me StackOverflowException. I've tried to make it as efficient as possible, and cleaned up my code, but it still does this once it reaches a certain depth of recursion. how I can increase the stack size so that it can handle this recursion?
View 5 Replies
Nov 26, 2011
The program is to take an entered string then search for a subset of letters entered through and input box.In my subprocedure Sub btnSearch_Click I am using a loop to move through the entire length of an entered string to search for a set of letters entered through an input box. I can find the set of letters to search for but instead of increasing my counter "Found" for every instance of a match it returns the length of the string instead. I just don't know why the IF doesn't prevent the counter from increasing for every element in the string. I want the counter to increase only when the match is found. I just put 2 message boxes in there to make sure it found the right letter and then display the counter.
Here's the entire
' Name: Count Project
' Purpose: Displays the number of times a sequence of characters
' appears in a string.
[code]....
View 5 Replies
Nov 28, 2009
While using the Socket.Receive method to receive messages through network, you should define a variable as the buffer and you have to specify the length like this: Code: Dim _ReadBuffer As Byte() = New Byte(LENGTH) {} My question is: What is the bad thing about increasing the length of this variable even if the received messages are sometimes shorter? (i.e. if some body let it 10000).
View 1 Replies
Jun 23, 2011
I'm having an unusual problem that I've never had with WR's before. I have a very user-driven program that interacts with a server of mine through webrequests. Depending on what the user's doing, it could end up sending a dozen requests/minute. This has never been a problem before, but for some reason system memory usage increases and doesn't stop increasing, as if something is cluttering it up for every webrequest that is sent out.
Is there a known problem with WR's like this? Or is it just a random screw up? I can get my system back up and running smoothly.
View 5 Replies
Jan 12, 2010
I have the following code that connects to a server and expects data from it.Is it normal that working memory of my program increases every time I receive something from the server I connect to?The larger I make the network buffer, the more increase that is added to my working memory (in task manager)The data I receive is about 50 bytes. So I minimized that size of the buffer to 128.
View 1 Replies
Mar 29, 2012
I'm trying to write a simple load tester for one of our web services, which is served through IIS7. I'm launching a load of threads (as Tasks) that call the web service as a Web Reference.Despite the threads all starting, only 2 concurrent connections from the app can be handled by the web service. I'm aware that by specification simultaneous connections are limited to 2 per user. For the sake of this load tester, which I guess is one user, I would like to open many simultaneous connections.I have tried to add the following to the web.config of the web service.
<system.net>
<connectionManagement>
<add address="*" maxconnection="40"/>
</connectionManagement>
</system.net>
My setup is as follows:
The web service is located at [URL], where MyWebServiceApp is configured as an application.The webmethod can be viewed as something trivial that simply waits for, say, 20 seconds before returning a response (making it easy to see that only 2 connections are open at any one time).The simplest form of the load tester code is ass follows:
Imports System.Threading.Tasks
Module SuperBasicLoadTester
Sub Main()
[code]....
I've tried pointing other load testing software (e.g. soapUI) at the web service and have observed the same issue.
Edits: I should add that the web service box is running Windows 2008 R2.Also I have run SoapUI and my loadtester simultaneously and each is only able to request 2 connections each (i.e. 4 in total).
View 2 Replies
Nov 20, 2011
i need to add a increment hour and increment min button, here is the code :my ? is this how do i make the two new buttons work like code wise ?? this is attempt like 5 everytime ive played with the code and added buttons ive crashed the program?
Public Class TimeTest
Dim time As New Time() ' construct Time with zero arguments
' invoked when user clicks the Add 1 to Second button
Private Sub addSecondButton_Click(ByVal sender As System.Object,
[code]....
View 5 Replies
Dec 10, 2010
I have a Windows form which contains a DataGridView within a GroupBox which is within a TabPage which is within a TabControl.The scrollbars property is set to 'Both' so that the user can scroll down to see all available rows in the grid.
I want the Windows Form to initialize to allow the user to see 7 rows but to expanded vertically to the size of 32 rows which is the maximum possible in this application.
Is there a way to size the form dynamically so the Form's Height property can be changed as the DataGridView's rowcount increases?
View 3 Replies
Mar 4, 2011
I am doing a bar cash register and I want to use a if statement to see if fosters button and number 1 on the number pad are both pressed then multiply constant by quantity number
View 1 Replies
May 30, 2009
How to increase a forms opacity without increasing the opacity of the controls in the form?
View 1 Replies
Aug 11, 2010
I have a problem with a sql query. Through the query I am trying to search database for any occurrences of string (can be anything) in a column using the SQL LIKE command. The problem is that it works fine for most of the strings say john, jim, ji"m , but does not work when i include the following characters which are ( ' , { , } , and a single quotation mark). MYSQL query takes care of these special cases by putting them in [] block whenever user enters them .But i am getting the following error when i go to query the database using the GetSelectCommand() in VB.NET
Exception Details: System.ApplicationException: Number of values provided must be equal to the number of placeholders in query.I have checked the query over and over again .. but its fine .My database server is Sql Server 2008.So my application throws the exception in this command:
Using reader As MustDisposeDataReader = _
pmSystem.DatabaseManager.GetSelectCommand(selectStatementBuilder.ToString(), New Object() {})
Where MustDisposeDataReader is an instance of a class in an internally developed library, which inherits from System.Object. pmSystem is an instance of the class PlanManagerSystem which implements the commandlayer. GetSelectCommand() takes the select command
View 1 Replies