Setup Project: user enters a value then store it in a text file or database - visual-studio

As the title said, how can i do that?
I've search some tuts on google, but only for creating simple setup projects.sample
When the user enters 'something', that value will be stored in a textfile or database after installation and is located in the application location (ProgramFiles). thank you ^_^

That dialog looks like a TextBoxes dialog, and that dialog has uppercase property names for the content. If it's TextBoxes(A) the property name is probably EDITA1 so you use it in the format [EDITA1] to pass it to custom actions. Without knowing exactly what kind of custom action you'll be using I can't be explicit, but you'll probably start by having [EDITA1] in the CustomActionData property of the custom action. For (a bad) example, in a VBScript custom action you'd use the value session.property ("CustomActionData").

Related

Property page Format Dialog box variable like OLE_COLOR, stdFont vb6

i m creating ocx for my own text box control
my question is "how i can set property for data format?"
Once you have a Public Property of type StdFormat.StdDataFormat (typically named DataFormat) you get the rest for free.
Actually making any use of that is a larger question. You may need an MSBind.BindingCollection depending on what is going on in your UserControl.

vb6 common dialog box save as, which file extension was chosen

With the common dialog control, lets say I set
.Filter = "Text (.txt)|*.txt|Comma Separated (.csv)|*.csv|Excel (.xls)|*.xls"
If the user does not explicitly type .txt or .csv or .xls but just enters a filename, how does one know WHICH extension they want it saved as?
As you have noticed, FilterIndex can unfortunately only be used to specify the default filter, and the Common Dialog Control will not actually give you the filter selected by the user.
I too had to do the same and switch to the Win32 API version. Here's a well written example and goes into great detail about the use of the GetSaveFileName() API and OPENFILENAME structure:
http://www.jasinskionline.com/windowsapi/ref/g/getsavefilename.html
At which point, you can use the filebox.nFilterIndex parameter after the GetSaveFileName() call to see what the user had actually selected.

How we call "Pages" name in Dropdown in Signup form of PHPfox?

In PHPfox, i want to call "Pages" name in drop-down in Signup form. Reason for calling "Pages", Actually i have created many pages for college name & that are saved in database. So if someone comes for signup, i want to show them college name in drop-down (which are basically "Pages").
Please help me.
Thanks in advance.
You will need 2 plugins, one to show the HTML and one to process what to do with the user input:
1) Make a plugin that fetches the pages, maybe the hook user.component_controller_register_1 or another in that controller would do but otherwise you can always use a low level hook like run_start and check if its the section where you want it.
To show the HTML you have 2 options: include a JS file to populate the sign up form with anything that you want, or if you have a custom template you can just assign the array to the template variable and look through it in your template.
2) Once the html part is showing and working make a plugin for the sign up routine, I think the hook user.service_process_add_1 should be enough given its location.
Dont forget that the input name for the signup is an array, so your drop down needs to look somewhat like this:
<select name="val[my_dropdown]">

Change text of Please fill out this field tooltip in Joomla 3

It is set by default that when I create input fields and set them to be required, when users don't fill in anything, they got a massage:
Please fill out this field
I am creating a website with Joomla, and this tooltip pops out in every browser displaying the above text. How to change the text.
I tried to look up in Joomla language ini files, but no success. Is there some easy way to change this, or some advice where it could be?
This is not a Joomla string, it's the message displayed by the HTML5 required attribute. To change the message you have to check the loads of suggestions in the following questions:
HTML5 form required attribute. Set custom validation message?
How to change default “please fill out this field” in two field
if you are writing your own component (or module/plugin), it sounds like this is the description - field in the form-xml for your component. If the form is auto-generated from a component-creator, the file should be found in
/(administrator/)components/com_yourcomponent/models/forms
but some more info on where/what you are doing would help.
regards Jonas

How to make derived textbox and toolstriptextbox use same code in Vs2010

I've created a derived WinForm textbox control that knows how to provide a hint (those grayed out words that say things like "Password" or "Enter search here") as well as allowing for the beep on enter to be disabled.
I have two public properties BeepOnEnter, and HintText, a single method - ResetHint and then overrides for the Text property, the OnGotFocus event and the OnKeyPress event.
This code works fine until I have a need for a textbox on a tool strip also known as a ToolStripTextBox.
I'd like to use the same code for both the TextBox AND the ToolStripTextBox. Is there a way minimize/reduce redundancy? I definitely need code that has classes that are derived from TextBox and ToolStripTextBox so the ui designer allows me to drop these new controls on a form or tool strip but can't figure out how to do it in an OO way.
ToolStripTextBox is derived from ToolStripControlHost and TextBox is derived from TextBoxBase and as multiple inheritance is not allowed, you will be best off creating a 3rd utility class and putting all similar functions in it. You can then leverage an instance of this class in your derived controls to get the common functionality you want.

Resources