GeekByChoiCe 152 Practically a Master Poster Featured Poster

I don't want to be rude but based on the questions you ask'd I have some doubts you have the knowledge (of coding and understanding) to prevent any hacker from hacking.
I am really sorry but securing a computer needs knowledge about computer structures and ofc coding.
/me is takes the down vote ;)

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Have you considered to just sort the datatable by "Time" ?
If this is an option for you then check out this link: Click Here

GeekByChoiCe 152 Practically a Master Poster Featured Poster
Dim thisDate1 As Date = Now
Debug.Writeline(thisDate1.ToString("dd/mm/yyyy"))
GeekByChoiCe 152 Practically a Master Poster Featured Poster

con.ConnectionString = str
TextBox8.Text = 0.0
adp = New SqlDataAdapter("select Count,Item,Price from Bill where Id = '1'", con)
adp.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
TextBox8.Text = Convert.ToString(ds.Tables(0).Rows(0)("Price")) + Val(TextBox8.Text)

On line 2 you set the textbox value to "0.0" and at the end you add this value to your database output. So what you are doing is "result + 0.0".

1. Remove line 2
2. Change last line to: TextBox8.Text += Convert.ToDouble(ds.Tables(0).Rows(0)("Price"))

GeekByChoiCe 152 Practically a Master Poster Featured Poster

I am sorry but at some point you have to start thinking for yourself. If you REALLY stick then open a new thread and ask for assistance. But do not expect us to write your whole application.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

First you need to set up the Settings you want to save. A Step by Step guide is here => http://msdn.microsoft.com/en-us/library/25zf0ze8.aspx

Then in your code:

Private Sub Form_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
		txtUsername.Text = My.Settings.UserName
	End Sub

	Private Sub Close_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
		My.Settings.UserName = txtUsername.Text
		My.Settings.Save()
	End Sub
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Please post the EXACT error you get.
Also make sure you have the correct .NET version installed on your Win7 machine

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Password is a reserved word in every database.
Use [Password] instead.
With Username im not sure, so better use [Username] as well.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Your error lays in this line:

Dim ActualRole As String = libDS.Tables(0).Rows(0)("tblRoles").ToString

You are trying to get the value from column "tblRoles". I have my doubts that you have named the column the same as the tablename. So please check what name the column, that holds the role-name, in your table tblRoles have.
Should be something like

Dim ActualRole As String = libDS.Tables(0).Rows(0)("RoleName").ToString

Also this won't work out:

If ActualRole = "Member" Then
	Me.Close()
	MsgBox("Accepted!")
End If

You never will see the messagebox, because you close the window before showing the box. You should switch the two lines.

aerohn commented: thanks for scanning this code... +0
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Data type mismatches mostly happens if you try to fill your dataset field with a value that is not of the type as in your database. In example you try to fill an image field into a Integer field.
So please post the table definition and the query you use to fill your dataset.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

The IEnumerable exposes the enumerator, which supports a simple iteration over a collection of a specified type (in this case string).

For explaination:
DummyParameters contains either the Searchstring (if the textfield is not empty), or Nothing (if field is empty)

finalParameters:
Getting all searchstrings, that are not Nothing

GeekByChoiCe 152 Practically a Master Poster Featured Poster

You could try something like this:

Dim DummyParameters() As String = New String() {
		 If(tbx_transaction_id.Text = "", Nothing, String.Format("trans_id='{0}'", tbx_transaction_id.Text)),
		 If(tbx_cust_id.Text = "", Nothing, String.Format("customers.cust_id = '{0}'", tbx_cust_id.Text)),
		 If(tbx_amount.Text = "", Nothing, String.Format("trans_amount = '{0}'", tbx_amount.Text)),
		 If(tbx_name.Text = "", Nothing, String.Format("fname='{0}%' or lname='{0}%'", tbx_name.Text))}

		Dim finalParameters As IEnumerable(Of String) = DummyParameters.Where(Function(s) Not String.IsNullOrEmpty(s))

		Dim query As String = String.Format("select transactions.trans_id,transactions.cust_id,transactions.trans_amount,transactions.trans_date,customers.fname+' '+ customers.lname as customer from transactions inner join customers on transactions.cust_id=customers.cust_id where trans_type='inv' {0}", If(finalParameters.Count > 0, String.Format(" AND {0}", String.Join(" or ", finalParameters)), Nothing))

		Debug.WriteLine(query)
bilal_fazlani commented: very knowledgeable person. +1
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Yes, it is possible.
Assuming your MDI Child is Form2:

Public Class Form2

	Private thisMenu As ContextMenu


	Private Sub Form2_Load(sender As Object, e As System.EventArgs) Handles Me.Load
		thisMenu = New ContextMenu
		Dim item1 As New MenuItem("entry1", AddressOf Item1_Click, Nothing)
		Dim item2 As New MenuItem("entry2", AddressOf Item2_Click, Nothing)
		thisMenu.MenuItems.Add(item1)
		thisMenu.MenuItems.Add(item2)
	End Sub

	Private Sub Form2_MouseUp(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
		If e.Button = MouseButtons.Right Then
			thisMenu.Show(Me, e.Location)
		End If
	End Sub

#Region "Context Item Handlers"

	Private Sub Item1_Click(ByVal sender As Object, ByVal e As EventArgs)
		MsgBox("You clicked 'entry1'")
	End Sub

	Private Sub Item2_Click(ByVal sender As Object, ByVal e As EventArgs)
		MsgBox("You clicked 'entry2'")
	End Sub

#End Region

End Class
GeekByChoiCe 152 Practically a Master Poster Featured Poster

set the property "ScriptErrorsSuppressed" of your webbrowser control to "true"

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Ok, I had some spare time this morning, so I did some modifications on the code:
1. Created a class "Proxy"

Public Class Proxy

	Public Property IPAddress() As string
	Public Property Port() As integer
	Public Property Country() As string
	Public Property Speed() As integer
	Public Property Time() As integer
	Public Property [Type]() As string
	Public Property Anonymity() As string

End Class

2. Removed the crossthreadcall check (coz i don't like it:), added some custom comparer to sort the proxies. Complete Form1 code behind:

Imports System.Text.RegularExpressions

Public Class Form1

	Dim Proxies As New List(Of Proxy)
	Dim CurrentSortDirection As Boolean

	Private Event ClearProxies()

	Private Sub GrabProxies()

		Dim i As Integer = 1

		Do Until i = NumericUpDown1.Value + 1
			Dim request As System.Net.HttpWebRequest = CType(System.Net.HttpWebRequest.Create("http://hidemyass.com/proxy-list/" + i.ToString), Net.HttpWebRequest)
			Dim response As System.Net.HttpWebResponse = CType(request.GetResponse, Net.HttpWebResponse)

			Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())

			Dim rssourcecode As String = sr.ReadToEnd

			Dim r As New System.Text.RegularExpressions.Regex("(?<IP>\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4})</span></td>\D+(?<Port>\d{1,5})</td>\D+<img src=""\S+""\D+""flag"" /> (?<Country>\w+)\D+\S+\D+(?<Speed>\d+)%\D+\S+\D+(?<Time>\d+)%""\D+<td>(?<Type>\w+)\D+"">(?<Anonym>\w+)")
			Dim matches As MatchCollection = r.Matches(rssourcecode)


			For Each itemcode As Match In matches
				Dim prox As New Proxy With {.IPAddress = itemcode.Groups("IP").Value,
				 .Port = CInt(itemcode.Groups("Port").Value),
				 .Country = itemcode.Groups("Country").Value,
				 .Speed = CInt(itemcode.Groups("Speed").Value),
				 .Time = CInt(itemcode.Groups("Time").Value),
				 .Type = itemcode.Groups("Type").Value,
				 .Anonymity = itemcode.Groups("Anonym").Value}
				Proxies.Add(prox)
                                'instead of crossthreadcallcheck invoke the operation
				Me.Invoke(Sub()
							  AddProxy(prox)
						  End Sub)
			Next
			i = i + 1
		Loop

	End Sub

	Private Sub AddProxy(proxy As Proxy)
		With ListView1.Items.Add("")
			.SubItems.Add(proxy.IPAddress)
			.SubItems.Add(proxy.Port.ToString)
			.SubItems.Add(proxy.Country)
			.SubItems.Add(proxy.Speed & "%")
			.SubItems.Add(proxy.Time & "%")
			.SubItems.Add(proxy.Type)
			.SubItems.Add(proxy.Anonymity)
		End With
	End Sub

	Private Sub AssignDatasource()
		For Each proxy In Proxies
			AddProxy(proxy)
codeorder commented: this.post, i can probably learn quite a bit.from:) .thanx. +12
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Of course your code won't work if you delete the CheckForIllegalCrossThreadCalls = False.
That already should give you something to think...
Setting the CheckForIllegalCrossThreadCalls means, "try get the value from control, if invoke is required, just do nothing and keep going". That way you might get SOME results but not the one you expect.

So what you should do is using delegates to receive the values of your controls.

codeorder commented: "quotes.expain it quite well", Return ".thanx." :) +12
GeekByChoiCe 152 Practically a Master Poster Featured Poster

then change it to:

Dim WoofRead = New IO.StreamReader(MySettingfil)
        While (WoofRead.Peek() > -1)
        dim currentLine as string = WoofRead.ReadLine
        if string.isnullorempty(currentLine) then continue for
            ListBox2.Items.Add(currentLine)
        End While
        WoofRead.Close()
GeekByChoiCe 152 Practically a Master Poster Featured Poster

this is defined in the HierarchicalDataTemplate. Means, whenever a item in this window is of type "local:Dummy" then this template will get used.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

this does the trick:

Private Sub Form1_Loaded(sender As Object, e As System.EventArgs) Handles Me.Load
		RecurseContainers(Me)
	End Sub

	Private Sub RecurseContainers(container As Control)
		For Each ctrl In container.Controls
			If TypeOf (ctrl) Is TextBox Then
				SetHandler(CType(ctrl, TextBox)) 'add handler to textbox
				Continue For
			End If
			If TypeOf (ctrl) Is Control Then 'panel, groupBox or any other container
				RecurseContainers(CType(ctrl, Control))
			End If
		Next
	End Sub

	Private Sub SetHandler(ctrl As TextBox)
		AddHandler ctrl.GotFocus, AddressOf TextBox_Focused
	End Sub

	Private Sub TextBox_Focused(sender As Object, e As EventArgs)
		RemoveHandler CType(sender, TextBox).GotFocus, AddressOf TextBox_Focused
		'option #1 - a new form
		Dim opt As New OptionsForm()
		opt.ShowDialog()
		'option #2 - a messagebox
		MsgBox(String.Format("You clicked {0}", CType(sender, TextBox).Name))
		'set focus back to the textbox BEFORE adding the handler back
		CType(sender, TextBox).Focus()
		'add handler
		SetHandler(CType(sender, TextBox))
	End Sub
pankaj.garg commented: Quick and onspot +3
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Yeah that could be.
But anyway, your problem is solved? then mark the thread as solved please =)

GeekByChoiCe 152 Practically a Master Poster Featured Poster

replace:
Form1.SomeSub(hours & ":" & minutes & ":" & seconds & ":" & frames & " -- " & nibble2)

with:
DirectCast(My.Application.OpenForms.Item("Form1"),Form1).SomeSub(hours & ":" & minutes & ":" & seconds & ":" & frames & " -- " & nibble2)

GeekByChoiCe 152 Practically a Master Poster Featured Poster
Dim plain As String = "130790"

		If plain.Length <> 6 Then
			Throw New FormatException("wrong format. Please use DDMMYY")
		End If
		
		Dim _date1 As String = plain.Insert(2, ".").Insert(5, ".")
		Dim _date3 As Date = Date.Parse(_date1)

		Console.WriteLine(_date3)
GeekByChoiCe 152 Practically a Master Poster Featured Poster

execute your copy/move method in a separate thread.
Set the max value of the progressbar to the original file filesize and update the progressbar to the copied file current size, using a timer.

codeorder commented: "...update the progressbar..." = :) +12
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Maybe that is what your are looking for:

my.Computer.FileSystem.CopyDirectory("sourceDir", "destinationDir",false)
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Try this:

select * from (select Row_Number() over (order by [ID]) as RowIndex, * from [DB-Name].[dbo].[Table-Name]) as Sub Where Sub.RowIndex =10

adam_k commented: Agree +7
GeekByChoiCe 152 Practically a Master Poster Featured Poster

Ok, since you don't provide the format in what you receive the data, I will give you a dummy example.

IMPORTANT: You have to add a reference to System.Xml.Linq

Sub Main()

		Dim myXmlFile As String = "dummy.xml"
		Dim xDoc As New XDocument
		Dim topLevel As XElement = <ISOBIT/>
		Dim dummyData As Dictionary(Of Integer, String) = CreateDummyData()

		For Each dummy In dummyData
			topLevel.Add(<field id=<%= dummy.Key %> value=<%= dummy.value %>/>)
		Next

		xDoc.Add(topLevel)
		xDoc.Save(myXmlFile)
	End Sub

	Private Function CreateDummyData() As Dictionary(Of Integer, String)

		Dim dummy As New Dictionary(Of Integer, String)
		For i As Integer = 65 To 90
			dummy.Add(i, New String(Chr(i), 10))
		Next
		Return dummy

	End Function

Content of the xml file:

<?xml version="1.0" encoding="utf-8"?>
<ISOBIT>
  <field id="65" value="AAAAAAAAAA" />
  <field id="66" value="BBBBBBBBBB" />
  <field id="67" value="CCCCCCCCCC" />
  <field id="68" value="DDDDDDDDDD" />
  <field id="69" value="EEEEEEEEEE" />
  <field id="70" value="FFFFFFFFFF" />
  <field id="71" value="GGGGGGGGGG" />
  <field id="72" value="HHHHHHHHHH" />
  <field id="73" value="IIIIIIIIII" />
  <field id="74" value="JJJJJJJJJJ" />
  <field id="75" value="KKKKKKKKKK" />
  <field id="76" value="LLLLLLLLLL" />
  <field id="77" value="MMMMMMMMMM" />
  <field id="78" value="NNNNNNNNNN" />
  <field id="79" value="OOOOOOOOOO" />
  <field id="80" value="PPPPPPPPPP" />
  <field id="81" value="QQQQQQQQQQ" />
  <field id="82" value="RRRRRRRRRR" />
  <field id="83" value="SSSSSSSSSS" />
  <field id="84" value="TTTTTTTTTT" />
  <field id="85" value="UUUUUUUUUU" />
  <field id="86" value="VVVVVVVVVV" />
  <field id="87" value="WWWWWWWWWW" />
  <field id="88" value="XXXXXXXXXX" />
  <field id="89" value="YYYYYYYYYY" />
  <field id="90" value="ZZZZZZZZZZ" />
</ISOBIT>
GeekByChoiCe 152 Practically a Master Poster Featured Poster

should be:

WebRequest.Create("http://webaddress.com/test.php?Name=myName&Email=myEmail&Address=myAddress&Phone=myPhone&Member=myMember&Comments=myComments")
GeekByChoiCe 152 Practically a Master Poster Featured Poster
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
		For Each contr As Control In Me.Controls
			If TypeOf contr Is LinkLabel Then
				AddHandler CType(contr, LinkLabel).LinkClicked, AddressOf LinkLabel_LinkClicked
			End If
		Next
	End Sub

	Private Sub LinkLabel_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs)
		MsgBox(String.Format("linkLabel clicked! Name: {0}",CType(sender,LinkLabel).Name))
	End Sub
GeekByChoiCe 152 Practically a Master Poster Featured Poster

add a click-event handler for your linklabels

inside the handler you just do

myConstVariable = ctype(sender, linklabel).Name

GeekByChoiCe 152 Practically a Master Poster Featured Poster

If you talking about a Console Application then Console.readkey() is the way.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

ok, first of all:

change

Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged

to

Private Sub Combo1_SelectedIndexChanged( sender As System.Object,  e As System.EventArgs) Handles Combo1.SelectedIndexChanged

then remove all

Dim None As Object

replace

comm.Handshaking = None

with

comm.Handshake = IO.Ports.Handshake.None

change

Private Sub Form_Terminate_Renamed()

to

Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

and last
change

Dim t As Object

to

Dim t As integer

Hope i didn't forget something

Man1919 commented: thx :) +1
GeekByChoiCe 152 Practically a Master Poster Featured Poster

take a look at your code....

ElseIf String.IsNullOrEmpty(Me.TextBox5.Text.ToString()) = True Then
            MessageBox.Show("Enter Mob.")
            cmd.ExecuteNonQuery()

You only execute that query if Me.TextBox5.Text is empty....

You should return after each string.empty check.
and after the If statement executing that query.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

right-click on the toolbox, click "choose items" and browse to your dll.
Click ok and all your controls will be shown.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

"password" is a protected variable in SQL. Try this instead:

oOLE = "Insert into UserMast(userid,username,[password],rpassword) values (@userid,@username,@password,@rpassword)"
GeekByChoiCe 152 Practically a Master Poster Featured Poster
Extension.ShowDialog()

opens the form in modal mode.

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Thing is, if you are behind a router then you have always a network available.
try this instead:

Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Int32, ByVal dwReserved As Int32) As Boolean

Public Shared Function IsConnectedToInternet() As Boolean
	Dim Desc As Int32
	Return InternetGetConnectedState(Desc, 0)
End Function

This will return the real status.

kvprajapati commented: + +15
GeekByChoiCe 152 Practically a Master Poster Featured Poster

this might give you an idea

Imports System.Xml.Linq


		Dim xmlFile As XDocument = XDocument.Load("C:\Users\GeekByChoiCe\Desktop\test.xml")
		Dim _content As IEnumerable(Of XElement) = xmlFile.Root.Elements("word")
		ListBox1.DataSource= (From g In _content Select g.@id).ToList
		ListBox2.DataSource= (From g In _content Select g.@def).ToList
kvprajapati commented: :) +15
GeekByChoiCe 152 Practically a Master Poster Featured Poster
Private Function GetDic() As Dictionary(Of Char, Char)
		Dim dic As New Dictionary(Of Char, Char)
		With dic
			.Add("א"c, "A"c)
			.Add("ב"c, "B"c)
			.Add("ג"c, "C"c)
			.Add("ד"c, "D"c)
			.Add("ה"c, "E"c)
			.Add("ו"c, "F"c)
			.Add("ז"c, "G"c)
			.Add("ח"c, "H"c)
			.Add("ט"c, "I"c)
			.Add("י"c, "J"c)
			.Add("כ"c, "K"c)
			.Add("ל"c, "L"c)
			.Add("ם"c, "M"c)
			.Add("מ"c, "N"c)
			.Add("ן"c, "O"c)
			.Add("נ"c, "P"c)
			.Add("ס"c, "Q"c)
			.Add("ע"c, "R"c)
			.Add("ף"c, "S"c)
			.Add("פ"c, "T"c)
			.Add("ץ"c, "U"c)
			.Add("צ"c, "V"c)
			.Add("ק"c, "W"c)
			.Add("ר"c, "X"c)
			.Add("ש"c, "Y"c)
			.Add("ת"c, "Z"c)
			.Add(" "c, "_"c)
			.Add("?"c, "?"c)
			.Add("!"c, "!"c)
		End With
		Return dic
	End Function

	Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

		TextBox2.Clear()

		Dim dic As Dictionary(Of Char, Char) = GetDic()
		Try
			For Each c As Char In TextBox1.Text
				TextBox2.AppendText(If(dic.ContainsKey(c), dic(c), c)) 'if char is not in dictionary append the original (such as newLine)
			Next
		Catch ex As Exception
			MsgBox(String.Format("Error occured:{0}{1}", vbNewLine, ex.Message))
		End Try

	End Sub

	Private Sub Button8_Click(sender As System.Object, e As System.EventArgs) Handles Button8.Click
		
TextBox1.Clear()

		Dim dic As Dictionary(Of Char, Char) = GetDic()

		Try

			For Each c As Char In TextBox2.Text
				If dic.ContainsValue(c) Then
					Dim curChar As Char = c	'declare variable to stop LINQ's whine
					TextBox1.AppendText(dic.Where(Function(s) s.Value = curChar).First.Key)
				Else
					TextBox1.AppendText(c)
				End If
			Next
		Catch ex As Exception
			MsgBox(String.Format("Error occured:{0}{1}", vbNewLine, ex.Message))
		End Try
	End Sub
GeekByChoiCe 152 Practically a Master Poster Featured Poster

The following code converts "בניית ביניינים מתקדמים" to "BPJJZ_BJPJJPJM_NZWDNJM"

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

		TextBox2.Clear

		Dim dic As New Dictionary(Of Char, Char)
		With dic
			.Add("א"c, "A"c)
			.Add("ב"c, "B"c)
			.Add("ג"c, "C"c)
			.Add("ד"c, "D"c)
			.Add("ה"c, "E"c)
			.Add("ו"c, "F"c)
			.Add("ז"c, "G"c)
			.Add("ח"c, "H"c)
			.Add("ט"c, "I"c)
			.Add("י"c, "J"c)
			.Add("כ"c, "K"c)
			.Add("ל"c, "L"c)
			.Add("ם"c, "M"c)
			.Add("מ"c, "N"c)
			.Add("ן"c, "O"c)
			.Add("נ"c, "P"c)
			.Add("ס"c, "Q"c)
			.Add("ע"c, "R"c)
			.Add("ף"c, "S"c)
			.Add("פ"c, "T"c)
			.Add("ץ"c, "U"c)
			.Add("צ"c, "V"c)
			.Add("ק"c, "W"c)
			.Add("ר"c, "X"c)
			.Add("ש"c, "Y"c)
			.Add("ת"c, "Z"c)
			.Add(" "c, "_"c)
			.Add("?"c, "?"c)
			.Add("!"c, "!"c)
		End With

		For Each c As Char In TextBox1.Text
			TextBox2.AppendText(dic(c))
		Next

	End Sub
GeekByChoiCe 152 Practically a Master Poster Featured Poster

i assume you forgot the " in line 5 just here.
So if you change MsgBox("Not possible to read file.") to
MsgBox(ex.message) then it will tell you what is wrong.

Viperino commented: Helpful +1
GeekByChoiCe 152 Practically a Master Poster Featured Poster

you would find all 3 answers if you use the forums search!
why opening always new threads if the questions are already answered 100 times?

kvprajapati commented: Correct :) +11
GeekByChoiCe 152 Practically a Master Poster Featured Poster
If Me.txtLine2Rcon.Text = "" Then
 MsgBox("Please insert a running condition for Line 2 before you add it to the database", vbOKOnly)
return
end if
Dim NewLongDesc As String
...
GeekByChoiCe 152 Practically a Master Poster Featured Poster

small example:

Dim str As String = "NW at 6 mph"
Dim reg As New Text.RegularExpressions.Regex("[0-9]{1,}")
Debug.WriteLine(reg.Match(str).Value)
kvprajapati commented: Nice :) +11
GeekByChoiCe 152 Practically a Master Poster Featured Poster
TextBox1.Text.PadRight(6)

will fill your string with spaces

GeekByChoiCe 152 Practically a Master Poster Featured Poster

Array.Reverse is a procedure without a return type.
To fill your arrays you should reverse it and then copy into the array
just like

Private mapAsciiToUnicode() As String = {"h" >= "1920", "S" >= "1921", "n" >= "1922", "r" >= "1923", "b" >= "1924", "L" >= "1925", "k" >= "1926", "a" >= "1927", "v" >= "1928", "m" >= "1929", "f" >= "1930", "d" >= "1931", "t" >= "1932", "l" >= "1933", "g" >= "1934", "N" >= "1935", "s" >= "1936", "D" >= "1937", "z" >= "1938", "T" >= "1939", "y" >= "1940", "p" >= "1941", "j" >= "1942", "C" >= "1943", "X" >= "1944", "H" >= "1945", "K" >= "1946", "J" >= "1947", "R" >= "1948", "x" >= "1949", "B" >= "1950", "F" >= "1951", "Y" >= "1952", "Z" >= "1953", "A" >= "1954", "G" >= "1955", "q" >= "1956", "V" >= "1957", "w" >= "1958", "W" >= "1959", "i" >= "1960", "I" >= "1961", "u" >= "1962", "U" >= "1963", "e" >= "1964", "E" >= "1965", "o" >= "1966", "O" >= "1967", "c" >= "1968", "," >= "1548", ";" >= "1563", "?" >= "1567", ")" >= "0041", "(" >= "0040", "Q" >= "65010)"}

	' Mapping for Unicode to Ascii
	Private mapUnicodeToAscii(mapAsciiToUnicode.Length) As String

	' Mapping for Latin Thaana to Ascii
	Private mapLatinToAscii() As String = {"a" >= "aw", "aa" >= "aW", "aajj" >= "acj", "add" >= "aeDc", "ah" >= "awSc", "aha" >= "awhw", "ari" >= "awri", "au" >= "ao", "b" >= "bc", "ba" >= "bw", "baa"
GeekByChoiCe 152 Practically a Master Poster Featured Poster

the Inherits statement have to be in a new line or delimited by a :
so either
Public Class Form1 : Inherits System.Windows.Forms.Form

or

Public Class Form1
Inherits System.Windows.Forms.Form

GeekByChoiCe 152 Practically a Master Poster Featured Poster

The "Enter" Event on TextBoxes get fired when the textbox becomes the active control (got focus).
Try instead this:

Private Sub TextBox1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
		If e.KeyCode = Keys.Enter Then
			MsgBox("you just pressed ENTER")
		End If
	End Sub
GeekByChoiCe 152 Practically a Master Poster Featured Poster

3 different ways you have...
1. You could use a third party assembly from http://www.enterprisedt.com/ to get this done
2. Use commandline
3. use the WebRequestMethods.Ftp example here http://msdn.microsoft.com/en-us/library/ms229716.aspx

to option 2...
create a ftp.ftp file via code.
content:

MyUserName
MyPassword
cd /Path/on/server/
binary
prompt n
mget *.*
bye

run CMD
command: FTP -v -s:ftp.ftp 91.121.168.38
remove ftp.ftp file

kvprajapati commented: FtpWebRequest is my option!!! +10
GeekByChoiCe 152 Practically a Master Poster Featured Poster
Dim strPath As String = "C:\Users\GeekByChoiCe\Desktop\"
IO.File.WriteAllLines("C:\Users\GeekByChoiCe\Desktop\test.txt", IO.Directory.GetFiles(strPath, "*.txt"))
starlight849 commented: Great Help. +1
GeekByChoiCe 152 Practically a Master Poster Featured Poster
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		Form2.Show()
End Sub

Shows both forms overlapping. So ÜnLoCo gave you the right answer.