Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How to make Edit1Value Mandatory Field in Textboxes Dialog
 

How to make Edit1Value Mandatory Field in Textboxes Dialog


Hi,

I've recently created a setup project for my C# .net windows application.

In my User Interface Editor I have:
Start
- Welcome
- Textboxes (A)
- Installation Folder
- Confirm Installation

In the Textboxes (A) dialog I have one edit field that I want to make mandatory.

How can I do that? I've downloaded the Orca editor. Is there a simple way to use that to do that?

These are the two goals I hope to achieve (goal 1 at least)...
1:
To enable/disable the next button based on edit label being non-empty
2:
Is it possible to validate the contents after hitting the next button?

Any help is appreciated.

Thanks!
coder_number_9292  Thursday, March 13, 2008 8:56 PM

Hi coder_number_9292,

If you want to use a custom validating logic, you need to use an unmanaged custom action DLL to do the validating. You can use the orca tool to edit the ControlEvent table to force the NextButton in the CustomTextA dialog (user interface) to run the custom action. And here are the detailed steps for your reference.

If you want to show an error dialog when the user didn’t type anything in the textbox, you can use orca tool to replace the following row in ControlEvent table

CustomTextA | NextButton | NewDialog | [CustomTextA_NextArgs] | CustomTextA_NextArgs<>"" | 1

With the following row.

CustomTextA | NextButton | NewDialog | ErrorDialog | EDITA1="" | 1

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Wednesday, March 19, 2008 11:38 AM

Hi coder_number_9292,

If you want to use a custom validating logic, you need to use an unmanaged custom action DLL to do the validating. You can use the orca tool to edit the ControlEvent table to force the NextButton in the CustomTextA dialog (user interface) to run the custom action. And here are the detailed steps for your reference.

If you want to show an error dialog when the user didn’t type anything in the textbox, you can use orca tool to replace the following row in ControlEvent table

CustomTextA | NextButton | NewDialog | [CustomTextA_NextArgs] | CustomTextA_NextArgs<>"" | 1

With the following row.

CustomTextA | NextButton | NewDialog | ErrorDialog | EDITA1="" | 1

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Wednesday, March 19, 2008 11:38 AM

Hi Rong-Chun,

I have similar question as code_number_9292 and I found your answer here. I want just to show the error dialog, therefore I edit the msi file. In my msi it doesn't have the row CustomeTextA at all, so I tried to add it in with the change you suggested, but when I ran the msi it didn't show any error dialog. Do I have to do anything else other than adding the entry in this table?

Is there a way to just disable the Next button and only enable when user enters something in the textbox?

Thanks.

Muntihon  Monday, March 31, 2008 4:51 AM

You can use google to search for other answers

Custom Search

More Threads

• InfoPath Form MSI fails to Install
• Missing prerequisites on non-development pc's
• Build MSI with no uninstall
• Bootstrapper editor
• ClickOnce and System.Data.Entity and GAC
• Redistributing DirectX With Visual Studio 2008
• How to Ngen the assemblies after ClickOnce installation?
• Detecting Upgrade vs. Uninstall
• Old Horse Or Dead Horse? How to properly deploy a ClickOnce application and .NET 3.0
• Launch Location of ClickOnce App Using UNC