Results 1 to 19 of 19

Thread: [RESOLVED] Hello to all - textbox question

  1. #1

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Resolved [RESOLVED] Hello to all - textbox question

    I have code that will take a occupied textbox and that text/string would be the filename

    But I copy and paste that string/text from some other document it does not save the file

    Now If I type in the same string - it works

    I've messed around with the focus property of that text box (in code) but nothing succeeds unless I type in that string

    There has to be something hidden - in the text box behavior - like a property that "sees" that string no matter how its put there

    Just guide me to a possible fix

    Thanks
    Jeff
    Last edited by habenero; May 28th, 2020 at 12:06 PM. Reason: typos

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Hello to all - textbox question

    after the text is copied in, how do you continue? Command button click? Enter Key?
    Sam I am (as well as Confused at times).

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Hello to all - textbox question

    From what other type document? Notepad, Word, Excel????
    Sam I am (as well as Confused at times).

  4. #4

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    I copy and paste from a PDF doc - I use the enter key on both methods

  5. #5
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,398

    Re: Hello to all - textbox question


  6. #6

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    JDC and the rest thanks for the ultra quick replies - did go thru the link and read the banter and possible solutions

    I guess I am just guilty of being lazy. I can type the filename in and it always works

    "copy and paste" and the enter key never works

    again thanks to all and I will just type in the filename

    stay safe

    Jeff

  7. #7

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    JDC and the rest thanks for the ultra quick replies - did go thru the link and read the banter and possible solutions

    I guess I am just guilty of being lazy. I can type the filename in and it always works

    "copy and paste" and the enter key never works

    again thanks to all and I will just type in the filename

    stay safe

    Jeff

  8. #8
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Hello to all - textbox question

    Jeff---just for grins, copy something from a Word Document, or Notepad. Work?
    Sam I am (as well as Confused at times).

  9. #9

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    Yup done it - no luck (used notepad)

    I guess I just want to understand what the difference is when a user types in something in a text box - it works

    but copy and paste doesnt behave the same way

    and again using the enter key on both instances

    Jeff

  10. #10

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    Yup done it - no luck (used notepad)

    I guess I just want to understand what the difference is when a user types in something in a text box - it works

    but copy and paste doesnt behave the same way

    and again using the enter key on both instances

    Jeff

  11. #11
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,398

    Re: Hello to all - textbox question

    You have not shown us the code you are using to get something to happen when text is entered. Post the code and we can probably answer your questions.

  12. #12

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    Private Sub cmd_save_Click()
    Form1.Caption = "Jeffs super duper audio recorder - with pause capabilities"
    Txt2_text.Enabled = True
    Txt2_text = Time
    MMControl1.FileName = "C:\Windows\Media\recordings XM" & (Text2.Text) & ".wav"
    MMControl1.Command = "Save"
    End Sub

    I know by far its clumsy coding - sorry

    Jeff

  13. #13

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    Private Sub cmd_save_Click()
    Form1.Caption = "Jeffs super duper audio recorder - with pause capabilities"
    Txt2_text.Enabled = True
    Txt2_text = Time
    MMControl1.FileName = "C:\Windows\Media\recordings XM" & (Text2.Text) & ".wav"
    MMControl1.Command = "Save"
    End Sub

    I know by far its clumsy coding - sorry

    Jeff

  14. #14
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Hello to all - textbox question

    WHAT is this---"Txt2_text = Time"????
    Sam I am (as well as Confused at times).

  15. #15
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Hello to all - textbox question

    And, what does that have to do with any copy-paste into the textbox?
    Sam I am (as well as Confused at times).

  16. #16

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    I have used a string constant with no avail (not just using the text box contents)
    I know I would stir up jibes and chuckles

    Thats why I didnt post the code in the 1st place

    But in my defense I do not see what the behavior of the text box has to do with this clumsy sloppy code

    oh well - its all ok. If I should be chastised - it should be for being lazy and just type in the filename. Then the text box works

    Jeff

    I know I should use a different text name/pseudo-name for the "time". It shows the user (only me) the end of the recording.

    I could show the whole enchilada but I cant see how that is relevant to this issue. Its no big deal - honest

  17. #17
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Hello to all - textbox question

    You must have something in the _KeyPress (or _KeyDown) event that enables the output.
    You will need to enable the output also in the _Change event of the TextBox.

  18. #18

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    I have used a string constant with no avail (not just using the text box contents)
    I know I would stir up jibes and chuckles

    Thats why I didnt post the code in the 1st place

    But in my defense I do not see what the behavior of the text box has to do with this clumsy sloppy code

    oh well - its all ok. If I should be chastised - it should be for being lazy and just type in the filename. Then the text box works

    Jeff

    I know I should use a different text name/pseudo-name for the "time". It shows the user (only me) the end of the recording.

    I could show the whole enchilada but I cant see how that is relevant to this issue. Its no big deal - honest

  19. #19

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    224

    Re: Hello to all - textbox question

    Eduardo - Bingo! Thats what I was looking for. Will try that and see if that works. Will scoot

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width