Programming C# C++ (7) Delphi (617) Java (8) JavaScript (31) perl (9) php (4) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us
|
How can I display a file selection box with C++ in .NET?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
You need to instantiate an object of the SaveFileDialog class. Prepare the file selection filter and then display the modal dialog with the ShowDialog() call.
The selected filename can be retrieved as the FileName member. You can also preset this member.
Alternatively you could drop such a component on your application's form and set the properties there.
Personally, I prefer to create this kind of object dynamically and get rid of it right away.
 | |  | | SaveFileDialog* saveFileDialog1 = new SaveFileDialog();
saveFileDialog1->Filter = S"PEPCost files (*.pc)|*.pc|All files (*.*)|*.*" ;
saveFileDialog1->FilterIndex = 1;
saveFileDialog1->RestoreDirectory = true;
if(saveFileDialog1->ShowDialog() == DialogResult::OK) {
System::Windows::Forms::MessageBox::Show("Your PEPCost file will be saved.",
saveFileDialog1->FileName,
MessageBoxButtons::OK,
MessageBoxIcon::Information);
}
saveFileDialog1->Dispose(); | |  | |  |
Comments:
|
anonymous from Taipei, Taiwan
|
|
|
Sorry for the late reply, I'm not sure how I missed it. FPL does soppurt exporting to Excel, however only CPL reports soppurt the Excel templating properties. Based on the feedback we had from DDR users, the majority of users didn't want to change the excel output. It just didn't make sense to invest the large amount of resources it would have taken to soppurt FPL reports.That said, many of the issues that plagued AR6 users with its Excel export with extra rows and columns being added have been resolved with design time changes that make it easier to perfectly align controls.
|
|
anonymous from Tekirdag, Turkey
|
|
|
kalau benar dapat terawang kpnaea sim bahnya gag jadi konglomerat dan ente-ente yang promosiin kpnaea masih promosi gak jadi orang kaya .....ente ngibullllllllll alias wadulllllll ana pernar kena 4 anka 20jt, tapi bukan dapat nomor dari mbah ini dan mbah itu dapat dari hitungan and pas sama impian, tapi ana percaya itu rejeki dari tuhan yang maha esa,karna hanya dialah yang maha tau, bukan simbah ini.itu yang pasang nope BOHONG SEMUA''''''''''''''''''
|
|
anonymous from Tekirdag, Turkey
|
|
|
kalau benar dapat terawang kpnaea sim bahnya gag jadi konglomerat dan ente-ente yang promosiin kpnaea masih promosi gak jadi orang kaya .....ente ngibullllllllll alias wadulllllll ana pernar kena 4 anka 20jt, tapi bukan dapat nomor dari mbah ini dan mbah itu dapat dari hitungan and pas sama impian, tapi ana percaya itu rejeki dari tuhan yang maha esa,karna hanya dialah yang maha tau, bukan simbah ini.itu yang pasang nope BOHONG SEMUA''''''''''''''''''
|
|
anonymous from Tekirdag, Turkey
|
|
|
kalau benar dapat terawang kpnaea sim bahnya gag jadi konglomerat dan ente-ente yang promosiin kpnaea masih promosi gak jadi orang kaya .....ente ngibullllllllll alias wadulllllll ana pernar kena 4 anka 20jt, tapi bukan dapat nomor dari mbah ini dan mbah itu dapat dari hitungan and pas sama impian, tapi ana percaya itu rejeki dari tuhan yang maha esa,karna hanya dialah yang maha tau, bukan simbah ini.itu yang pasang nope BOHONG SEMUA''''''''''''''''''
|
|