By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,422 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,422 IT Pros & Developers. It's quick & easy.

Microsoft.VisualBasic NameSpace Not Being Recognized in Form

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.