Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem with TextBox

Problem with TextBox

Scheduled Pinned Locked Moved Visual Basic
questiondatabasehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pradhip
    wrote on last edited by
    #1

    HI Folks i use a text box for my applicationa nd am right nowhaving 2 problems that i need to address. 1). Whenever that text box gains focus for user to input data the cursor goes and stands right in the middle of the first line,While i want it to stand at the extreme left ahnd top corner.Now what property of the textbox do i need to meddle with to get what i want.i tried so many things but nothing seems to work. 2). when i use the ' symbol in my data input inside the text box like say "I've a good car" im not able to input data inside the databse becos of the "'" symbols importance in a database.now how do i overcome it.do i ahve to search for every text in my text box for that occurence and change it to something else?? Regards Pradhip Swaminathan Why Need Parking lots in Bars when Drunken Driving is Prohibited

    Richard DeemingR 1 Reply Last reply
    0
    • P Pradhip

      HI Folks i use a text box for my applicationa nd am right nowhaving 2 problems that i need to address. 1). Whenever that text box gains focus for user to input data the cursor goes and stands right in the middle of the first line,While i want it to stand at the extreme left ahnd top corner.Now what property of the textbox do i need to meddle with to get what i want.i tried so many things but nothing seems to work. 2). when i use the ' symbol in my data input inside the text box like say "I've a good car" im not able to input data inside the databse becos of the "'" symbols importance in a database.now how do i overcome it.do i ahve to search for every text in my text box for that occurence and change it to something else?? Regards Pradhip Swaminathan Why Need Parking lots in Bars when Drunken Driving is Prohibited

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2
      1. Try this in the Focus event: TextBox1.SelectionStart = 0 and TextBox1.SelectionLength = 0
        (In VB6, these are called SelStart and SelLength)
      2. sValue = TextBox1.Text.Replace("'","''"),
        or in VB6, sValue = Replace(TextBox1.Text, "'", "''")

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups