Program Use Only Section That's Needed For Current Execution Instead Of Checking Every Argument Every Time?
Dec 6, 2009
FIRST = arguments checked against each other
SECOND = arguments checked against each other but are irregardless of the FIRST arguments.
If (FIRST and (FIRST or (FIRST and FIRST))) OR (SECOND or (SECOND or SECOND or (SECOND and (SECOND or SECOND)))) then As the program processes this line over a million times during the execution, only FIRST or SECOND section is needed during an execution, never both. How do I make the program use only the section that's needed for the current execution instead of checking every argument every time? Is there a way to turn a string into an argument list for an IF...THEN statement? [code]
View 13 Replies
ADVERTISEMENT
Nov 17, 2009
I'm making a new program so I won't be able to post my code here yet.
But I wanted to ask you fine folk how I can check if a program is running for the first time.
[code...]
Just start the program normally and when they click the menubar ask for the password they set in the first time
if it's a little iffy on my side but I just started this project and I've only made the GUI and I have no idea what so ever how to do this.
View 5 Replies
Jul 27, 2009
Why am I getitng the following error? Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 9: Dim entry As DictionaryEntry
Line 10: For Each entry In dictionary
[CODE]...
View 3 Replies
Jun 24, 2009
My application does some intensive tasks on a second thread, while updating the main form. I want to show how long these tasks have been running (increments every second), i've read timers can get out of sync and even fire off multiple ticks at once, so how can that be fixed, or what's a better solution for this?
View 3 Replies
Aug 15, 2011
PFB the code for a search button where when a user enters a text in the text box ,it takes the keyword compares it with an xls which has 1600 rows and 16 columns with keywords.If the keywords match, it has to full the 3rd column where the name is specified.Its running but its taking more than 20-25 mins for processing.I knw searching 1600 rows and 16 columns will take time but pls advice if i can make this process a lil faster.
[Code]...
View 13 Replies
Jul 22, 2011
So I currently have the following:
2 timers
2 labels
1st label is "Clock" this pulls the time from the users current time zone/local time
2nd label is "UTCClock" Which would be UTC time
Now I have this for the first label: clock.Text = Format(TimeOfDay, "hh:mm:ss tt")
Which would give the users current time zone/local time. As for the UTC.. how would I add in for the UTC time from where the user is located at? I did some searches.. but couldnt find what I was looking for.. IM pretty sure its not as easy as getting the users current time zone/local time.. So im assuming that Theres a "bit more" code into getting UTC time..
View 5 Replies
Aug 24, 2010
I am using this line of code on form load event it is working very fine but i have to problems
1. It replaces the form name and display the date and time but i want to keep both date and time and forms caption separated by some space.
2. When form loads it load the current date and time but the time does not change it should run.
What should i do please please help me code is as follows
Me.Text = Date.Now.ToLongDateString & " - " & TimeOfDay
View 11 Replies
Jun 13, 2012
Actually, I am trying to find out whether the partno is existing in the database table or not and it takes long time in count = checkCommand.ExecuteReader statement
Public Function CheckProductNo(ByVal Partno As String) As Boolean
Dim count As SqlDataReader
Dim valid As Boolean = False
Using connection As New SqlConnection
[code]....
View 4 Replies
Aug 13, 2010
Recently, I've been running some tests with C++ and VB.NET to compare execution speeds. In the last thread I posted, I talked about how I had encountered the fact that C++ was executing just as fast as VB, but got that issue resolved. Now I'm hitting my head against another wall:I had made a DLL for VB.NET to test out this theory and compare in just one program side by side execution time of identical VB.NET and C++ code. But the interesting thing? VB.NET's execution time improved such that it was now exactly identical to the execution time of C++. Spending some time with the problem, I discovered that the "Target CPU" option in advanced compile options in Visual Studio 2008 was the culprit!
Since I'm running 64-bit Windows 7, I figured making the target CPU x64 would yield the best execution time. Wrong. Here are the results in execution time of a Windows Forms application for VB.NET,calculating all the prime numbers up to 10,000,000 and getting their sum.
Any CPU: 15.231 seconds
x86: 10.858 seconds
x64: 15.236 seconds
Below is the code I'm using, feel free to test it yourself:Public Class Form1
[Code]....
View 3 Replies
Jun 20, 2012
I was updating an old .aspx.vb script that was originally written with dynamically typed variables, like this:
Dim price I updated them to the following format (along with some IsDBNull checks to compensate):
Dim price As String After doing this to all of my variables, the script appeared to run noticeably faster. Is this a real effect of static typing, or is it just a coincidence?
View 1 Replies
Dec 6, 2010
How to get the current date and time in textbox in IST ( Indian Standard Time) in vb.net ?
View 1 Replies
Jul 13, 2010
I'm wondered how to make program that not needed to install. Only click the icon and its working and resource folder too. When I'll do build program it makes program thats needed to install.
View 4 Replies
Mar 27, 2011
I'm writing a report scheduler that is somewhat of a clone to the backupexec scheduler and the layout can be seen in post #10 here: [URL]..It works great and saves/edits/deletes records just fine, but now i need to compare those records one at a time in a windows service that i'm writing in order to trigger automated report creation and emailing - i already have the report and i already have the code for the emailing, i'm just looking for the most efficient way to loop through the table (that i've pulled in to a dataset) and compare its records with the current date and time - if true, the event fires.
[Code]...
1stSun, 2ndSun etc are bit fields, time is a datetime, and the remainder are varchar. My service checks the database every thirty seconds.The english version of what i'm trying to do is "Connect to the database, grab the entire table (it will always only have 5-6 entries max, so i felt 30 second sweeps was okay), and If today is the 1st Sunday of the month, and it is currently 11:00:00 a.m. (could be any day or time, this is just an example) - loop through the dataset to identify if any records match the time field or greater - if they do, fire the report
View 2 Replies
Jun 30, 2009
I am getting this error when debugging a VB application. The method that is being called when I get this does not have any arguments. Definitions in code are as follows with names changed to protect the guilty
[Code]...
The question is, if the method is not defined to accept argments, then why am I having a debug assertion while debugging that says that the arguments are not optional?
View 15 Replies
Dec 26, 2009
Windows Application
Front End: Vb.net
Backend: Oracle 10g
I am executing the sql query to fetch values and showing it in my datagrid..and when i do that it works perfectly fine...and problem is that it takes 10 min for my datagrid to fill...so in between i want to show the execution time to the user in another form till my query processing completes..
My
Dim oradb As String = "Data Source=zorb;User Id=baady;Password=zacky;"
Dim conn As New OracleConnection(oradb) ' VB.NET
Try[code]......
View 2 Replies
Nov 14, 2011
I have a per-call WCF service that serves a number of clients. I'm looking to speed up the services by running some background processes so they don't block or slow down the main function of the services.
One example is that the main function needs to return a set of data, while the background thread needs to record some statistics based on the parameter(s).
Code:
Public Function GetAccountDetails(id As Integer) As AccountDetails
Dim retVal As New AccountDetails
Dim a As New Accounts
[Code]....
If I use this background thread to record the statistic it doesn't block the main thread from returning the data to the client.
It's been working well in test scenarios, but my question is, are there any dangers with leaving this thread to execute without Joining it before returning the data to the client? Could there potentially be any loss of statistic data? Could there be potential memory problems on the server side?
View 1 Replies
Dec 21, 2011
I've reached the end of my project but I have several unused and not needed .xsd files from trial and error of linking my program to a database. I want to clean up a bit and get rid of them while keeping only the essential files attached to this program. I tried deleting the .xsd files but it seems too ingrained into the program to the point where the program has several errors and just breaks. I have to manually restore the files from the Recycle Bin to get the program to start working again.
What are other solutions to get these files out of the project? I thought about clicking "Exclude From Project" but am afraid of the consequences. I figured I'd check with someone here before taking action.
View 5 Replies
Apr 13, 2010
I am creating a program in VS 2010 which obviously uses Framework 4.1 However now that I am trying to test the program I am realizing usually only developers like us have this version.. Is there any way to downgrade the needed version of the framework for my program Currently I run it on my test computer and it asks me to download 4.1 version.
View 4 Replies
Jul 25, 2008
hi,i am having a VB application in my system, which runs with absolutely no issues. But when i am running that EXE in some different machine i am randomly getiing a run-time error for a particular form.The error is like :Run-time error '30005': Invalid Argument valueThat particular form have MSFlexGrid and List box.As i cant simulate the same in my own setup, could u pls suggest the possible reasons?
View 2 Replies
Sep 7, 2010
I need to compare the current time with different time intervals, how can i get the time in this format so i can compare them.Format: 09:45:00
View 3 Replies
May 12, 2010
I have a form with the DateTimePicker control on it. When I select a date it gives a value like "date time" (Eg.: 5/12/2010 12:20:35 PM). But here the time returned is current time. What I need is for the date chosen from the picker automatically set the time to 00:00:00 instead of the time when the date was picked.
View 3 Replies
May 12, 2010
i have a form with the DateTimePicker control on it. When I select a date it gives a value like "date time" (Eg.: 5/12/2010 12:20:35 PM). But here the time returned is current time. What I need is for the date chosen from the picker automatically set the time to 00:00:00 instead of the time when the date was picked.
View 1 Replies
Dec 31, 2010
Is it possible to wait/suspend execution for a certain amout of time without hanging the main UI thread?
View 7 Replies
May 16, 2012
How can I tell what the size of my program is and how much disk space is needed to install. When I publish the program and install it on another machine it will show up in the control panel but does not show what size the program is?Also when I publish updates with it says something like installing 10mb. Is this an additional 10 mb everytime, I guess not, but can someone explain what it all means?
View 10 Replies
Jun 2, 2010
Actually we have a system for doctors in dispensary and when they try to access records for the patients from doctors module they able to do it but when they try to modify records and save it gives an error "Run-time error '5': Invalid Procedure call or argument" We are using oracle 8i as database and vb6 as fronend.
View 20 Replies
Jul 21, 2011
I like to clarify the doubt regarding vb.net programming. my question is as follows.1. While executing the vb.net program, whether it takes RAM space or Hard disk space.
View 4 Replies
Mar 21, 2012
I've created my program, its all fine and dandy, only problem is i want it to start when windows does.i have read a few threads and adapted some codes.. i have this [code] now it wont let me debug, presumably because of admin rights. although when i navigate to myprogram's .exe and run as admin it runs the program and seems to skip the the whole reg key section .
View 6 Replies
Apr 1, 2010
Im using Visual Studio 2008 Ive created auto click programs through tutorials, Mouse Recorders, also through tutorials. But nothing is helping me with the project at hand. It has now been a month of going through basic VB.net tutorials, and more advanced ones, all with success.. but none telling me what I need for this project.
So here is the project.
When I open this program.. it will have two buttons.. Start.. and Stop. Both set with hotkeys(which I have figured out how to do). When the program starts, it will work, kind of like an auto clicker, but the clicks I need in different, set locations, and with a different time frame in between clicks. The whole program will loop until stopped(with the hotkey).
View 10 Replies
Nov 25, 2010
I'm attempting to display records on the screen 30 records at a time. When totrec is greater than 31, I was hoping the program execution would stop at the line "btn30to60.Focus()".Instead, execution continues and the sub "between31and60" is executed.If anyone has a simple way to halt program execution until the user clicks on the button "btn30to60"
Code follows:
If totRec > 30
And totRec < 61 Then
Call lessthan31()
[code]....
View 3 Replies
Dec 27, 2009
VB.NET: What is the best way to ensure that a particular object may be instantiated only once during program execution?
View 3 Replies