02-24-2011, 05:08 PM
Hey ive been working on how to make a "lng" file for your application and ive kinda succeded
Here is the code play with it as much as you want <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
(IMPORTS)
(Textbox1.textchanged) (Hide it if you feel like it, it will still do its job <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s --> )
(Read config or lang file) I would set mine to Form load but you can allso make them able to change it so it will reload on a button or something
[EDIT]
Download link to EXE to check it out and see that it is working fine <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
<!-- m --><a class="postlink" href="http://dl.dropbox.com/u/12582973/CFG.zip">http://dl.dropbox.com/u/12582973/CFG.zip</a><!-- m -->
Here is the code play with it as much as you want <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
(IMPORTS)
Code:
Imports System.Text.RegularExpressions
(Textbox1.textchanged) (Hide it if you feel like it, it will still do its job <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s --> )
Code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim content As String = Replace(TextBox1.Text, Global.Microsoft.VisualBasic.ChrW(10), Nothing)
Dim regex As New Regex("<language.*ButtonSend=""Name"".*ButtonName="".*""")
Dim rbutton2 As New Regex("<language.*ButtonClear=""Name"".*ButtonName="".*""")
'(Set.*buttonsend=""
For Each m As Match In regex.Matches(content)
Try
Dim ButtonSend As String = m.Value.Split("""").GetValue(3)
Dim ButtonClear As String = m.Value.Split("""").GetValue(7)
Button1.Text = ButtonSend
Button2.Text = ButtonClear
Catch ex As Exception
End Try
Next
End Sub
(Read config or lang file) I would set mine to Form load but you can allso make them able to change it so it will reload on a button or something
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = My.Computer.FileSystem.ReadAllText(My.Application.Info.DirectoryPath + "\Config.cfg")
End Sub
[EDIT]
Download link to EXE to check it out and see that it is working fine <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
<!-- m --><a class="postlink" href="http://dl.dropbox.com/u/12582973/CFG.zip">http://dl.dropbox.com/u/12582973/CFG.zip</a><!-- m -->
Website: <!-- m --><a class="postlink" href="http://www.PBAProductions.com">http://www.PBAProductions.com</a><!-- m -->
E-Mail: <!-- e --><a href="mailtoatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer
E-Mail: <!-- e --><a href="mailtoatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer