SciLor's Open Source Forums http://forum.scilor.com/ |
|
I need help for D-Link code for Windows Mobile http://forum.scilor.com/viewtopic.php?f=165&t=632 |
Page 1 of 1 |
Author: | pauljay [ Tue Feb 15, 2011 12:53 am ] |
Post subject: | I need help for D-Link code for Windows Mobile |
I have make part of the convertion from VB6 to VB2008 SDK WM5 and WM6 I have a problem converting "Left ()" and "Right ()" Strings Form1: Text1 Text2 List1 Command1 Code: Public Class Form1 Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click Me.Close() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command1.Click Dim BLeft As String = Microsoft.VisualBasic.Left(Text2.Text, 1) Dim BRight As String = Microsoft.VisualBasic.Right(Text2.Text, Len(Text2.Text) - 1) 'MessageBox.Show("D-Link Router", MessageBoxButtons.OK) Text2.Text = "" List1.Items.Clear() Text2.Text = UCase(Text1.Text) For i = 0 To Len(Text2.Text) - 1 List1.Items.Add(BLeft) Text2.Text = BRight Next i Text2.Text = List1.Items(11) & List1.Items(0) & List1.Items(10) & List1.Items(1) & List1.Items(9) & _ List1.Items(2) & List1.Items(8) & List1.Items(3) & List1.Items(7) & List1.Items(4) & List1.Items(6) & _ List1.Items(5) & List1.Items(1) & List1.Items(6) & List1.Items(8) & List1.Items(9) & List1.Items(11) & _ List1.Items(2) & List1.Items(4) & List1.Items(10) List1.Items.Clear() For i = 0 To Len(Text2.Text) - 1 List1.Items.Add(BLeft) Text2.Text = BRight Next i For i = 0 To List1.Items.Count Select Case List1.Items.Add(i) Case "1" Text2.Text = Text2.Text = "r" Case "2" Text2.Text = Text2.Text = "q" Case "3" Text2.Text = Text2.Text & "a" Case "4" Text2.Text = Text2.Text & "H" Case "5" Text2.Text = Text2.Text & "N" Case "6" Text2.Text = Text2.Text & "p" Case "7" Text2.Text = Text2.Text & "D" Case "8" Text2.Text = Text2.Text & "S" Case "9" Text2.Text = Text2.Text & "Y" Case "0" Text2.Text = Text2.Text & "X" Case "A" Text2.Text = Text2.Text & "w" Case "B" Text2.Text = Text2.Text & "8" Case "C" Text2.Text = Text2.Text & "6" Case "D" Text2.Text = Text2.Text & "2" Case "E" Text2.Text = Text2.Text & "1" Case "F2" Text2.Text = Text2.Text & "5" End Select Next i End Sub End Class MSN Contact: [email protected] |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |