473,653 Members | 2,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change the filename when the user clicks OK button

I am using the ExtensibleDialo g to create a dialog for our internal
program use. We want the user select some items in our own controls,
and then generate the filename to the textbox. But that is just the
temporary filename, the final filename can only be generated after the
user clicks "OK" button, because of some concurrency issues.

I can use OFNHookProc to catch the event when the user clicks OK
button, and get the filename from LParam, changing the filename works,
and then returns the dialog to windows. But the saved file is still
just the temporary filename, not my modified name.

The problem I am having is, after I change the filename, how to tell
Windows save the file with my modified name? Do I need to send a
message back or something?

I am using c# in VS2005.
Thanks.

Nov 24 '06 #1
1 1357

sowen wrote:
I am using the ExtensibleDialo g to create a dialog for our internal
program use. We want the user select some items in our own controls,
and then generate the filename to the textbox. But that is just the
temporary filename, the final filename can only be generated after the
user clicks "OK" button, because of some concurrency issues.

I can use OFNHookProc to catch the event when the user clicks OK
button, and get the filename from LParam, changing the filename works,
and then returns the dialog to windows. But the saved file is still
just the temporary filename, not my modified name.

The problem I am having is, after I change the filename, how to tell
Windows save the file with my modified name? Do I need to send a
message back or something?

I am using c# in VS2005.
Thanks.
solved, ignore it please :D

Nov 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4914
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST == "") { include ("InsertRecord.inc"); // Insert new record }
0
1751
by: Wayne Wengert | last post by:
I want to change the title in the Open Dialog box to something more descriptive for my users but the following code has no effect? I also notice that if the user clicks "Cancel" when the dialog box appears a second dialog box ix presented which the user must also Cancel, Is there any way around this - It will bug some of my users! ================================================== Private Sub mnuOpen_Click(ByVal sender As...
2
2894
by: Xam | last post by:
Hello everybody Do you know of a javascript routine that can warn if there are any pre-defined invalid chars in the filename of an INPUT file box before it is submitted with the submit button. The process would be: a) User clicks the INPUT File's Browse button to select the file from their computer.
4
3347
by: Rob Kroese | last post by:
I've got a form with a datagrid that displays a list of items, along with several textboxes, comboboxes, etc., that display the details for the selected item. The columns in the datagrid and the "details" controls are both bound to fields in a dataview called dvItems. The dataview is a subset of a datatable called dtItems, which is simply a copy of all the data in a table called Items. The idea is to allow the user to edit an item in...
1
1799
by: Mossman | last post by:
Hello, I will discuss at a high level what is happening on an ASP.NET web page I developed a year ago in ASP.NET using Visual Studio 2003 and currently support. I have an ASP.NET web page that is broken out into two sections. One section is where a user enters the main infomation around a financial outlook record and the second section is dynamic content that generates a table of values based on the infromation entered in the first...
2
3160
by: | last post by:
I have code to download a file from a webserver to a local machine through the browser using code dim file as System.IO.FileInfo = new System.IO.FileInfo("c:\_6_test.txt") Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name) Response.AddHeader("Content-Length", file.Length.ToString()) Response.ContentType = "application/octet-stream" Response.WriteFile(file.FullName) Response.End()
0
3428
by: Sridhar | last post by:
Hi, I am having trouble renaming the excel sheet while exporting to excel. we have a datagrid that contains some analytical data. I have the name to the excel file as "temp.xls" inside the code. When the user clicks on the Export to Excel button next to datagrid, it opens a popup with options Open, Save and Cancel. When I click open, it opens the excel sheet with the sheet name as .xls and the excel filename as temp.xls. As a result when...
2
3294
by: polocar | last post by:
Hi, suppose that you have a C# form with two buttons, that are the classical "btnOk" and "btnCancel" (besides them, of course in the form there can be many other controls). When the user clicks on btnOk, the program makes some confirm operations and closes the form. When the user clicks on btnCancel, the program makes some cancel operations and closes the form. My problem is that, when the user clicks on the "X" button of the form...
2
6097
by: gvrajkumar | last post by:
Hi We are developing an Ajax based application. In this application the URL is fixed and as user navigates on the application we will change Anchor on the URL so that user can bookmark the url and can load the page on demand. When user refreshes the page we have no issue in the populating the page based on the anchor in URL as on load we can capture the hash(#anchor) and act accordingly.
0
8283
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8590
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4147
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2707
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.