Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2005, 03:35 AM
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multithreading Error in VB.Net

Hi,

I'm using windows XP professional with SP2 as Operating system and VS.NET 2003. I'm trying to create one threading application in VB.NET. When i declare variable

Dim ts as Thread

It gives me error - "Type expected".

I have imported all the required class libraries such as
"System.Threading."

The same code works fine on other machines (with 2000 Prof as operating system).

Can anyone tell me what is going wrong with the code on my machine?

Thanks,
Abhijeet

 
Old September 5th, 2005, 08:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

Are you sure you are importing System.Threading in the module?

As an alternative, did you try:

    Dim ts as System.Threading.Thread

I have exactly the same environment as you. I created a Windows project and in the form load event placed:

    Dim ts as Thread

and got a "Type 'thread' is not defined." error, not the "Type Expected" error you got.

When I placed an "Imports System.Threading" at the top of the form, the error went away. It also went away when I wrote the line as "Dim ts as System.Threading.Thread". Either way works for me...


Jeff Mason
Custom Apps, Inc.
www.custom-apps.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error In the vb.net application zrtv .NET Framework 2.0 1 March 31st, 2008 07:30 AM
MultiThreading in vb.net flyin General .NET 0 December 8th, 2004 05:50 PM
MultiThreading in VB.NET roytonmoy General .NET 0 December 2nd, 2004 03:30 AM
ASP.NET Using VB.NET Chapt 3 Code error? uh6uj All Other Wrox Books 1 February 26th, 2004 10:46 AM
i need help with this vb.net error message!! zanee VS.NET 2002/2003 2 October 13th, 2003 08:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.