Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8749915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:46:23+00:00 2026-06-13T12:46:23+00:00

In VB6 I have such code: IsLast = Abs(CursorPos = Len(numText.Text)) What evaluates false

  • 0

In VB6 I have such code:

IsLast = Abs(CursorPos = Len(numText.Text))

What evaluates false to 0 and true to 1.

This line of code produces error in VB.NET.

How to write this properly?

EDIT:
The error is:

Error   15  Overload resolution failed because no accessible 'Abs' can be called without a narrowing conversion:
'Public Shared Function Abs(value As Decimal) As Decimal': Argument matching parameter 'value' narrows from 'Boolean' to 'Decimal'.
'Public Shared Function Abs(value As Double) As Double': Argument matching parameter 'value' narrows from 'Boolean' to 'Double'.
'Public Shared Function Abs(value As Single) As Single': Argument matching parameter 'value' narrows from 'Boolean' to 'Single'.
'Public Shared Function Abs(value As Long) As Long': Argument matching parameter 'value' narrows from 'Boolean' to 'Long'.
'Public Shared Function Abs(value As Integer) As Integer': Argument matching parameter 'value' narrows from 'Boolean' to 'Integer'.
'Public Shared Function Abs(value As Short) As Short': Argument matching parameter 'value' narrows from 'Boolean' to 'Short'.
'Public Shared Function Abs(value As SByte) As SByte': Argument matching parameter 'value' narrows from 'Boolean' to 'SByte'.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:46:24+00:00Added an answer on June 13, 2026 at 12:46 pm
    IsLast = If( CursorPos = Len(numText.Text), 1, 0 )
    

    Are you trying to migrate a larger chunk of VB6 to VB.Net?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VB6 program with this line: strDate = Format(Date, ddmmmyyyy) I need
I have a VB6 application running for years. This application always reference Excel 2003
we have a VB6 binary executable that comes with no source code. And we
I have a VB6 dll that is loaded by a VB6 frontend. This VB6
I have a VB6's Application that is in production environment right now, this application
I have to rewrite some my old code from VB6 to VB.NET and here
In my VB6 program, I have tons of hotkeys such as X, A, D...
I have a vb6 application that prints string to a text file. my string
We have an enterprise VB6 application, this application require access to many shared resources.
I have a VB6 form with buttons with the text 'Continue' and 'Cancel'. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.