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 6694947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:09:43+00:00 2026-05-26T06:09:43+00:00

Very rusty native C++ programmer here with pretty much zero experience with Visual Studio.

  • 0

Very rusty native C++ programmer here with pretty much zero experience with Visual Studio. I’m just trying to knock together a simple program that will change the extension of files that are dropped onto it but I’ve run into the problem in the title which occurs when the DragDrop event is fired upon the file being dropped onto the form. It gets so far as the following line:

String ^sOldName = (String ^) e->Data->GetData(DataFormats::FileDrop, false);

then throws up the exception and breaks out of the event. I ripped a lot of this code from all over the place so there’s a good chance it’s just an old-fashioned syntax or something.

I really appreciate any help in this. Thanks.

  • 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-05-26T06:09:43+00:00Added an answer on May 26, 2026 at 6:09 am

    There are two issues here.

    First, you can specify true, not false, to allow the GetData call to automatically handle the format conversion for you. If the data is in the incorrect format, then you won’t be able to convert the data to a String^.

    Second, the data from a shell file drop is typically an array<String^>^, not String^.

    Try the following:

    array<String^>^ sOldName = (array<String^>^) e->Data->GetData(DataFormats::FileDrop, true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very much a noob here, so it's best to assume I know nothing in
So my asp.net is very very rusty, and i'm trying to get back into
My Java is very rusty and I'm having a bit of a headache here.
I have some very rusty C++ and lots of C experience, but have done
[Disclaimer: my knowledge of sockets is very rusty, and I'm just getting into R,
HI, My php is very rusty and I can't quite remember how to do
I trying to do some very basic string processing in C (e.g. given a
My SQL is very rusty. I would like write a query to take field1
I've been out of touch with TDD for some time, and am very rusty.
This question is pretty much the same as this .Net question exept for java.

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.