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

📄 z.frm

📁 ssd4ex6 vb 6.0 Aplications that emules the date&time interface of windows xp or below.
💻 FRM
📖 第 1 页 / 共 3 页
字号:
arreglo(39).horas = "+480"
arreglo(40).horas = "+480"
arreglo(41).horas = "+540"
arreglo(42).horas = "+570"
arreglo(43).horas = "+570"
arreglo(44).horas = "+600"
arreglo(45).horas = "+600"
arreglo(46).horas = "+600"
arreglo(47).horas = "+660"
arreglo(48).horas = "+720"
arreglo(49).horas = "+720"

  'llenamos la matriz de los horarios de verano
  For i = 0 To 49
        hasSavingsTime(i) = True
    Next i
    hasSavingsTime(0) = False  ' (GMT -12:00) Eniwetok, Kwajalein
    hasSavingsTime(1) = False  ' (GMT -11:00) Midway Island, Samoa
    hasSavingsTime(2) = False  ' (GMT -10:00) Hawaii
    hasSavingsTime(5) = False  ' (GMT -07:00) Arizona
    hasSavingsTime(8) = False  ' (GMT -06:00) Mexico City, Tegucigalpa
    hasSavingsTime(9) = False  ' (GMT -06:00) Saskatchewan
    hasSavingsTime(10) = False ' (GMT -05:00) Bogota, Lima
    hasSavingsTime(12) = False ' (GMT -05:00) Indiana (East)
    hasSavingsTime(14) = False ' (GMT -04:00) Caracas, La Paz
    hasSavingsTime(17) = False ' (GMT -03:00) Buenos Aires, Georgetown
    hasSavingsTime(21) = False ' (GMT +00:00) Monrovia, Casablanca
    hasSavingsTime(28) = False ' (GMT +02:00) Harare, Pretoria
    hasSavingsTime(30) = False ' (GMT +03:00) Baghdad, Kuwait, Nairobi, Riyadh
    hasSavingsTime(33) = False ' (GMT +04:00) Abu Dhabi, Muscat, Tbilisi
    hasSavingsTime(34) = False ' (GMT +04:30) Kabul
    hasSavingsTime(35) = False ' (GMT +05:00) Islamabad, Karachi, Ekaterinburg, Tashkent
    hasSavingsTime(36) = False ' (GMT +05:30) Bombay, Calcutta, Madras, New Delhi, Colombo
    hasSavingsTime(37) = False ' (GMT +06:00) Almaty, Dhaka
    hasSavingsTime(38) = False ' (GMT +07:00) Bangkok, Jakarta, Hanoi
    hasSavingsTime(40) = False ' (GMT +08:00) Hong Kong, Perth, Singapore, Taipei
    hasSavingsTime(41) = False ' (GMT +09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk
    hasSavingsTime(43) = False ' (GMT +09:30) Darwin
    hasSavingsTime(45) = False ' (GMT +10:00) Guam, Port Moresby, Vladivostok
    hasSavingsTime(47) = False ' (GMT +11:00) Magadan, Solomon Is., New Caledonia
    hasSavingsTime(48) = False ' (GMT +12:00) Fiji, Kamchatka, Marshall Is.
 
'creamos un arreglo que contenga los meses
months(0) = "Enero"
months(1) = "Febrero"
months(2) = "Marzo"
months(3) = "Abril"
months(4) = "Mayo"
months(5) = "Junio"
months(6) = "Julio"
months(7) = "Agosto"
months(8) = "Septiembre"
months(9) = "Octubre"
months(10) = "Noviembre"
months(11) = "Diciembre"

'llenamos la combobox
For i = 0 To 11
    Cmb1.AddItem months(i)
Next

'Hacemos un bucle para llenar la combobox
'con los paises y la diferencia de horarios

For i = 0 To 49
    Combo1.AddItem arreglo(i).pais

    Combo1.ItemData(i) = arreglo(i).horas
Next

'Asignamos valores iniciales de los objetos para evitar inconsistencias
Check1.Enabled = hasSavingsTime(Combo1.ListIndex + 1)
Combo1.ListIndex = 0
Cmb1.ListIndex = 1
Txt1.Text = 2008
Txt2.Text = 9
Txt3.Text = 26
Txt4.Text = 5
Clndr1.Month = 11
Clndr1.Year = Txt1.Text
Clndr1.Day = 28


'----------------------------------------------------------------------------
'
   
   
'----------------------------------------------------------------------------

'Centramos la Forma
If Form1.WindowState <> 0 Then Exit Sub

    topcorner = (Screen.Height - Form1.Height) \ 2
    leftcorner = (Screen.Width - Form1.Width) \ 2
    Form1.Move leftcorner, topcorner

'Ajustamos el tama駉
Height = 6060
Width = 6870


End Sub

Private Sub Txt1_Change()
'Colocamos el a駉 en l calendario segun el escogido por el usuario
Clndr1.Year = Txt1.Text
End Sub

Public Function clockX(minuteVal As Integer, radius As Integer)
    Const PI As Double = 3.14159265
    Dim angle As Double

    angle = (PI * 2 * minuteVal) / 60 - PI / 2
    clockX = CInt(radius * Cos(angle))
End Function

Public Function clockY(minuteVal As Integer, radius As Integer)
    Dim angle As Double
    Dim PI As Double
    PI = 3.14159265

    angle = (PI * 2 * minuteVal) / 60 - PI / 2
    clockY = CInt(radius * Sin(angle))
End Function




Private Sub Txt2_Change()
   Pic1.Cls
' calcula el centro del reloj y el radio para que se ajuste a la caja
    centerX = Pic1.Width / 2
    centerY = Pic1.Height / 2
    smallDim = Pic1.Width
    If Pic1.Height < smallDim Then smallDim = Pic1.Height
    clockRadius = smallDim / 2 - clockInset

    ' calcula la posici髇 del punto
    For start = 0 To 60 Step 1
    dotRadius = 20
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0 ' primitivas de relleno
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbWhite
   
   Next
   
   For start = 0 To 60 Step 5
    dotRadius = 30
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbBlack
   
   Next
   
   Pic1.Circle (centerX, centerY), dotRadius, vbBlack
   
   sRadius = clockRadius - 100
   seg = CInt(Val(Txt4.Text))
   x = centerX + clockX(seg, sRadius - dotRadius)
   y = centerY + clockY(seg, sRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   mRadius = clockRadius - 300
   min = CInt(Val(Txt3.Text))
   x = centerX + clockX(min, mRadius - dotRadius)
   y = centerY + clockY(min, mRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   hRadius = clockRadius - 500
   hoursToMinutes = CInt(Txt2.Text) * 5
   x = centerX + clockX(hoursToMinutes, hRadius - dotRadius)
   y = centerY + clockY(hoursToMinutes, hRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
End Sub

Private Sub Txt3_Change()
   Pic1.Cls
' calcula el centro del reloj y el radio para que se ajuste a la caja
    centerX = Pic1.Width / 2
    centerY = Pic1.Height / 2
    smallDim = Pic1.Width
    If Pic1.Height < smallDim Then smallDim = Pic1.Height
    clockRadius = smallDim / 2 - clockInset

    ' calcula la posici髇 del punto
    For start = 0 To 60 Step 1
    dotRadius = 20
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0 ' primitivas de relleno
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbWhite
   
   Next
   
   For start = 0 To 60 Step 5
    dotRadius = 30
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbBlack
   
   Next
   
   Pic1.Circle (centerX, centerY), dotRadius, vbBlack
   
   sRadius = clockRadius - 100
   seg = CInt(Val(Txt4.Text))
   x = centerX + clockX(seg, sRadius - dotRadius)
   y = centerY + clockY(seg, sRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   mRadius = clockRadius - 300
   min = CInt(Val(Txt3.Text))
   x = centerX + clockX(min, mRadius - dotRadius)
   y = centerY + clockY(min, mRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   hRadius = clockRadius - 500
   hoursToMinutes = CInt(Txt2.Text) * 5
   x = centerX + clockX(hoursToMinutes, hRadius - dotRadius)
   y = centerY + clockY(hoursToMinutes, hRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   

End Sub

Private Sub Txt4_Change()
   Pic1.Cls
' calcula el centro del reloj y el radio para que se ajuste a la caja
    centerX = Pic1.Width / 2
    centerY = Pic1.Height / 2
    smallDim = Pic1.Width
    If Pic1.Height < smallDim Then smallDim = Pic1.Height
    clockRadius = smallDim / 2 - clockInset

    ' calcula la posici髇 del punto
    For start = 0 To 60 Step 1
    dotRadius = 20
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0 ' primitivas de relleno
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbWhite
   
   Next
   
   For start = 0 To 60 Step 5
    dotRadius = 30
    x = centerX + clockX(start, clockRadius - dotRadius)
    y = centerY + clockY(start, clockRadius - dotRadius)

    ' dibuja un c韗culo negro relleno
    Pic1.FillStyle = 0
    Pic1.FillColor = vbBlack
    Pic1.Circle (x, y), dotRadius, vbBlack
   
   Next
   
   Pic1.Circle (centerX, centerY), dotRadius, vbBlack
   
   sRadius = clockRadius - 100
   seg = CInt(Val(Txt4.Text))
   x = centerX + clockX(seg, sRadius - dotRadius)
   y = centerY + clockY(seg, sRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   mRadius = clockRadius - 300
   min = CInt(Val(Txt3.Text))
   x = centerX + clockX(min, mRadius - dotRadius)
   y = centerY + clockY(min, mRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
   
   hRadius = clockRadius - 500
   hoursToMinutes = CInt(Txt2.Text) * 5
   x = centerX + clockX(hoursToMinutes, hRadius - dotRadius)
   y = centerY + clockY(hoursToMinutes, hRadius - dotRadius)
   Pic1.Line (centerX, centerY)-(x, y)
End Sub

⌨️ 快捷键说明

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