carriage return in a webbrowser control

vb6 Australia
  • 6 years ago

    I have a webbrowser control that points to a website that has an html form in it.  From the users perspective everything works just like internet explorer in the webbrowser control with the exception of putting a carriage return in html form field (textarea).  This control seems to ignore user "carriage returns".  <tabs> work like they should, going from one html field to another within the webbrowser control.

  • 6 years ago

    try using ctrl+enter


    this should enter a carriage return into the text field

  • 6 years ago
    Tried that and several other key combinations(shift-enter,shit-ctl-enter).  They didn't work.
  • 6 years ago
    what website are you loading in the webbrowser control?
  • 6 years ago

    Any webpage with a texteara field will not put a carriage return with ctrl-enter or enter.  Fortunately for me I finally did find a key that would put an enter in this html form field, ctl-m.
    I was working with MS access and here is what I did to make "carriage return" work like it should on a textarea field.


    You set the keypreview to "on" on the main form.
    On the main form put this code on the keyup event


    if keycode = 13 then
     sendkeys "^m"
    end if


    If this has helped anyone send an email to williamhall@brooklyngroup.com.au,
    at least I know I wasnt the only one to run into this problem.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook