There are two location one main form and other is communication class which use comport to send command.Everything is good in VB6 but same code fails in vb.net actually program behavior is really different.in vb6 one function execute at a time but in vb.net it execute two function at a timeeg. In form there is function to write command over comport once command is posted one event is raised by serial port in this function byte array is formed and the statement immediate next to raise_event use this array to show on formbut when event is raised control is toggle between first function and event function it execute one statement from second(COMMUNICATION CLASS) function and one statement from f
I am trying to run several stored procedures from my code and I get the error message that my sp's can't be found, but if I remove all of them but one, my code executes fine.
I've tried this way to run my sp's: Dim oCmd2 As System.Data.SqlClient.SqlCommand Dim oDr2 As System.Data.SqlClient.SqlDataReader
I've created a page that makes several calls to different rss feeds based on the keywords I pass to the page. The problem is that each call takes .5 - 2 seconds to get a response and display the results. If I multiply the number of keywords by the time I end up with a very slow loading page. Is there a way to execute all of the calls at one time?
I'm making an app using wpf and vb.net in vb2010 express and having a problem. I have a timer that execute a backgroundworker every minute: Private Sub timer_Tick() Handles timer.Tick If Not bworker.IsBusy Then bworker.RunWorkerAsync() End If End Sub
The backgroundworker is working with xmlelement and xmldataprovider: Private Sub bworker_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bworker.DoWork Dim source As XmlDataProvider = Application.Current.Resources("r1") Dim sometext As String = "something" Dim elemento As XmlElement = source.Document.CreateElement("elemento") elemento.InnerText = sometext e.Result = elemento End Sub
Then I'm using e.Result on RunWorkerComplete to add the XmlElement to source. It works perfect the first time I execute the backgroundworker, but when the timer calls it the second time it throws a InvalidOperationException in the line "elemento.InnerText = sometext" why is that and how can I solve it?
i had some thing challenging work i had three functions
function1() function2() function3()
i had a text box and command button i need to execute the functions when the function name is typed in text box suppose i type function1 and click command button the corresponsding function is executed.
I have written a store procedure which retrieves more than 7000 rows. While executing the store procedure in my VB.NET winforms application, I'm getting an error like as follows."Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."I googled and tried like using these lines of codes which wasn't useful.
sqlCmd.CommandTimeout = 0 sqlCmd = New SqlCommand("waitfor delay '00:00:60'")
Is there a command in vb that can be used to pause a routine to give time for the form to show before the routine starts as my routine is running and completing before my form shows up?
I would like to know please how to check whether a string exists or not in a html code. I'm executing a for loop. Each time it checks a different url, so I want to be able to check each time if for example "<img" exists .
P.S: What's the difference between using
webrowser1.navigate
AND
dim request webrequest request = WebRequest.Create etc...
The Now() function in VB.NET returns date and time which is different from the system time that I see on the right-bottom on the notification bar. It is 15 hours slower than the system time. Has anyone ever met this problem? I'm using .NET 2.0.
What will happen when 3 function calls same function at a time? I have 3 Function, f1,f2,f3.. Those function after completing their task will call finish() function. What will happen if Finish is Called morethan once..
I am using stored procedures in my application using vb.net, while executing stored procedures on mysql database server thru application, the response time from the server is more. Is there any settings that i need to set on mysql db server or any changes in connection string or in code.
Threads a + b, (both are trying to delete files).a gets called first, then b while a is still running.b deletes the file successfully but a doesn't.If I run a on its own, a's file deletes fine.
When I step through the code I can see that a's MultiAttemptFilename gets overwritten with b's.
I don't understand.I have an ajax call pointing to a generic handler which passes the filename along with it.In my handler I have the following code:
Currently just started working with VS2008 I have a SQL script that is returning a number looking time in one of my columns (50625) which is 5:06:25 What I would like some help with is creating a function that would take this value and change it to a real time at some point I will need to do further calculation on these times so I need to be able to add or subtract these results.[code]...
What line of code would I need to use the timer function just as a delay, so like as lines are being executed, once it gets to this timer it waits for say 1500 milliseconds before execution is continued.
I am facing an issue. Actually what i am doing is that i am tryin to store certain values in a database. A function is such that it calculates 5 values and stores them in a database. While storing them in the database it displays them in a textbox on the form. Now i want to display them one by one which it does. But it does it so fast that i can only see the last value that it enters in the database inside the textboxes.[code]...
I am writing a small app to automatically connect my PC to the internet at a certain time and I am using rasdial.exe for it...
Private Sub SetIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SetIt.Click Dim windir As String = Environment.GetEnvironmentVariable("WINDIR") Shell(windir & "system32 asdial.exe", AppWinStyle.NormalNoFocus) End Sub
My question is how to make the shell function run at a specified time or after a certain interval?Also how to wake up my PC from hibernation using vb and winresume.exe
[code] As my program above, i set the time interval to every 5 minute which it will do the function. However, after 5 minites it does not affect any thing in my program, is that my coding wrong? or I had miss something?
Currently I have calculated that one of my functions executes 62 times per second (on average). How can I limit this to say exactly 50 times a second (every time)?
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
display a Decimal (or double) to elapsed time [h]:mm:ss (hours:minutes:seconds)using vb.net?
example:
if you were to type "1.34666666666667" into a cell in Excel then choose Custom Format [h]:mm:ss The result is an elapsed time of "32:19:12". Using the OADate function only runs on a 24 hour clock so this does not work for longer durations unfortunately...
ive created a function for generating username, password, email to log in on a website but the problem is i want to use all account one at a time for example
I'm currently trying to code a program which basically uses the stopwatch function to time the length of the users break. Basically when I work at home I want to allow my self 4% of my shift length in personal breaks.
So far I have Public Class Form1 Dim elpsTmr As New Stopwatch Dim ts As TimeSpan = elpsTmr.Elapsed Private Sub txtshiftlength_TextChanged(ByVal sender _ As Object, ByVal e As System.EventArgs) Handles txtshiftlength.TextChanged [Code] .....
The only fields I don't have working are hard ones. I'm trying to figure out how to subtract the length of the last break used from the minutes allowed to take and display it in a text box to display how many minutes you have left to take. And also to work out how many minutes have been used since the program has been opened or reset.
1) The first function (call it GetValues()) returns values in a SQL database as a list via a stored proc. One of the fields is DateTimeSubmitted. All of this data is displayed on my webpage using a repeater control. It works fine.
2) The second function (call it NiceDate()) I created to change the DateTimeSubmitted to a nice date such as "one minute ago" or "yesterday".
My problem is I have no idea which is the best part of the process to do the conversion (at point of data extraction or in pageload etc.) or in fact how to do the conversion.