I am having two constants of 64 byte (X,Y) string type and a structure of 64 bytes with 5 parameters of different sizes like(1,7,12,20,14,10) no i have to xor operation with these three and store in a binary file. X XOR Y XOR Structure. the structure will be formed by taking user input values.
I want to Drag out an item from the program to the draged out Location ie. Desktop. Mainly its a picture in a picture box that needs to be Draged and Droped from the program to the droped location on explorer
when I came across an error (The I/O operation has been aborted because of either a thread exit or an application request) regarding this code:
"Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
If closingdown = False Then
received = SerialPort1.ReadTo(vbCr & "R") 'Motion port receiving data. needs a vbCR & "R" is sensor out is an ASCII "R" followed by three characters(which is the distance measured) End If"
It only occurred on "received = SerialPort1.ReadTo(vbCr & "R")".
However sometimes this error is not shown, but most of the time it does occur.
This error only occur when i want to close the form. Other than that it's perfectly alright.
I have a form called frmReport and on this form a user makes selections and clicks the "btnBuild" button which in turn creates a crystal report and displays it. However sometimes this process can take some time to build the report. So I placed a panel control along with a progress bar to let the user know that the system is working. However when the form runs the progressbar does not run until the last few seconds before the report is displayed. how to get the progressbar to "run" while the report is building ? (The progress bar is set to marquee.)
Private Sub btnBuild_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuild.Click ' Display panel control with progress bar
I want to know the behavior of string array when using For Each loop in it. Consider following code:
Dim StringArray(499) As String'fill in each element with random string
Dim count As Int32 Dim current As String For Each current in StringArray
[Code]...
As shown in the code above, if I need to access StringArray twice using For Each loop, is that true that ALL elements in StringArray will be loaded twice even though I only use 10 elements in each For Each loop? From performance point of view, is that advisable to use String array as data structure to store a list of strings that needed to be accessed multiple times, for example 20 times within a method?
I want to perform a bitwise-AND operation in VB.NET, taking a Short (16-bit) variable and ANDing it with '0000000011111111' (thereby retaining only the least-significant byte / 8 least-significant bits).
I have an array of a structure and I need to assign an element of this array to a variable of the same type. In vb6 I'd use something like the following pseudo-
I have some code that i cant work out why its happening and how to fix it. What im attempting to do is loop through the controls in a gridview and replace it with another control along with the text
Dim i As Integer Dim row As GridViewRow Dim rowCell As TableCellCollection = row.Cells
i have PDF forms creating .exe application using Crystal it is giving some times "Not enough memory for operation" error in production intermittently for below code. the error is not reproduced in TEST if i reset the same claim in next batch , it is creating PDF form without fail the server has enough memory the application is in .NET2003
I have installed vb.net 2010 express , but when I run It I get : "Error , the operation could not be completed".And I cannot do nothing with visual studio 2010.
I am calling a dll function from my dowork event. When i click on cancel button, i want the background worker to stop executing thread. Im using VB 2008 Express edition.
I am using an httpWebRequest in my windows app to download files from a webserver (sURL), to a local folder (fileDestination) as such: Public Function DownloadFile(ByVal sURL As String, _ ByVal fileDestination As String, _ ByVal WebRequestType As String) As Boolean Dim URLReq As HttpWebRequest Dim URLRes As HttpWebResponse [Code] .....
This works fine for the first few files. But then it starts giving the error: "operation has timed out" on the URLReq.GetResponse line.
I'm working in a windows app. with vb.net it is working very fine with me but after I make it as a setup file and install it it shows an error.I will explane the problem hereunder:the App. is for importing the data from xsl.file(user select it from file dialog)and store it in DB access file. It works pretty good when it is running in VS .. but after installation it is not.The error msg: "Operation must use an updateable query.""When JIT debugging is enabled, any unhandled exception.will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box."
I have an error when I try update values from one data table into another.I am using microsoft access 2007.For the datatable in question I can Insert data into it no problem, but I get the following error when trying to update -
Operation must use an updateable query.I dont think it can be a permissions problem or a file access problem because I can execute an insert sql query on the same file.
I've a problem using simple logarithm function Log in some ButtonClick Event. Log is underlined with next warning:System.Diagnostics.Log is not accessible in this context because it is Friend.
Have I missed something or this happens because of the Express version of Visual Basic?
I am using a BackgroundWorker, an OleDBDataReader, a DataGridView to retrieve records asynchronously from an Access database. I call ProgressChanged event from the DoWork event every time I retrieve a record. In ProgressChanged event I add that record to the DataGridView and also update a label. There are about 2000 records to retrieve.I have two problems:Although I'm running an asynchronous operation, the UI remains unresponsive unless I use Thread.Sleep() inside the DoWork event (Why?). Using Sleep() method with an argument of 1 causes the process to run 20 times slower! (Process takes about 1 second if I comment out the 'Threading.Thread.Sleep(1)' line, compared to 20 seconds if I use it.) What can I do to get a responsive UI and a fast background operation (at least not 20 times slower!)?The other problem I am facing is: if I close the form while the asynchronous operation is ongoing, I get this exception (I think in the ProgressChanged event): Exception has been thrown by the target of an invocation. I tried using FormClosing event to end the process but no luck. How to fix this?
I instal my program to other pc and now when i want to use it.it pop out "Operation must use updateable query".when i create it. it run perfectly.but when i instal to other pc.it pop up this error.what can i do to run my program perfectly on others pc...?
I am creating a CHAT interface for my game (when networking, server/client style) and I ran into a little problem..The way it works... I have forms for the SERVER (frmServer) and CLIENTS (frmClient) each of them have a LISTBOX (lbChat) in which I input (lbChat.Items.Add(string)) text as the users type it - in essence a chatbox...
So, let's use the CLIENT as an example (as it is simpler and the concept the same in both client and server cases)The Client form (frmClient) creates a thread that is used to listen for chat messages (via TCP) - so what I did was pass the listbox itself (lbChat) to the thread thus (I thought) solving my problem of writing into the listbox when chat messages arrive (and are caught by the thread and not frmClient of course)Now while debugging the code I get the following exception when my thread attempts to write in the listbox (lbChat) of frmClient General Exception: System.InvalidOperationException: Cross-thread operation not valid: Control 'lbChat' accessed from a thread other than the thread it was created on.
So now the question is how do I work around this cross-thread exception? How do I pass information (chat text) from my listener threads (and there will be multiple of them in the field, one per client) to the centralized listbox (lbChat) on the form?I need some kind of method to transfer information while also reducing the chances of running into contention issues (do I need to use ReaderWriterLock?), thing is I have no clue how to accomplish this task (I thought simply passing in the listbox would allow me to write to it in each of the threads).
I have a WPF application in which i have to do a long running task (basically reading from network). Just to give you a snapshot I am doing the following thing on button click
Dim t As Task(Of String) = Task.Factory.StartNew(Of String)(Function() 'Thread.sleep is simulating long running task that will make UI unresponsive Thread.Sleep(10000)
[Code].....
I cannot use Event based async methodology because the reading API actually exist in a dll which i refer in my program, that contains a function Public function ReadFromNetwork() as String. This API is making an async call to network to read a long string and return to UI. So, in short i m doing TextBlock1.Text = ExternalDll.ReadFromNetwork().
but the problem is that even if i use Task asynchrony, the UI is still unresponsive.
I am programming an ordering site in VB.Net and ASP.Net.I start with the main ordering form and the idea is that the user will select a subject from the drop down list and then click a button to retrieve all modules associated with that subject in a second form (smaller than the main order form).I have created the second form (frm2) and added content to it.In the main form inside the method which represents the button being clicked, I have coded the following:
Dim frm As New frm2() frm.show()
I then get an error that show has not been declared and so I create a method stub for it.I run the program and when I click on the button I get the following error:'method or operation is not implemented.'This points to the following line in the 2nd form:
Sub show() Throw New NotImplementedException End Sub
what I need to put inside this method to make my second form load when the button is clicked?
I am using a DataReader to get data from a database. For some reason, I keep getting this error "Arithmetic operation resulted in an overflow." The error occurs on the line: courseID = (dr.Item("courseId"))