|
I have written the code, my next step is to produce a setup exe to install on other PCs. How is this done?
|
|
|
|
|
Just use a setup and deployment project.
Add all the files needed and thats it.
|
|
|
|
|
Batter is that you build the project in relese mode not debug... and then make setup program with Ino Setup! My suggestion is that.
<marquee>I work like that, Easy, Quick, Clasic, Not complicated... :->
FeRtoll Software.net
--------------------
I fertoll@net.hr I
--------------------
|
|
|
|
|
|
go to new project and select 'setup and deployment projects' from the left pane. and then u can either select 'setup wizard' or any other template as per your convenience. Before that test ur software for any bugs.
|
|
|
|
|
|
Is there a way to format a textbox control at design time?
For example:
The database contains a string of 9 characters, and I want to display the following:
xx-xxxxx-xx
Or I would like to display a textbox that only displays currency values, without using the format currency method.
Thanks!
|
|
|
|
|
No. The TextBox doesn't support formatting at design time. You have to use the String.Format() method to set it's Text property or you have to use a different control, such as a MaskedEditBox.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks for the response. I have a problem however. I have some "money" type values in a database that I would like to format as currency on a form. I'm using bound controls and a dataset and when the form loads for some reason it doesn't apply the textbox.Text = FormatCurrency(Textbox.Text). Is there a better way of doing this?
|
|
|
|
|
FormatCurrency won't work with Strings. You have to pass it a number to format, which will be returned as a String.
You'll have to use a Binding[^] class to intervene when the data is bound. You'll handle the Format event of the Binding class where you'll get a value and you have to format it and return the equivilent String. There's a couple of examples in the link.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can you be more specific, I am using TextBox.Text = FormatCurrency(textbox.text) on form load, however, the textbox is not formatting. If I apply this to another event (cbobox.selectedItemChange or LostFocus) it will then work. But not on form_load.
|
|
|
|
|
Dave,
I just realized the reason, however, I don't know how to fix it. This form is being called by an MDIParent. If I set the child form to the startup object it displays the currency, and applies the cbo.selectedindex = -1 properly. However, if called by the parent it ignores these (and I'm sure other commands). Would you know why?
|
|
|
|
|
I'm really confused as to what you're doing now...
But, you're probably passing an empty string to FormatCurrency while in the Form_Load event. Set a breakpoint on that line and see what the value of Text is before you pass it to FormatCurrency.
Databound controls won't get their values until AFTER the Load event handler is completed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I apologize if I'm not clear. But, I think you've derived to what I'm attempting to do.
I have a form being populated by a DataSet, generated by a SQL DataAdapter. The Data Adapter is filled on Form_Load. Some of the bound controls on the form are for displaying currency amounts, however, the initial fill doesn't display as such. My initial question was: how do I format these controls, if not at design time. You mentioned the FormatCurrency() method. If the controls are bound, and the dataset is filled at form load, are there other event handlers that are fired between when the form is loaded and when the controls are displayed? If not, when can I issue the FormatCurrency() method?
|
|
|
|
|
The only other event that is fired after Load is Activate. But, in either case, FormatCurrency was not meant to be used in the way you're trying to use it.
You'll have to use the Binding class to do what you want. When the data is sent to the TextBox through the binding, it makes a stop in your Format event handler first. You format the data how you want (this is where you would use FormatCurrency) in the Binding.Format event handler, then the resulting string is sent to the TextBox, not the original data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your help.
When do I find this event handler? I only see BindingContextChanged. Sorry, a newbie (obviosuly)
|
|
|
|
|
Dave,
Thanks for your assistance! I'm now using the TextChanged event, which seems to be working. Thanks again!
|
|
|
|
|
You have to be VERY careful doing this. Because what FormatCurrency returns is being assigned to the same property that fires the TextChanged event, you could end up firing this event continuously and overflow the call stack.
It's a really bad idea to change the Text property in the TextChanged event!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You won't find it in Intellisense since the Binding class isn't available in design mode. You have to create it manually, and wire up the event, in your code. Take a very close look at the example in the previous link I posted. Everything you need is in that example.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I would like to know how to implement a hash function in VB.Net. Thanks for you assistance.
|
|
|
|
|
Every object already has a GetHashCode() method, so be sure your really need to do this first.
How you implement your hash function depends on your data, but you can find an example buried in the code for A Fast Diff Algorithm in Visual Basic .NET[^] here on CP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi everyone..
i have a question about vb.net.. actually, i don't understand, how can we upgrade our vb project to vb.net.. what actually the different of these both vb
areon25
|
|
|
|
|
All you need to do is open the .vbp file inside VB.NET and it'll launch the conversion Wizard.
areon25 wrote: what actually the different of these both vb
VB.NET is a TOTALLY new implementation of Basic. There's so many differences that it's just not possible to list them all in a forum. You can find out more information by reading Upgrading from Visual Basic 6.0[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there by the method u told of conversion can the whole project made in VB will be converted automatically to .net either we have used third party Ocx controls?
|
|
|
|
|
Yes, but chances are you'd have to rewrite some code. It's not a perfect conversion.
IMHO, you'd be better off rewriting it from scratch.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|