473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Microsoft.VisualBasic NameSpace Not Being Recognized in Form

Hi.

I have a utility program that has a form that allows a user to select a file.
I'm then using the LEFT Function to get some information.
sNewFilePathName = Left(sFilePathName, iCnt)
I'm getting this following error message when I compile:
C:\VB.NET\AppendCRLF\AppendCRLF\Form1.vb(106): 'Public Property Left() As
Integer' has no parameters and its return type cannot be indexed.

When I use the following I don't get the error message:
sNewFilePathName = Microsoft.VisualBasic.Left(sFilePathName, iCnt)

I'm confused. I shouldn't have to use "Microsoft.VisualBasic" as when I
checked the properties for the solution, I see Microsoft.VisualBasic as a
project import under the "Imports" section.

Any suggestions?

TIA,
Rita
Sep 27 '05 #1
2 4010
Hi Rita,

The form has a public property 'left': Gets or sets the x-coordinate of a
control's left edge in pixels. You app supposed the at left in your code
referred to that, which is why you need the full namespace reference.

HTH,

Bernie Yaeger

"RitaG" <Ri***@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
Hi.

I have a utility program that has a form that allows a user to select a
file.
I'm then using the LEFT Function to get some information.
sNewFilePathName = Left(sFilePathName, iCnt)
I'm getting this following error message when I compile:
C:\VB.NET\AppendCRLF\AppendCRLF\Form1.vb(106): 'Public Property Left() As
Integer' has no parameters and its return type cannot be indexed.

When I use the following I don't get the error message:
sNewFilePathName = Microsoft.VisualBasic.Left(sFilePathName, iCnt)

I'm confused. I shouldn't have to use "Microsoft.VisualBasic" as when I
checked the properties for the solution, I see Microsoft.VisualBasic as a
project import under the "Imports" section.

Any suggestions?

TIA,
Rita

Sep 27 '05 #2
Thanks Bernie. I suspected that as I have another project that does not use a
form in which I use the Left function with no problem.

"Bernie Yaeger" wrote:
Hi Rita,

The form has a public property 'left': Gets or sets the x-coordinate of a
control's left edge in pixels. You app supposed the at left in your code
referred to that, which is why you need the full namespace reference.

HTH,

Bernie Yaeger

"RitaG" <Ri***@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
Hi.

I have a utility program that has a form that allows a user to select a
file.
I'm then using the LEFT Function to get some information.
sNewFilePathName = Left(sFilePathName, iCnt)
I'm getting this following error message when I compile:
C:\VB.NET\AppendCRLF\AppendCRLF\Form1.vb(106): 'Public Property Left() As
Integer' has no parameters and its return type cannot be indexed.

When I use the following I don't get the error message:
sNewFilePathName = Microsoft.VisualBasic.Left(sFilePathName, iCnt)

I'm confused. I shouldn't have to use "Microsoft.VisualBasic" as when I
checked the properties for the solution, I see Microsoft.VisualBasic as a
project import under the "Imports" section.

Any suggestions?

TIA,
Rita


Sep 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shaun | last post by:
I have read a number of resources that explain that the MyServices found in VB.NET2005 can be used in C# by adding a reference to Microsoft.VisualBasic.dll and then using the...
2
by: darrel | last post by:
I've built a control. At the top of my control, I have this: Imports Microsoft.VisualBasic Then, later, I call a function like this: DateTime.Now.Year.ToString() This works fine on my...
15
by: Phill. W | last post by:
Is anyone writing VB.Net (2003) code /without/ referencing the Microsoft.VisualBasic namespace(?), regardless of whether its Import'ed or not? The Powers That Be here are trying to introduce a...
2
by: Steve | last post by:
Having only recently migrated across from VB6 to VB.NET I'm still unsure whether or not I should be making (heavy) use of the Microsoft.VisualBasic namespace in new applications. I've read a lot...
2
by: RitaG | last post by:
Hi. I have a utility program that has a form that allows a user to select a file. I'm then using the LEFT Function to get some information. sNewFilePathName = Left(sFilePathName, iCnt) I'm...
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
1
by: Tom Kearney | last post by:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I...
16
by: cj | last post by:
I am under the impression they are obsolete methods included for backward compatibility. For instance is using filedatetime("c:\myfile.txt") still the accepted way of getting the date...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have two questions with regards to the LEFT function. I ran into a problem with the LEFT function today. I knew it was a valid Function, but when I tried to use it, it was getting interpreted...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.