VS 2008 Simple Threading But Strange Error

Dec 21, 2011

i have tryed using multithreading with my program with no luck/I just get a strange error thrown at me no matter what i try [code] Then i get this error:An error occurred creating the form. See Exception.InnerException for details. The error is: ActiveX control '6bf52a52-394a-11d3-b153-00c04f79faa6' cannot be instantiated because the current thread is not in a single-threaded apartment.

View 13 Replies


ADVERTISEMENT

VS 2008 Strange File Not Found Error?

Jul 20, 2010

I have a program that looks for a file named 'license.dat' upon startup. The program first checks the directory it's in, and if the license file isn't there, it prompts the user to select the license file with a file browser dialog. I have tested this code and confirmed it working in a number of different OS environments.Recently, I received reports from two users (one in Germany and one in Italy) that the program can't find the license on their computers, even though it is present in the program's directory and they manually selected it with the file browser dialog. The only commonality I'm seeing here is a lack of English OS, but beyond that I'm stumped.This is the code I'm using:

If System.IO.File.Exists(System.AppDomain.CurrentDomain.BaseDirectory + "license.dat") = False Then
File dialog code goes here

[code].....

View 5 Replies

VS 2008 - Multi Threading - Error Code

Oct 11, 2011

Wheres my error on this code...

Imports System.Net
Imports System.Threading
Public Class Form1

[CODE]...........

Basically what I want to do is that User will select how many thread w/c is the PickThread.value, then it will do the stuff.

View 11 Replies

VS 2008 Strange Error Due To "An Attempt To Free An RCW That Is In Use"?

Mar 7, 2011

Have you ever heard about that error ? It happened to me when I used code to Close an open form . But this very strange . Not only I have used this simple code (Me.Close) in numerous forms but it also happens in a weird way . You see , I have a form with a button on it . The code in the button's Click event sais Me.Close . Also , this button is set to be the Cancel button of the form . Now , when the user closes the form either by pressing the X button or by pressing the above button , nothing happens . However , and this is very weird , when the user presses the Esc key on the keyboard , the program crashes with this error message :

[Code]...

View 8 Replies

Strange ConFig Error?

Mar 8, 2011

this one has me stumped - problem is bolded

Compiler Error Message: BC30456: 'Login1_Authenticate' is not a member of 'ASP.login_aspx'
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>

[code].....

View 6 Replies

PSP Sync Program Strange Error?

Jul 26, 2008

Its a Program i created to Sync PSP with my PC (like psp manager)you browse through titles (images) add/remove/sync options plus aconnectivity test but when i start the "Sync.exe" VB Studio 2008 saysthat theres a problem with this code:

Dim Bypass
Dim Value As Short
Bypass = FreeFile()

[code].....

View 7 Replies

Strange Error Appending Fields To Recordset In VS2010 After Converting To .NET 4?

Nov 25, 2009

I have some code from this site CodeProjectLink to convert a datatable to a recordset. This code had been working fine until I changed to .NET 4 (was previously 2), now when I call the following line:

Dim result As New ADODB.Recordset()
result.CursorLocation = ADODB.CursorLocationEnum.adUseClient
Dim resultFields As ADODB.Fields = result.Fields

[code].....

View 17 Replies

VS 2008 Strange Cmbbox

May 29, 2009

I got kind a mystery situation. There's not a lot of code, only few lines but the point is that it only works partially (it saves but does not load).

I tested it with another cmbbox1, which makes it work on seperate cmbboxes but not on either one or onother on their owns.[code..]

I got other cmbBoxes with titles on them loaded from the DB and they work fully, only this one doesn't.what should I look at?

View 15 Replies

VS 2008 Strange SuppressKeyPress

Jun 28, 2011

I want to supress a key for a textbox: [code]this is working, B key is supressed,but adding just a messagebox will not work..[code]

View 1 Replies

VS 2008 Get Strange Numbers For The Output?

Oct 23, 2010

I am working on a program that takes 12 numbers that the user inputs and calculates the total and average but every time I run it it comes out to be like 6.5 and numbers like that.

' Store the starting values in total and count.
sngTotal = 0
intCount = 1

[code].....

View 2 Replies

VS 2008 Strange Output By Use Of LineInput

May 31, 2012

i'm using lineInput to read a text file but get a problem with a certain record.it shows [code]I've changed the encoding to utf8, ansi, ... but nothing helps. Anybody an idea what could be the cause?It only does this with the first record in the file.

View 3 Replies

VS 2008 Strange Recursive Directory Copy

Mar 19, 2009

I am using the following Recursive Directory Copy code, and am having a strange issue. I am using this to copy and directory and all subdirectories and files to removable media (flash drive). Everything copies perfectly fine except for 1 file. this occurs on the same file every time and sometimes the file copies successfully, but other times it does not.The problem file is a 7-zip archive with a .7z file extension.When it does not successfully copy, the file is only 8 bytes on the flash drive.[code]

View 5 Replies

Threading Error - Cannot Use RichTextBox

Apr 1, 2010

I need to ping to a port. It is working, then I tried multi threading. I need to show the result in richtext box, but it shows error.

The code is
Imports
System.Threading
Public
Class Form1
Dim t As Thread = New Thread(AddressOf Me.ProcessBioAdmin)
[Code] .....

Error got is:
Cross-thread operation not valid: Control 'RichTextBox1' accessed from a thread other than the thread it was created on.

View 2 Replies

Threading Error On Form Close

Aug 15, 2011

I'm upgrading some code from VB2003 to VB2010. I'm now getting an error when I try to close a form from a media player event.

[Code]...

View 2 Replies

Strange Behavior Between SQL Server 2008 R2 And VS2010 (Win7 And WinXP)

May 16, 2012

I develop my VS2010 project in my laptop with SQL 2008 Standard. In my laptop everything is working good, using the following connect string as global public string when the main form loads:

[Code]...

View 12 Replies

VS 2008 Strange Message About A Package That Failed To Load Properly

Aug 10, 2011

Suddenly today , when I started my computer and went on to open the VS , I got this strange message: Do you know what it might mean ? I didn't installed anything on my PC for a long time, so I can't think of anything ...

View 8 Replies

Threading Error - Protocol Version Not Supported?

Jul 26, 2011

So I have some users that are getting error: This Protocol Version is Not Supported on the following line of code in Red:

Private mobjThread As Thread

Private Sub StartServer()
Try[code].....

I am not able to recreate it on my machine or the 4 other local machines I have tested it on here.

View 6 Replies

Instantiate Multiple Sql Connections To The Same Database Via Threading Without Getting An Error?

Apr 8, 2011

I'm running a program where I call a function which creates a database connection and then runs a stored procedure. I call this function four times from four separate threads. I get an error (Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.

Exception Source:
.Net SqlClient Data Provider)
when I use multiple threads, but if I have the threads run one after another I have no

[code].....

View 1 Replies

Multi Threading - Automatic Error Notification System

Feb 1, 2010

Multi threading in vb.net, in one of our program I provided an automatic error notification system that gives alert to my email when an exception error is occurred. The error notification includes the name of the form, the exception error details, the event name and the screenshot of the software during that particular instant.

View 6 Replies

Game Programming :: Simple File Error

Aug 16, 2009

I am making a little game for my friend in Visual Basic 2008. It uses 3 files (gamedataidname.txt, gamedataidlevel.txt, gamedataidgold.txt).

When the play button is clicked, I wrote some code to check if the file exists and display the content of the 3 files. This part works fine. But then I have a 'Else' statement to create the files.[code]...

View 6 Replies

Simple Form - DateDiff Error Message ?

Sep 3, 2009

While a fairly simple form it has had its problems. The latest is an error message (see below) that I do not understand and hence cannot correct. I have looked at the other postings, but did not see one that would apply.

CODE:

View 5 Replies

Cross Threading Operations In VB 2008?

Oct 27, 2010

I'm using Visual Basic 2010I've created a ListBox and a BackgroundWorker using designerI want to change the location of listbox using backgroundworker but I get the error as follows:"InvalidOperationException was Handled by user code:"Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on

View 10 Replies

Serial Communication Using Threading In 2008?

Jul 5, 2009

how to do serial communication using threading in vb.net 2008,

View 1 Replies

VS 2008 Memory Management & Threading?

Sep 28, 2010

I have an application that requires the use of many threads. How do i monitor the memory consumption of my application?And how can i monitor the CPU usage of my application if possible?And is it possible to monitor the memory consumtion and CPU usage of each of these threads?And is it possible to limit or prioritize the memory consuption or cpu usage of the whole application or of each thread?

View 5 Replies

VS 2008 Multi Threading Query?

Apr 22, 2009

after i get a successful ping response i need to send an HTTP request to the device examine the response and then display it. i'm trying to multi thread the 2nd bit with no joy so far.

Imports System.Net
Imports System.Net.NetworkInformation
Imports System.Threading

[code].....

View 2 Replies

VS 2008 Multi-Threading With More Than Two Threads?

Jun 5, 2009

I would like some advice on multi-threading. I currently utilize two threads, one for the GUI, and the other for calculations. This works well, but I want to improve my multi-threading techniques. Currently the data is with the calculation thread, and this occasionally this will cause a slow down. I want to put the data on its own thread. Giving me three threads, Data, UI, and Calculations. This should improve responsiveness, and not be overwhelmingly complex.

My problem is, this no longer fits into the parent child relationship well. All three threads need to interact with each other. My question is, what is the better way of dealing with more than two threads, when all the threads need to interact with each other. Should I pick one thread as the ultimate parent, say the data thread (I pick this one, because it seems to me this thread will be the most free.) Then have the calculation thread and the UI thread children of the data thread. Then when I have a need for the UI thread to explicitly call the calculation thread, I do this through a function in the data thread.

View 2 Replies

VS 2008 Process Cancellation And Threading?

Dec 8, 2009

I have an application I'm working on that is essentially an Excel workbook generator (special input files for our wireshop machinery). Therefore, it's process is lengthy.

Is it possible to build a Cancel feature while it is looping through its collections to process these files?

If so, would I need to implement multi-threading?

View 15 Replies

VS 2008 Program Logic With Threading

Nov 22, 2010

I have an application that I need to automate where at a certain time each day, say 6pm, it will run a certain method(which is to check a database for key terms and then access the api to search for these terms). But there is the main process which is running all the time accessing the stream api so when the search is complete, it interrupts the stream and hands over the new terms. Now I thought of adding the .exe file to windows task scheduler but not sure if that would work. The stream method runs indefinitely and at 6pm each day another process needs to run. I thought of using the system.threading.task TaskFactory but I am using visual studio 2008 ( I do have .net framework 4.0)If it launches using the task scheduler as 6pm with my code logic as follows:[code]

I see how this would eat the CPU...the streaming process is basically following a list of user profiles listening for new activites and storing these as XML files. This a real time feed to an API. At a specific time once a day, a second process needs to go access a database for new ids, and if there are new ids, then go to a search API and get new user profiles. This is the main criteria..once the new user profiles are found, the list that the stream users needs to be updated so the process will be interrupted for a second or just paused and then continue processing.

View 10 Replies

VS 2008 System.Threading.ManualResetEvent?

Oct 28, 2009

I'm just looking for other people's thoughts and opinions on the way I have done something.I have a console application which needs to connect to various computers and reset the local admin password on each one. I got it all working but then decided that as there are a lot of PCs, it would be a good idea to use the thread pool to do a few at the same time.The problem is, I need this program to be run without any human interaction - so I cant just use ThreadPool.QueueUserWorkItem and pass it all of the computers to connect to, because then the program would exit after it had called QueueUserWorkItem for each one because there is nothing left for it to do. I cant stick a Console.ReadLine in there because like I said, it needs to be run automatically without anyone typing anything.

View 1 Replies

VS 2008 TCP Client/Server Threading?

Nov 11, 2009

Is is possible for the server to give all clients that are connected to it a separate threading starting from 1-2-3-etc that will be display there username on a listview. Server can now connect to any of them by clicking on one of the items in the listview.

EX: Multi-Clients Connect to server ---> Server gives each one a separate thread starting with 1 ----> Client sends username to server -----> Server displays them on listview ---> Server can now double click or whatever on the item ---> Pulles up thread count and connects to it.

View 1 Replies







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