kopiere nedenstående txt ind i en *.txt fil og så omdøb den til en *.frm fil ..... er det sådan du mener
------------------- cut ---------------------------------------------
Version 5.00
Begin VB.Form frmLeng
BorderStyle = 1 'Fixed Single
Caption = "Lenght "
ClientHeight = 4425
ClientLeft = 1905
ClientTop = 1995
ClientWidth = 6600
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 4425
ScaleWidth = 6600
Begin VB.Frame Frame2
Caption = "Inches and Milimeters"
Height = 1935
Left = 240
TabIndex = 15
Top = 2160
Width = 2535
Begin VB.TextBox txtMili
Height = 285
Left = 240
TabIndex = 17
Top = 1320
Width = 2055
End
Begin VB.TextBox txtIncs
Height = 285
Left = 240
TabIndex = 16
Top = 600
Width = 2055
End
Begin VB.Label Label9
Caption = "Milimeters :"
Height = 255
Left = 240
TabIndex = 19
Top = 1080
Width = 855
End
Begin VB.Label Label8
Caption = "Inches :"
Height = 255
Left = 240
TabIndex = 18
Top = 360
Width = 855
End
End
Begin VB.TextBox txtMile
Height = 285
Left = 4200
TabIndex = 14
Top = 2880
Width = 2055
End
Begin VB.TextBox txtFeet
Height = 285
Left = 4200
TabIndex = 12
Top = 2400
Width = 2055
End
Begin VB.CommandButton cmdClos
Caption = "Close"
Height = 375
Left = 4800
TabIndex = 10
Top = 3600
Width = 855
End
Begin VB.TextBox txtInch
Height = 285
Left = 4200
TabIndex = 9
Top = 1920
Width = 2055
End
Begin VB.TextBox txtKilo
Height = 285
Left = 4200
TabIndex = 8
Top = 1440
Width = 2055
End
Begin VB.TextBox txtMete
Height = 285
Left = 4200
TabIndex = 7
Top = 960
Width = 2055
End
Begin VB.TextBox txtCent
Height = 285
Left = 4200
TabIndex = 6
Top = 480
Width = 2055
End
Begin VB.Frame Frame1
Caption = "Instruction"
Height = 1575
Left = 240
TabIndex = 0
Top = 360
Width = 2535
Begin VB.Label Label1
Caption = "To convert lenght enter numeric value of belonging lenght's units into its Text box and press Enter."
Height = 1095
Left = 480
TabIndex = 1
Top = 360
Width = 1695
End
End
Begin VB.Label Label7
Caption = "Miles :"
Height = 255
Left = 3120
TabIndex = 13
Top = 2880
Width = 855
End
Begin VB.Label Label6
Caption = "Feet :"
Height = 255
Left = 3120
TabIndex = 11
Top = 2400
Width = 855
End
Begin VB.Label Label5
Caption = "Inches :"
Height = 255
Left = 3120
TabIndex = 5
Top = 1920
Width = 975
End
Begin VB.Label Label4
Caption = "Kilometers :"
Height = 255
Left = 3120
TabIndex = 4
Top = 1440
Width = 975
End
Begin VB.Label Label3
Caption = "Meters :"
Height = 255
Left = 3120
TabIndex = 3
Top = 960
Width = 975
End
Begin VB.Label Label2
Caption = "Centimeters :"
Height = 255
Left = 3120
TabIndex = 2
Top = 480
Width = 975
End
End
Attribute VB_Name = "frmLeng"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Author: Mr.Technet
Private Sub cmdClos_Click()
Unload Me ' Unload this form.
End Sub
Private Sub txtCent_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtCent.Text = Abs(txtCent.Text)
txtMete.Text = Val(txtCent.Text * 0.01)
txtKilo.Text = Val(txtCent.Text * 0.00001)
txtInch.Text = Val(txtCent.Text * 0.394)
txtFeet.Text = Val(txtCent.Text * 0.0328)
txtMile.Text = Val(txtCent.Text * 0.0000062)
End If
If Err Then
txtCent.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtFeet_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtFeet.Text = Abs(txtFeet.Text)
txtCent.Text = Val(txtFeet.Text * 30.48)
txtMete.Text = Val(txtFeet.Text * 0.3048)
txtKilo.Text = Val(txtFeet.Text * 0.0003048)
txtInch.Text = Val(txtFeet.Text * 12)
txtMile.Text = Val(txtFeet.Text * 0.00018939)
End If
If Err Then
txtFeet.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtInch_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtInch.Text = Abs(txtInch.Text)
txtCent.Text = Val(txtInch.Text * 2.54)
txtMete.Text = Val(txtInch.Text * 0.0254)
txtKilo.Text = Val(txtInch.Text * 0.0000254)
txtFeet.Text = Val(txtInch.Text * 0.0833333)
txtMile.Text = Val(txtInch.Text * 0.000015783)
End If
If Err Then
txtInch.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtIncs_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtIncs.Text = Abs(txtIncs.Text)
txtMili.Text = Val(txtIncs.Text * 25.4)
End If
If Err Then
txtIncs.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtKilo_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtKilo.Text = Abs(txtKilo.Text)
txtCent.Text = Val(txtKilo.Text * 100000)
txtMete.Text = Val(txtKilo.Text * 1000)
txtInch.Text = Val(txtKilo.Text * 39400)
txtFeet.Text = Val(txtKilo.Text * 328)
txtMile.Text = Val(txtKilo.Text * 0.62)
End If
If Err Then
txtKilo.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtMete_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtMete.Text = Abs(txtMete.Text)
txtCent.Text = Val(txtMete.Text * 100)
txtKilo.Text = Val(txtMete.Text * 0.001)
txtInch.Text = Val(txtMete.Text * 39.4)
txtFeet.Text = Val(txtMete.Text * 3.28)
txtMile.Text = Val(txtMete.Text * 0.00062)
End If
If Err Then
txtMete.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtMile_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtMile.Text = Abs(txtMile.Text)
txtCent.Text = Val(txtMile.Text * 1609400)
txtMete.Text = Val(txtMile.Text * 16094)
txtKilo.Text = Val(txtMile.Text * 1.6094)
txtInch.Text = Val(txtMile.Text * 633600)
txtFeet.Text = Val(txtMile.Text * 5280)
End If
If Err Then
txtMile.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
Private Sub txtMili_KeyPress(KeyAscii As Integer)
On Error Resume Next
If (KeyAscii = 13) Then
txtMili.Text = Abs(txtMili.Text)
txtIncs.Text = Val(txtMili.Text * 0.03937)
End If
If Err Then
txtMili.Text = ""
MsgBox "Can't connvert ! Enter numeric value only !"
End If
End Sub
----------------------------------------------- cut ------------------------------------------------------
og nu kan du jo selv prøve at lege med nogle andre beregninger