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

  • Home
  • SEARCH
  • 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 8433709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:27:47+00:00 2026-06-10T06:27:47+00:00

I try put the folder name in textbox so i’m used this code: private:

  • 0

I try put the folder name in textbox so i’m used this code:

private: System::Void textBox1_DragEnter(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e) {
             if (e->Data->GetDataPresent(DataFormats::FileDrop))
             {
                 e->Effect = DragDropEffects::Copy;
             }
         }
private: System::Void textBox1_DragDrop(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e) {
             if (e->Data->GetDataPresent(DataFormats::FileDrop))
             {
                 textBox1->Text = Convert::ToString(e->Data->GetData(DataFormats::FileDrop));
             }
         }

It’s working (0 errors) but when i put folder into textbox, textbox show me not path but: System.String[]

I’m using: C++, .NET, Visual Studio 2010

Any ideas?

  • 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-10T06:27:49+00:00Added an answer on June 10, 2026 at 6:27 am
    e->Data->GetData(DataFormats::FileDrop)
    

    Is returning a string[] (an array of strings), not a single string. When you try to convert this to string using Convert::ToString, it just uses the default Object.ToString() behavior of showing the type name. What else would you expect it to do? There is no default notion of aggregating an array of strings into a single one.

    You should use the object returned by GetData(), and convert it to a string yourself. If you expect a single item, test for that, grab the first item, and you have your string.

    If you want to support many items, you can use string.Join() for example and specify a delimiter.

    You should use this to get access to the dropped files data:

    array<System::String^>^ items = (array<System::String^>^)e->Data->GetData(DataFormats::FileDrop);
    

    From there you can decide how to convert items to a string.

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

Sidebar

Related Questions

I have this code for update: public Boolean update() { try { data.put(ContactsContract.Groups.SHOULD_SYNC, true);
i put a file name 'abc.apk' inside the apk 's folder and it shows
i try to put the progress bar into the notification. but the problem is
I try to put some HTML link behind input text and I try to
I try to put sixteen checkbuttons into frame, placing them into four columns like:
Scenario : I'll try to put an analogy with the loan broker example from
When I try to put a value into a DATE field which is invalid,
I’m using C# and WinForms to try and put just the date from a
im near to finish my app and when try to put in onlin server
for some reason then i duplicate movie clip and try to put it in

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.