Do XOR Operation In VB?

Jan 26, 2012

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.

View 2 Replies


ADVERTISEMENT

Convert A Delphi Copy Operation To A .Net Substring Operation?

Jan 4, 2012

I'm trying to convert code from Delphi to .Net. I'm stuck on one line:

//Delphi code ss := Copy(ss, Length(ss), 1) + Copy(ss, 1,Length(ss) - 1); 'vb.net code ss = ss.Substring(0, ss.Length - 1) + ss.Substring(1, ss.Length - 1)

Delphi combines the two substrings, while .Net just concatenate them like a copy.

View 2 Replies

How To Do A Drag Out Operation

Aug 17, 2009

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

View 2 Replies

I/O Operation Has Been Aborted

Jun 11, 2012

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.

View 6 Replies

Progressbar Does Not Run During Operation

Oct 14, 2010

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

[Code]....

View 2 Replies

.net - Operation In String Array Using .NET?

Apr 27, 2012

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?

View 1 Replies

.Net Linq - Doing Operation On The Subset

Jun 16, 2010

I need to have the following : (name1 + "a") + (name2 + "a") + ...

Dim separator() As String = {"|"}
myString.Split(separator, StringSplitOptions.None).SomeLinq(...)

I don't know what to add at the end to add an "a" to each element...

View 2 Replies

Boolean - Bitwise-AND Operation In .NET?

Oct 28, 2010

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).

View 3 Replies

Can't Figure Out The Format For This Operation?

Jun 13, 2012

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-

View 3 Replies

Enumeration Operation May Not Execute?

May 18, 2012

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

[Code].....

View 1 Replies

Error : Not Enough Memory For Operation

Aug 20, 2010

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

rpt1.ExportToDisk(ExportFormatType.PortableDocFormat, sPdfFile)

View 3 Replies

Error : The Operation Could Not Be Completed

Jun 25, 2011

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.

View 1 Replies

How Does 'Undo' Operation Work?

Mar 12, 2012

How does the "Undo" operation work? Not looking for a specific code, I am just curious to how it works.

View 3 Replies

How To Cancel Background Operation

Sep 14, 2009

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.

View 1 Replies

HTTPWebRequest - Operation Has Timed Out

May 26, 2011

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.

View 2 Replies

IDE :: Operation Must Use Updateable Query

May 30, 2010

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."

View 4 Replies

Invalid Operation Exception?

Apr 16, 2007

have a form onto which i've place a menu item called Exit. When I click the Exit, i expect it to close the entire application.Here is the code

Private Sub mnuExitApp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExitApp.Click
Application.Exit()

[code].....

View 2 Replies

Operation Must Use An Updateable Query?

Nov 20, 2011

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.

[Code]...

View 4 Replies

Text File Operation Using VB?

Dec 29, 2010

I have to code in VB.Net to delete first 16 columns from given input .csv file .[code\...

View 2 Replies

Unable To Perform Log In Operation

Nov 4, 2009

this is the code have written am unable to perfrom the log in operation.[code]

View 1 Replies

Use Basic Math LOG Operation?

Feb 23, 2012

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?

View 1 Replies

Use Try And Catch To Retry An Operation?

Jun 22, 2011

I'd like to read from a file and if I fail, let the user retry or otherwise give up. So far the code looks like this:

Read_Again:
Try
my_stream.Read(buffer, 0, read_len)

[code].....

View 3 Replies

Why Asynchronous Operation Is Slow

Feb 2, 2012

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?

View 5 Replies

Why It Pop Out Operation Must Use Updateable Query

Apr 12, 2011

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...?

View 5 Replies

.net - How To Work Around Cross-thread Operation

May 14, 2011

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).

[Code]...

View 1 Replies

.net - Requested Clipboard Operation Failed?

Aug 5, 2010

I've using vb.net 2003 and some of the times this error arises. Can anyone know on how this error arises and how to fix it?

Error: The requested clipboard operation failed

View 3 Replies

.net - Using Task For Async Operation But UI Is Still Unresponsive

Jun 14, 2012

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.

View 3 Replies

.NET End Invoke / Post Operation Completed

Nov 20, 2009

My question involves async operations in VB .NET. Given the following:

[Code]...

View 2 Replies

.show Method Or Operation Is Not Implemented?

Jul 18, 2012

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?

View 10 Replies

Arithmetic Operation Error With Datareader

Jan 28, 2009

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"))

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved