I use statements like LEFT(textstring,6) in my app. I have "Imports
Microsoft.VisualBasic" at the top of the code but to use LEFT I have to code
:
Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its
return type cannot be indexed"
How can I get the VisualBasic version of Left as the default?
--
------------------------------------
Wayne Wengert wa***@wengert.org 7 8346
Did you use Left as a variable or function name?
"Wayne Wengert" <wa***@wengert.org> wrote in message
news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to
code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
Are there other namespaces that implement a "Left". The form in question has
the following namespaces
Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Char ' Allows use of ControlChars.nnnn
Imports System.Data.OleDb
Wayne
"dfsdf" <sd****@sdfsdff.dfs> wrote in message
news:Ob********************@rwcrnsc51.ops.asp.att. net... Did you use Left as a variable or function name?
"Wayne Wengert" <wa***@wengert.org> wrote in message news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
You don't have to manually import the Microsoft.VisualBasic namespace --
Visual Studio does that implicitly for VB projects. You should be able to
use "Left" (and other VB keywords) automatically, without the Imports...
statement and without using the fully-qualified name.
Your problem looks like a namespace conflict. Try right-clicking on the
Left keyword in the module, and select "Go to definition" -- it'll bring up
the object browser, and highlight the method it's trying to use (the other
Left.)
Just to play Devil's advocate, have you considered using the .Net framework
equivalents for Left and other VB keywords? For example, you could replace
"x = Left(MyString, 5)" with x = MyString.Substring(0, 5). There's nothing
wrong with using the VB functions, but in my opinion it's generally a better
practice to use the .Net equivalents when possible.
Check out these links: http://msdn.microsoft.com/library/de...et0_update.asp http://msdn.microsoft.com/vbasic/usi...tinternals.asp
Hope this helps,
Robert Jacobson
"Wayne Wengert" <wa***@wengert.org> wrote in message
news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to
code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
Hmmm.. that gets me....
<System.ComponentModel.BrowsableAttribute(False) ,
System.ComponentModel.DesignerSerializationVisibil ityAttribute(0),
System.Windows.Forms.SRCategoryAttribute("CatLayou t"),
System.Windows.Forms.SRDescriptionAttribute("Contr olLeftDescr"),
System.ComponentModel.EditorBrowsableAttribute(0)>
Public Property Left As Integer
Member of System.Windows.Forms.Control
I don't see how to find what control has a "Left" property. I'll check out
the links you provided.
Wayne
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... You don't have to manually import the Microsoft.VisualBasic namespace -- Visual Studio does that implicitly for VB projects. You should be able to use "Left" (and other VB keywords) automatically, without the Imports... statement and without using the fully-qualified name.
Your problem looks like a namespace conflict. Try right-clicking on the Left keyword in the module, and select "Go to definition" -- it'll bring
up the object browser, and highlight the method it's trying to use (the other Left.)
Just to play Devil's advocate, have you considered using the .Net
framework equivalents for Left and other VB keywords? For example, you could
replace "x = Left(MyString, 5)" with x = MyString.Substring(0, 5). There's
nothing wrong with using the VB functions, but in my opinion it's generally a
better practice to use the .Net equivalents when possible.
Check out these links:
http://msdn.microsoft.com/library/de...et0_update.asp http://msdn.microsoft.com/vbasic/usi...tinternals.asp Hope this helps, Robert Jacobson
"Wayne Wengert" <wa***@wengert.org> wrote in message news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
Wayne,
Remember Left & Right are a properties of System.Windows.Forms.Control,
System.Windows.Forms.Form inherits from Control.
If you want to use the VB.Left or VB.Right functions within a Form or
UserControl, you need to prefix it with a namespace.
One handy method is to use
Imports VB = Microsoft.VisualBasic
for your import, then you can use VB.Left to call the function.
Hope this helps
Jay
"Wayne Wengert" <wa***@wengert.org> wrote in message
news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to
code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
Great tip - didn't know you could do that.
Wayne
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl... Wayne, Remember Left & Right are a properties of System.Windows.Forms.Control, System.Windows.Forms.Form inherits from Control.
If you want to use the VB.Left or VB.Right functions within a Form or UserControl, you need to prefix it with a namespace.
One handy method is to use
Imports VB = Microsoft.VisualBasic
for your import, then you can use VB.Left to call the function.
Hope this helps Jay
"Wayne Wengert" <wa***@wengert.org> wrote in message news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I have "Imports Microsoft.VisualBasic" at the top of the code but to use LEFT I have to code : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with the message
"Public Overloads Property Left() As Integer has no parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
re devils advocate - note that the VB string handling
functions are in some but not all cases faster than using
SubString - there is an MS doc that covers this but I
havent got the url to hand
hth
guy -----Original Message----- You don't have to manually import the
Microsoft.VisualBasic namespace --Visual Studio does that implicitly for VB projects. You
should be able touse "Left" (and other VB keywords) automatically, without
the Imports...statement and without using the fully-qualified name.
Your problem looks like a namespace conflict. Try right-
clicking on theLeft keyword in the module, and select "Go to
definition" -- it'll bring upthe object browser, and highlight the method it's trying
to use (the otherLeft.)
Just to play Devil's advocate, have you considered using
the .Net frameworkequivalents for Left and other VB keywords? For example,
you could replace"x = Left(MyString, 5)" with x = MyString.Substring(0,
5). There's nothingwrong with using the VB functions, but in my opinion it's
generally a betterpractice to use the .Net equivalents when possible.
Check out these links:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnguinet/html/drguinet0_update.asp http://msdn.microsoft.com/vbasic/usi...standing/defau
lt.aspx?pull=/library/en-
us/dv_vstechart/html/vbtchmicrosoftvisualbasicnetinternals.
asp Hope this helps, Robert Jacobson
"Wayne Wengert" <wa***@wengert.org> wrote in message news:OB**************@TK2MSFTNGP10.phx.gbl... I use statements like LEFT(textstring,6) in my app. I
have "Imports Microsoft.VisualBasic" at the top of the code but to
use LEFT I have tocode : Microsoft.VisualBasic.Left(sting, integer)
If I code just "Left" it is flagged as an error with
the message "Public Overloads Property Left() As Integer has no
parameters and its return type cannot be indexed"
How can I get the VisualBasic version of Left as the
default? -- ------------------------------------ Wayne Wengert wa***@wengert.org
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Claire |
last post by:
Hello,
I am having a problem in my struts application with the checkboxes in
my form. I have an array of checkboxes, some of which may be already
selected when the form loads. My problem is when...
|
by: Bruce Duncan |
last post by:
I'm a bit new to MySQL (know MS SQL well...and that may be the
problem...getting the syntax confused) and I'm having a join problem...can
anyone offer some help? Here's my problem:
I have table1...
|
by: JesusFreak |
last post by:
From: us_traveller@yahoo.com (JesusFreak)
Newsgroups: microsoft.public.scripting.jscript
Subject: toolbar script problem
NNTP-Posting-Host: 192.92.126.136
Recently, I downloaded the following...
|
by: B McDonald |
last post by:
Hi. I am trying to straighten out some DIV issues in the rendering of my
no-tables CSS website. Right now the biggest issue is trying to render 2
columns several DIVs deep in the box model for my...
|
by: Stephen Melia |
last post by:
Hello,
I've just done a redesign of website, and it's gone terribly wrong for
Internet Explorer 6. I have a two column layout, and for some reason
links in the right hand column cannot be...
|
by: books1999 |
last post by:
Hi there,
I have a problem with this css/div and i cannot work it out. I would
like either container to be able to push the background box to grow but
in Firefox it overflows. Can someone find a...
|
by: knoxautoguy |
last post by:
This problem has consumed a lot of my time, and I'm aftraid someone
will tell me that my whole approach to this objective is wrong;
however, I would like to know if there is a way to do this.
I...
|
by: sjickells |
last post by:
Hi
I am having a problem using asp:TextBox's in a transparent table.
I have a background image on the page and a table in the middle of the
page. I have set the background colour of the table...
|
by: davidson1 |
last post by:
Hai friends..for menu to use in my website..i found in one website....pl look below website....
http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm
i downloaded 2 files....
...
|
by: pradeepjain |
last post by:
I have a 3 column layout left<->content<->right<->.I made a css and html in such a manner that when there is no left sidebar the content region starts from left side and takes whole width of left on...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |