locked
Text Box RRS feed

  • Question

  • I want to open a file by inputting the file name into the Text Box. I DO NOT want to input the file into the Text Box.
    Monday, December 21, 2015 7:21 AM

Answers

  • I want to open a file by inputting the file name into the Text Box. I DO NOT want to input the file into the Text Box.

    What kind of application is this (Win32, MFC, WinForms, ...)? If it is not a C++ application you are in the wrong forum.

    But basically, you need to create a form or dialog with a textbox and a button. When the button is clicked, read the file name form the text box and open the file.

    What part are you having trouble with?


    David Wilkinson | Visual C++ MVP

    Monday, December 21, 2015 10:08 AM

All replies

  • I want to open a file by inputting the file name into the Text Box. I DO NOT want to input the file into the Text Box.

    What kind of application is this (Win32, MFC, WinForms, ...)? If it is not a C++ application you are in the wrong forum.

    But basically, you need to create a form or dialog with a textbox and a button. When the button is clicked, read the file name form the text box and open the file.

    What part are you having trouble with?


    David Wilkinson | Visual C++ MVP

    Monday, December 21, 2015 10:08 AM
  • I have a Windows Form C++ CLR program with a Text Box to input file name. My present file input is

    ofstream

    myInfile ("ClearText.txt"); which is written into the program. I want to input the file name in a Text Box at run time. My Text Box code is:

    //Property to access the text in the edit box


    public

    : propertyString^ InTextString

    {

    String^

    get() {returninFileText->Text; }

    voidset(String^ inText) {inFileText->Text = inText; }

    }

    My Text Box works for my password, but not filename input. Thank you for any help. I've tried everything.


    • Edited by Lancer63 Thursday, February 4, 2016 5:32 PM
    Thursday, February 4, 2016 5:31 PM