Improve Speed Of Program - User Inputs Min And Max Values
May 3, 2012
I'm currently trying to improve the speed of my program. Basically the user inputs min and max values for a, b, c, and d and a constant n, and then it tries to find the curve/line in the form a (x/b + c) ^ n + d. However for large ranges (1-100 for a,b,c, and d; total of 100 million values to try), it would take around 100 minutes at the current rate (approx 800k values/minute). I'm wondering whether I can further improve the speed. [Code]
View 6 Replies
ADVERTISEMENT
Apr 21, 2010
I want to be able to see if the values a user inputs into 2 textboxs equals the values assigned to a picture. I put these values in the picture's name and tag. Also the picturebox is getting the image from a random function correlating to an imagelist. How would i go about thisI thought of maybe using a checkbox and coding
If picturebox1.image.tag = ("12") _
and textbox1.text = 1 _
and textbox2.text = 2 Then
checkbox1.checked = true
unfortunatly when i debug it says the picturebox1.image.tag = Nothing
View 3 Replies
Jan 31, 2012
I am writing a VB.NET app that connects to a legacy application using TCP.
The communication is working fine and is very quick once connected, but there is always a delay (of around 2.5-3.5 seconds) when I create the new connection even though I am connecting to my local machine[code]...
View 2 Replies
Jul 29, 2009
I have an application in VS (vb) with a database in Access 2007. In the application I have some search functions. They were running very slow until recently when I played around with access andthe indexes. I found that made great improvement in speed. But as the application is running the speed of the searc function diminishes.how to improve speed of the search function and make my database provide faster results.
View 6 Replies
Jun 6, 2011
I have a code which runs a check. User inputs values into textboxes in inputform, then runs the check, and the msgbox is displayed. if msg is yes then program continues, else I want it to return to the input for to change values in textboxes. How can I do that?
Below is the code.
If (optanodespacing > 300) Then
optanodespacing = 300
Dim answerspc As Integer = MsgBox("Anode Spacing Must NOT Exceed 300m,
[CODE]...
View 3 Replies
Dec 7, 2009
Ok so i made a program where the user enters 3 inputs in a 3 textboxes (First Name, Last Name, Bday) and when the person presses enter a check list is made under the checklistbox with the Lastname. So can any1 tell me if i click on that checklist then everything i entered shows up in a label.
View 11 Replies
Aug 17, 2009
I've written an algorithm that I believe to be correct for computing prime numbers up to n with the Sieve of Eratosthenes. Unfortunately, this program hangs on really large values of n (try 10 million). Here is what I've written...
Protected Function Eratosthenes(ByVal n As Integer) As String
Dim maxValue As Integer = Math.Sqrt(n)
Dim values As Generic.List(Of Integer) = New Generic.List(Of Integer)
[code]...
How might I speed this algorithm up? Where are my bottlenecks?
View 12 Replies
Dec 31, 2010
how do i check the bandwidth (download speed and possible upload speed) of a user in vb.net or php that uses my app or visits my site resp?
View 1 Replies
Nov 18, 2011
I have several text boxes that I will input answers into and I want them to catch the values if they are incorrect or correct.
Example: the user will input a Letter for the answer, A or a, and I was curious to how the correct input can detect if the answer is correct.If the answer is A B C or D then no message should display but when it's some other value this message will come up.How do I use true or false in this code?
Dim dbl1 As Double
dbl1 = CDbl(txt1.Text)
If dbl1 Not 'A OR a' Then
'Display message
MessageBox.Show("Enter A, B, C, or D")
View 36 Replies
Nov 14, 2011
I have my desktop app, bound to an access database. I want now to improve a button so the user can make a backup of the *.mdb file.So i used this
If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
If FolderBrowserDialog1.SelectedPath <> "" Then
FileCopy("BDGRACIA.mdb", FolderBrowserDialog1.SelectedPath & "/BDgracia.mdb")
End If
End If
It works fine when i try the app from within Visual Studio. But when i install it it won�t find the database because it was installed elsewhere.Is there a way to control where the DB is installed and follow that route? Does this depend on the OS the app is installed? Or did I face the problem wrong and i should do something completely different with my button?
View 3 Replies
Jan 27, 2011
I'm currently writing a football management game (Australian football) and would like to pretty it up a bit. The match engine simulates each player as a small circle, much like the old Championship Manager games. While I'm fine with this style, I'd like to improve the look. I'm just using the simple graphics tools in VB to draw circles and the oval in the background which they play on. They move around using a timer. It just doesn't look very good. The movement isn't smooth and the circles look jaggy and unprofessional. Given that I'd ultimately like to release this product, I want to make it look a lot better.
What are some 2D graphics engines that I should look at? I don't need fancy animations or anything, just some nice smooth movement and nice looking circles. Doesn't seem like I'm asking for much does it? It'd be also nice if I could add in a chrome-like look or something along those lines.
As for the menus and such, well, they are currently just the boring grey VB style. That's fine for now but, as mentioned earlier, I want to release this game at some point. How can I change all of the menus and such so that this doesn't look like a game made in visual basic...basically. I've seen skins before but I'm not really interested in giving my game some generic style. I want to be able to customize all of it for myself. I just don't know how to! Simply fiddling with the colours and fonts of the default VB controls isn't enough.
View 9 Replies
Mar 3, 2009
I'm not sure the best way to accomplish this, what i have is 10 checkboxes on a form named chkbox1 to chkbox10, say ther user selects 4 then clicks a button, i was wanting to execute code one after each other like[code]...
View 3 Replies
Dec 9, 2010
I'm trying to create a User form that has six inputs.
1.) User input textbox 5.00 to 60.0 inches only accepted.
2.) User input textbox 2.50 to 30.0 inches only accepted.
3.) User input textbox 6, 8, & 10 nominal input only accepted.
4.) User input textbox 60% or 65% only accepted.
5.) User input textbox 2.50 to 30.0 inches only.
6.) User input textbox where 500 shows up in the box as "standard" but can be changed by user input.
Then an "OK & Cancel" button. I don't know whether to use a dialog box or a form, what class, masked text box vs. not masked, etc.
View 14 Replies
Jan 18, 2012
How can I prevent users inserting sql injection in my database? How can I validate their inputs? I am new with this sql injection. I don't know how to prevent users to insert this sttmnentif and I don't have the idea of sql injection how can I be sure that I am safe with sql injection??
View 1 Replies
Jun 25, 2009
I was trying to find examples of how one would make a webpage using asp so that I could have the visitor enter information on a form and then when they hit submit it will be attached to my webpage indefintaly and any visitor can view it.
View 4 Replies
Sep 3, 2009
How do i check if user has entered all inputs and go to the next form.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
t1.Focus()
End Sub
[code]....
In this code it gives an error, but after displaying the error it jumps to next form.
View 5 Replies
Jan 22, 2011
i have created a simple form which takes some input from the user. Now, I want that the input should be saved to my harddisk and can be seen later as well. Can you please tell me how to save the inputs as a record on my harddisk.
I mean the first time the form appears, it has four options. All the four options will be a record. The next time the form is re-loaded, then the same four fields will have data for someother client. It should be saved as another user.
View 3 Replies
Apr 28, 2012
I have several text boxes which a user is supposed to input a numeric value and the program will use an array to verify whether the input in each text box falls within the numeric range allowed for that text box. So one text box will only accept number 3-7 and i'm supposed to create an array that will verify the input in that text box falls within that range. Personally, I would just do:
Dim intInput1 as Integer
intInput1 = CInt(txtInput1.Text)
If intInput1 >= 3 or <= 7 Then
messagebox.show("Input Verified")
Else
messagebox.show("Input must be a numeric value between 3 and 7")
End If
But this isn't what the assignment asks.
View 1 Replies
Sep 7, 2011
i need to create multiple threads to improve a function on my program. it is a simple thing really but it's slow and if multithreaded it can improve the speed some thousand times. my program uses a dll to check the MX record of an e-mail from a textbox called emails if the mx record is correct then it validates that domain, if not, it sends to an error textbox with that mail my problem is that im reading a lot on multithreading and i dont have an idea how to make something like this: for x=0 to emails.lines.count -1' start a thread that runs my function next if i can limit the number of threads to avoid crashing it would be good.
View 5 Replies
Jul 13, 2009
I have created a page that creates a number textboxes at runtime depending on the result of a database query, (ie one textbox per row in query result). My problem is that I can't for the life of me work out how on earth to access the text from the textbox that is posted back to the server by the user when they press submit.
View 4 Replies
Nov 4, 2009
I am building a program where all the inputs (10) required from the user are asked on one form. Since it is not possible to let fields blank on the database, I would like to know how can I build an 'IF' saying that if all fields are full, then the database CAN save all the input. So that if there are any field blank, it won't save. I just dont know how to do the database condition. Thats all.
View 3 Replies
Oct 14, 2009
This is what I'm trying to do: I have a listbox to display a list of costs that the user inputs. I want to use some kind of loop to add those numbers from the listbox sequentially, then display the total in a label.
How do I set up a loop (and what kind of loop is best) to pull the numbers and add them to a total? give an example of what the code might look like. I'm new to VB
View 6 Replies
Jan 20, 2010
I'm making a program similar to a wordpad or whatever, but i'm having issues making the user inputs insert at the cursor position instead of at the end.. I'm running DevStudio 5 btw.
View 4 Replies
Feb 16, 2010
Is it possible for you to loop a block of code until the user provides a valid input? Like, when I click the save button, the program will prompt the user for an integer value, and I would like to validate if the user has inputted a valid value. If the user fails to input a valid value, then the program will re-prompt the same message again until the user inputs a valid value. Eg:
If MsgBox("Add copies to this book?", MsgBoxStyle.YesNo, "Adding Book Copies") = MsgBoxResult.Yes Then
Dim CopyQty As String = InputBox("Amount of copies to generate:", "Add Book Copy")
If IsNumeric(CopyQty) = False or (CopyQty < 1) Then
[code]....
View 12 Replies
Nov 25, 2009
Im trying to improve some apps ive written, the first is a console app... Im trying to get it so that i wont get an invalidcastexception if the user inputs a string, when the variable is type "Double"
[Code]....
View 2 Replies
Feb 19, 2009
I have a listview with multiple columns that I need to fill out of information gathered from user inputs in various textboxes I use to have a code for Windows Forms Application as below
[code]...
This works fine.However,when I shifted to WPF and tried to reproduce EXACT same code,it tells me Too many arguments to 'Public Sub New()' Alternatively,
Basically I have about 15 data that I want to display in different columns per row in a listview.I need it in such a way I can sort, edit, delete, insert,etc.With my previous methods, I could do those fine, but in wpf im stuffed...
View 2 Replies
May 1, 2010
I am wondering how do i Return a value that is set in a Radio Button and Add it to what Decimal a User inputs into a Text box?
Public Class Form1
Private Sub txtbasic_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbasic.TextChanged
End Sub
[code]....
i have 2 Error and 1 Warning Function 'OverTime Doesn't Return a value on all code paths.
1 Expression is not an array or a method, and cannot have an argument list
2 Expression is not an array or a method, and cannot have an argument list
View 4 Replies
Oct 5, 2010
I have a form that has 10 addition execises. The user has the option of using a timer or not. I have the timer part correct, but now I want to be able to check the exercise answer one by one as the user inputs the info.
[Code]...
View 2 Replies
Feb 28, 2010
I'm making a small webbrowser, and I need to make sure the user inputs a proper url!
The text box is called TextBoxAddress.
View 2 Replies
Nov 19, 2009
So, I run a select statement in SQL and then it has something like " where clientName = 'John Doe' " I can generate a datagrid or dataset off the SQL statement, but it will only be good fro one client...... I would like to be able to populate a dataset/grid using the select satement and then having something like a combo box of names the USER can choose. Then the user selects the name and the datagrid is populated with that clients info or w/e........
[Code]....
View 2 Replies