⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 z.frm

📁 ssd4ex6 vb 6.0 Aplications that emules the date&time interface of windows xp or below.
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Arial"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
         End
         Begin MSComCtl2.UpDown UpDown1 
            Height          =   285
            Left            =   2280
            TabIndex        =   6
            Top             =   360
            Width           =   255
            _ExtentX        =   450
            _ExtentY        =   503
            _Version        =   393216
            Value           =   1900
            BuddyControl    =   "Txt1"
            BuddyDispid     =   196625
            OrigLeft        =   2160
            OrigTop         =   360
            OrigRight       =   2415
            OrigBottom      =   615
            Max             =   2100
            Min             =   1900
            SyncBuddy       =   -1  'True
            BuddyProperty   =   65547
            Enabled         =   -1  'True
         End
         Begin VB.TextBox Txt1 
            Height          =   285
            Left            =   1560
            Locked          =   -1  'True
            TabIndex        =   5
            Top             =   360
            Width           =   720
         End
         Begin VB.ComboBox Cmb1 
            Height          =   315
            ItemData        =   "Z.frx":610FC
            Left            =   120
            List            =   "Z.frx":61103
            Style           =   2  'Dropdown List
            TabIndex        =   4
            Top             =   360
            Width           =   1215
         End
      End
      Begin VB.Label lbl3 
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   4080
         Width           =   5055
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Raul Adrian Pe馻 Rosales Ejercicio8
'Declaracion de una variable customizada para llenar el combobox
Private Type PaisHoras
pais As String
horas As String
End Type
'Declaracion de la variable del arreglo de horarios de verano
Dim topcorner As Integer
Dim leftcorner As Integer
Const clockInset As Integer = 100 ' distancia de la orilla del reloj hacia la orilla de la caja
Dim dotRadius As Integer  ' tama駉 del punto
Dim start As Integer
Dim k As Integer
Dim smallDim As Integer           ' m醩 peque駉 que el ancho y alto de la caja
Dim clockRadius As Integer        ' radio del reloj
Dim centerX As Integer            ' x del centro del reloj
Dim centerY As Integer            ' y del centro del reloj
Dim x As Integer                  ' x posici髇 del punto
Dim y As Integer                  ' y posici髇 del punto
Dim sRadius As Integer            ' radio manecilla segundos
Dim mRaiuds As Integer            ' radio manecilla minutos
Dim hRaiuds As Integer            ' radio manecilla horas
Dim hoursToMinutes As Integer     ' horas a minutos
Dim seg As Integer                ' segundos
Dim min As Integer                ' minutos
Dim hour As Integer               ' horas
Dim arreglo(0 To 49) As PaisHoras 'arreglo pais horas

Dim hora As Integer
Dim cadena As String
Dim months(0 To 11) As String
Dim hasSavingsTime(0 To 49) As Boolean

Private Sub Cmb1_Click()
'Cambia el mes del calendario de acuerdo al elegido por el usuario
Clndr1.Month = Cmb1.ListIndex


End Sub

Private Sub Combo1_Click()
'Establece el checkbox en falso o verdadero dependiendo si hay  horario de verano
k = Combo1.ListIndex
Check1.Enabled = hasSavingsTime(Combo1.ListIndex)
lbl3.Caption = "Current Time Zone: " & Combo1.Text

soffset = (arreglo(k).horas / 4 + 180)
Pic2.PaintPicture Pic2.Picture, -soffset, 0

End Sub


Private Sub Command1_Click()
'Evalua la hora para desplegarla en formato de 24hrs
horas = Txt2.Text
If Option2.Value = True Then
    horas = Txt2.Text + 12
    If horas = 24 Then
        horas = 12
    End If
ElseIf Option2.Value = False Then
    If horas = 12 Then
        horas = 0
    End If
End If

'crea la cadena que se imprimira en el msgbox
cadena = "Applied..." & vbCrLf & vbCrLf & "==============================" & vbCrLf & _
"A駉 = " & Txt1.Text & vbCrLf & "Mes = " & Cmb1.Text & vbCrLf & "Dia = " & _
Clndr1.Day & vbCrLf & "Horas = " & horas & vbCrLf & "Minutos = " & Txt3.Text & _
vbCrLf & "Segundos = " & Txt4.Text & vbCrLf & "Uso Horario = " & Combo1.Text & _
vbCrLf & "Horario de Verano = " & hasSavingsTime(Combo1.ListIndex) & _
vbCrLf & "===========================" & vbCrLf & "Time Saved"
 
'crea la msgbox
MsgBox cadena, 0, "Date & Time"
End Sub

Private Sub Command2_Click()
'Evalua la hora para desplegarla en formato de 24hrs
horas = Txt2.Text
If Option2.Value = True Then
    horas = Txt2.Text + 12
    If horas = 24 Then
        horas = 12
    End If
ElseIf Option2.Value = False Then
    If horas = 12 Then
        horas = 0
    End If
End If

'crea la cadena que se imprimira en el msgbox
cadena = "Cancelled....." & vbCrLf & vbCrLf & "==============================" & vbCrLf & _
"A駉 = " & Txt1.Text & vbCrLf & "Mes = " & Cmb1.Text & vbCrLf & "Dia = " & _
Clndr1.Day & vbCrLf & "Horas = " & Txt2.Text & vbCrLf & "Minutos = " & Txt3.Text & _
vbCrLf & "Segundos = " & Txt4.Text & vbCrLf & "Uso Horario = " & Combo1.Text & _
vbCrLf & "Horario de Verano = " & hasSavingsTime(Combo1.ListIndex) & _
vbCrLf & "===========================" & vbCrLf & "Time Not Saved"

'crea la msgbox
MsgBox cadena, 0, "Date & Time"

Unload Me
End Sub

Private Sub Command3_Click()
'Evalua la hora para desplegarla en formato de 24hrs
horas = Txt2.Text
If Option2.Value = True Then
    horas = Txt2.Text + 12
    If horas = 24 Then
        horas = 12
    End If
ElseIf Option2.Value = False Then
    If horas = 12 Then
        horas = 0
    End If
End If

'crea la cadena que se imprimira en el msgbox
cadena = "OK....." & vbCrLf & vbCrLf & "==============================" & vbCrLf & _
"A駉 = " & Txt1.Text & vbCrLf & "Mes = " & Cmb1.Text & vbCrLf & "Dia = " & _
Clndr1.Day & vbCrLf & "Horas = " & Txt2.Text & vbCrLf & "Minutos = " & Txt3.Text & _
vbCrLf & "Segundos = " & Txt4.Text & vbCrLf & "Uso Horario = " & Combo1.Text & _
vbCrLf & "Horario de Verano = " & hasSavingsTime(Combo1.ListIndex) & _
vbCrLf & "===========================" & vbCrLf & "Time Saved"

'crea la msgbox
MsgBox cadena, 0, "Date & Time"

Unload Me
End Sub

Private Sub Form_Load()
'variables utilizadas para centrar la forma

'creamos un arreglo de 49 indices con la variable customizada

 'Llenamos la matriz
arreglo(0).pais = "(GMT -12:00) Eniwetok, Kwajalein"
arreglo(1).pais = "(GMT -11:00) Midway Island, Samoa"
arreglo(2).pais = "(GMT -10:00) Hawaii"
arreglo(3).pais = "(GMT -09:00) Alaska"
arreglo(4).pais = "(GMT -08:00) Pacific Time (US and Canada); Tijuana"
arreglo(5).pais = "(GMT -07:00) Arizona"
arreglo(6).pais = "(GMT -07:00) Mountain Time (US and Canada)"
arreglo(7).pais = "(GMT -06:00) Central Time (US and Canada)"
arreglo(8).pais = "(GMT -06:00) Mexico City, Tegucigalpa"
arreglo(9).pais = "(GMT -06:00) Saskatchewan"
arreglo(10).pais = "(GMT -05:00) Bogota, Lima"
arreglo(11).pais = "(GMT -05:00) Eastern Time (US and Canada)"
arreglo(12).pais = "(GMT -05:00) Indiana (East)"
arreglo(13).pais = "(GMT -04:00) Atlantic Time (Canada)"
arreglo(14).pais = "(GMT -04:00) Caracas, La Paz"
arreglo(15).pais = "(GMT -03:30) Newfoundland"
arreglo(16).pais = "(GMT -03:00) Brasilia"
arreglo(17).pais = "(GMT -03:00) Buenos Aires, Georgetown"
arreglo(18).pais = "(GMT -02:00) Mid-Atlantic"
arreglo(19).pais = "(GMT -01:00) Azores, Cape Verde Is."
arreglo(20).pais = "(GMT +00:00) Greenwich Mean Time; Dublin, Edinburgh, London, Lisbon"
arreglo(21).pais = "(GMT +00:00) Monrovia, Casablanca"
arreglo(22).pais = "(GMT +01:00) Berlin, Stockhold, Rome, Bern, Brussels, Vienna"
arreglo(23).pais = "(GMT +01:00) Paris, Madrid, Amsterdam"
arreglo(24).pais = "(GMT +01:00) Prage, Warsaw, Budapest"
arreglo(25).pais = "(GMT +02:00) Athens, Helsinki, Istanbul"
arreglo(26).pais = "(GMT +02:00) Cairo"
arreglo(27).pais = "(GMT +02:00) Eastern Europe"
arreglo(28).pais = "(GMT +02:00) Harare, Pretoria"
arreglo(29).pais = "(GMT +02:00) Israel"
arreglo(30).pais = "(GMT +03:00) Baghdad, Kuwait, Nairobi, Riyadh"
arreglo(31).pais = "(GMT +03:00) Moscow, St. Petersburgh, Kazan, Volgograd"
arreglo(32).pais = "(GMT +03:00) Tehran"
arreglo(33).pais = "(GMT +04:00) Abu Dhabi, Muscat, Tbilisi"
arreglo(34).pais = "(GMT +04:30) Kabul"
arreglo(35).pais = "(GMT +05:00) Islamabad, Karachi, Ekaterinburg, Tashkent"
arreglo(36).pais = "(GMT +05:30) Bombay, Calcutta, Madras, New Delhi, Colombo"
arreglo(37).pais = "(GMT +06:00) Almaty, Dhaka"
arreglo(38).pais = "(GMT +07:00) Bangkok, Jakarta, Hanoi"
arreglo(39).pais = "(GMT +08:00) Beijing, Chongqing, Urumqi"
arreglo(40).pais = "(GMT +08:00) Hong Kong, Perth, Singapore, Taipei"
arreglo(41).pais = "(GMT +09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk"
arreglo(42).pais = "(GMT +09:30) Adelaide"
arreglo(43).pais = "(GMT +09:30) Darwin"
arreglo(44).pais = "(GMT +10:00) Brisbane, Melbourne, Sydney"
arreglo(45).pais = "(GMT +10:00) Guam, Port Moresby, Vladivostok"
arreglo(46).pais = "(GMT +10:00) Hobart"
arreglo(47).pais = "(GMT +11:00) Magadan, Solomon Is., New Caledonia"
arreglo(48).pais = "(GMT +12:00) Fiji, Kamchatka, Marshall Is."
arreglo(49).pais = "(GMT +12:00) Wellington, Auckland"

arreglo(0).horas = "-720"
arreglo(1).horas = "-660"
arreglo(2).horas = "-600"
arreglo(3).horas = "-540"
arreglo(4).horas = "-480"
arreglo(5).horas = "-420"
arreglo(6).horas = "-420"
arreglo(7).horas = "-360"
arreglo(8).horas = "-360"
arreglo(9).horas = "-360"
arreglo(10).horas = "-300"
arreglo(11).horas = "-300"
arreglo(12).horas = "-300"
arreglo(13).horas = "-240"
arreglo(14).horas = "-240"
arreglo(15).horas = "-210"
arreglo(16).horas = "-180"
arreglo(17).horas = "-180"
arreglo(18).horas = "-120"
arreglo(19).horas = "-060"
arreglo(20).horas = "+000"
arreglo(21).horas = "+000"
arreglo(22).horas = "+060"
arreglo(23).horas = "+060"
arreglo(24).horas = "+060"
arreglo(25).horas = "+120"
arreglo(26).horas = "+120"
arreglo(27).horas = "+120"
arreglo(28).horas = "+120"
arreglo(29).horas = "+120"
arreglo(30).horas = "+180"
arreglo(31).horas = "+180"
arreglo(32).horas = "+180"
arreglo(33).horas = "+240"
arreglo(34).horas = "+270"
arreglo(35).horas = "+300"
arreglo(36).horas = "+330"
arreglo(37).horas = "+360"
arreglo(38).horas = "+420"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -