emi_sastra
asked on
CHANGE FORM TEXT BEFORE IT SHOW TO USER
Hi All,
I want to dynamically change form text before the visible to user.
The reason why I want to do it, is for localization.
How could I do it ?
Thank you.
I want to dynamically change form text before the visible to user.
The reason why I want to do it, is for localization.
How could I do it ?
Thank you.
ASKER
The event shows the form text at design time.
me.text = parmFormText
Before the change text is executed.
Thank you.
me.text = parmFormText
Before the change text is executed.
Thank you.
what do you mean by that?
check this out if this is useful.
Order of Events in Windows Forms
https://msdn.microsoft.com/en-us/library/86faxx0d(v=vs.110).aspx
check this out if this is useful.
Order of Events in Windows Forms
https://msdn.microsoft.com/en-us/library/86faxx0d(v=vs.110).aspx
ASKER
It first show the form text that is fill at design time.
Then the coding that change the form text.
Thank you.
Then the coding that change the form text.
Thank you.
ASKER
You may try it to prove it.
Thank you.
Thank you.
in form load event, it should overwritten the value that set in design time.
ASKER
You may try it to prove it.
Thank you.
Thank you.
well, can you share some of your codes? sometimes just don't have luxury to build from scratch..
Have a look at this article I wrote a long time ago on Localization: http://emoreau.com/Entries/Articles/2004/07/Localization.aspx
ASKER
If i provide a form for you then it will have a lot of compile error.
I f you have a visual studio project, it is easy, just add a new form.
Public Class Form1
Public strFormText as string = "New Form Text"
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
me.text - me.strFormText
End Sub
End Class
Hope you could prove it.
Thank you.
I f you have a visual studio project, it is easy, just add a new form.
Public Class Form1
Public strFormText as string = "New Form Text"
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
me.text - me.strFormText
End Sub
End Class
Hope you could prove it.
Thank you.
other then replacing the - with = when assigning the Text property, your code here is good and working as expected.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Eric,
Yes, it works perfectly.
Thank you very much.f
Yes, it works perfectly.
Thank you very much.f
Open in new window