home *** CD-ROM | disk | FTP | other *** search
/ PCMania 64 / PCMania CD64_1.iso / pcmania / vbasic64 / vb231.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-10-19  |  9.9 KB  |  363 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Juego de Ordenador"
  5.    ClientHeight    =   5400
  6.    ClientLeft      =   960
  7.    ClientTop       =   1275
  8.    ClientWidth     =   7410
  9.    Height          =   5805
  10.    Left            =   900
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   540
  13.    ScaleWidth      =   540
  14.    Top             =   930
  15.    Width           =   7530
  16.    Begin VB.CommandButton Command3 
  17.       Caption         =   "Volver"
  18.       Height          =   495
  19.       Left            =   240
  20.       TabIndex        =   28
  21.       Top             =   4800
  22.       Width           =   975
  23.    End
  24.    Begin VB.Frame Frame1 
  25.       Caption         =   "Soporte"
  26.       Height          =   1095
  27.       Left            =   1200
  28.       TabIndex        =   19
  29.       Top             =   1320
  30.       Width           =   2655
  31.       Begin VB.OptionButton Option4 
  32.          Caption         =   "DVD"
  33.          Height          =   255
  34.          Left            =   1440
  35.          TabIndex        =   23
  36.          Top             =   720
  37.          Width           =   1095
  38.       End
  39.       Begin VB.OptionButton Option3 
  40.          Caption         =   "CD-ROM"
  41.          Height          =   255
  42.          Left            =   1440
  43.          TabIndex        =   22
  44.          Top             =   360
  45.          Width           =   1095
  46.       End
  47.       Begin VB.OptionButton Option2 
  48.          Caption         =   "Disco 3 1/2"
  49.          Height          =   255
  50.          Left            =   120
  51.          TabIndex        =   21
  52.          Top             =   720
  53.          Width           =   1215
  54.       End
  55.       Begin VB.OptionButton Option1 
  56.          Caption         =   "Disco 5 1/4"
  57.          Height          =   255
  58.          Left            =   120
  59.          TabIndex        =   20
  60.          Top             =   360
  61.          Width           =   1215
  62.       End
  63.    End
  64.    Begin VB.CommandButton Command2 
  65.       Caption         =   "Limpiar"
  66.       Height          =   495
  67.       Left            =   5520
  68.       TabIndex        =   11
  69.       Top             =   4800
  70.       Width           =   975
  71.    End
  72.    Begin VB.CommandButton Command1 
  73.       Caption         =   "Aceptar"
  74.       Height          =   495
  75.       Left            =   4320
  76.       TabIndex        =   10
  77.       Top             =   4800
  78.       Width           =   975
  79.    End
  80.    Begin VB.TextBox Text6 
  81.       Height          =   615
  82.       Left            =   1200
  83.       MultiLine       =   -1  'True
  84.       TabIndex        =   9
  85.       Top             =   3840
  86.       Width           =   2775
  87.    End
  88.    Begin VB.TextBox Text5 
  89.       Height          =   285
  90.       Left            =   1200
  91.       TabIndex        =   8
  92.       Top             =   3360
  93.       Width           =   2775
  94.    End
  95.    Begin VB.Frame Frame2 
  96.       Caption         =   "Calificaci
  97.       Height          =   2175
  98.       Left            =   4920
  99.       TabIndex        =   6
  100.       Top             =   2280
  101.       Width           =   1575
  102.       Begin VB.OptionButton Option9 
  103.          Caption         =   "Muy Malo"
  104.          Height          =   255
  105.          Left            =   240
  106.          TabIndex        =   27
  107.          Top             =   1800
  108.          Width           =   1095
  109.       End
  110.       Begin VB.OptionButton Option8 
  111.          Caption         =   "Malo"
  112.          Height          =   255
  113.          Left            =   240
  114.          TabIndex        =   26
  115.          Top             =   1440
  116.          Width           =   1095
  117.       End
  118.       Begin VB.OptionButton Option7 
  119.          Caption         =   "Normal"
  120.          Height          =   255
  121.          Left            =   240
  122.          TabIndex        =   25
  123.          Top             =   1080
  124.          Width           =   1095
  125.       End
  126.       Begin VB.OptionButton Option6 
  127.          Caption         =   "Bueno"
  128.          Height          =   255
  129.          Left            =   240
  130.          TabIndex        =   24
  131.          Top             =   720
  132.          Width           =   1215
  133.       End
  134.       Begin VB.OptionButton Option5 
  135.          Caption         =   "Muy Bueno"
  136.          Height          =   255
  137.          Left            =   240
  138.          TabIndex        =   7
  139.          Top             =   360
  140.          Width           =   1215
  141.       End
  142.    End
  143.    Begin VB.TextBox Text4 
  144.       Height          =   285
  145.       Left            =   2760
  146.       TabIndex        =   5
  147.       Top             =   2760
  148.       Width           =   1215
  149.    End
  150.    Begin VB.CheckBox Check1 
  151.       Caption         =   "Terminado"
  152.       Height          =   375
  153.       Left            =   1200
  154.       TabIndex        =   4
  155.       Top             =   2640
  156.       Width           =   1335
  157.    End
  158.    Begin VB.ComboBox Combo1 
  159.       Height          =   300
  160.       ItemData        =   "VB231.frx":0000
  161.       Left            =   4080
  162.       List            =   "VB231.frx":0013
  163.       Sorted          =   -1  'True
  164.       Style           =   2  'Dropdown List
  165.       TabIndex        =   3
  166.       Top             =   1680
  167.       Width           =   2415
  168.    End
  169.    Begin VB.TextBox Text3 
  170.       Height          =   285
  171.       Left            =   5520
  172.       TabIndex        =   2
  173.       Top             =   840
  174.       Width           =   975
  175.    End
  176.    Begin VB.TextBox Text2 
  177.       Height          =   285
  178.       Left            =   1200
  179.       TabIndex        =   1
  180.       Top             =   840
  181.       Width           =   2655
  182.    End
  183.    Begin VB.TextBox Text1 
  184.       Height          =   285
  185.       Left            =   1200
  186.       TabIndex        =   0
  187.       Top             =   360
  188.       Width           =   5295
  189.    End
  190.    Begin VB.Label Label7 
  191.       Caption         =   "Notas:"
  192.       Height          =   255
  193.       Left            =   240
  194.       TabIndex        =   18
  195.       Top             =   3840
  196.       Width           =   855
  197.    End
  198.    Begin VB.Label Label6 
  199.       Caption         =   "Localizaci
  200.       Height          =   255
  201.       Left            =   240
  202.       TabIndex        =   17
  203.       Top             =   3360
  204.       Width           =   1095
  205.    End
  206.    Begin VB.Label Label5 
  207.       Caption         =   "Fecha:"
  208.       Height          =   255
  209.       Left            =   2760
  210.       TabIndex        =   16
  211.       Top             =   2520
  212.       Width           =   855
  213.    End
  214.    Begin VB.Label Label4 
  215.       Caption         =   "G
  216. nero:"
  217.       Height          =   255
  218.       Left            =   4080
  219.       TabIndex        =   15
  220.       Top             =   1440
  221.       Width           =   855
  222.    End
  223.    Begin VB.Label Label3 
  224.       Caption         =   "A
  225. o de Publicaci
  226.       Height          =   255
  227.       Left            =   4080
  228.       TabIndex        =   14
  229.       Top             =   840
  230.       Width           =   1575
  231.    End
  232.    Begin VB.Label Label2 
  233.       Caption         =   "Casa:"
  234.       Height          =   255
  235.       Left            =   240
  236.       TabIndex        =   13
  237.       Top             =   840
  238.       Width           =   855
  239.    End
  240.    Begin VB.Label Label1 
  241.       Caption         =   "Nombre:"
  242.       Height          =   255
  243.       Left            =   240
  244.       TabIndex        =   12
  245.       Top             =   360
  246.       Width           =   855
  247.    End
  248. Attribute VB_Name = "Form1"
  249. Attribute VB_Creatable = False
  250. Attribute VB_Exposed = False
  251. Private Sub Check1_Click()
  252. If Check1.Value = 1 Then
  253.     Text4.Visible = True
  254.     Label5.Visible = True
  255.     Text4.Visible = False
  256.     Label5.Visible = False
  257. End If
  258. End Sub
  259. Private Sub Combo1_Change()
  260. Verificar_Completo
  261. End Sub
  262. Private Sub Command1_Click()
  263. Dim UnJuegoLeido As Juego
  264. UnJuego.Nombre = Text1.Text
  265. UnJuego.CasaEditora = Text2.Text
  266. UnJuego.Localizacion = Text5.Text
  267. UnJuego.Anotaciones = Text6.Text
  268. UnJuego.A
  269. oPublicacion = Val(Text3.Text)
  270. UnJuego.Genero = Combo1.Text
  271. If Option1.Value = False Then
  272.     If Option2.Value = False Then
  273.         If Option3.Value = False Then
  274.             UnJuego.Soporte = 4
  275.         Else
  276.             UnJuego.Soporte = 3
  277.         End If
  278.     Else
  279.         UnJuego.Soporte = 2
  280.     End If
  281.     UnJuego.Soporte = 1
  282. End If
  283. If Option5.Value = False Then
  284.     If Option6.Value = False Then
  285.         If Option7.Value = False Then
  286.             If Option8.Value = False Then
  287.                 UnJuego.Calificacion = 5
  288.             Else
  289.                 UnJuego.Calificacion = 4
  290.             End If
  291.         Else
  292.             UnJuego.Calificacion = 3
  293.         End If
  294.     Else
  295.         UnJuego.Calificacion = 2
  296.     End If
  297.     UnJuego.Calificacion = 1
  298. End If
  299. UnJuego.Terminado = Check1.Value
  300. UnJuego.Fecha = Text4.Text
  301. Id_Fichero = FreeFile
  302. Open "C:\tmp\juegos.dbv" For Random As Id_Fichero Len = Len(UnJuego)
  303. Rem Hay que buscar donde escribir el registro
  304. i = 1
  305. Do While i <= 20
  306.     Get Id_Fichero, i, UnJuegoLeido
  307.     If UnJuegoLeido.Nombre <> "" Then
  308.         If UnJuegoLeido.Nombre = UnJuego.Nombre Then
  309.             Exit Do
  310.         Else
  311.         i = i + 1
  312.         End If
  313.     Else
  314.         Exit Do
  315.     End If
  316. Put Id_Fichero, i, UnJuego
  317. Close Id_Fichero
  318. Rem Para limpiar la ventana llamamos al procedimiento del bot
  319. n "Limpiar"
  320. Command2_Click
  321. End Sub
  322. Private Sub Command2_Click()
  323. Text1.Text = ""
  324. Text2.Text = ""
  325. Text3.Text = ""
  326. Text4.Text = ""
  327. Text5.Text = ""
  328. Text6.Text = ""
  329. Check1.Value = 0
  330. Option2.Value = 1
  331. Option7.Value = 1
  332. Verificar_Completo
  333. End Sub
  334. Private Sub Command3_Click()
  335. Command2_Click
  336. Form1.Hide
  337. Form2.Show
  338. End Sub
  339. Public Sub Verificar_Completo()
  340. If (Text1.Text = "" Or Text2.Text = "" Or Text5.Text = "") Then
  341.     Command1.Enabled = False
  342.     Command1.Enabled = True
  343. End If
  344. End Sub
  345. Private Sub Text1_Change()
  346. Verificar_Completo
  347. End Sub
  348. Private Sub Text2_Change()
  349. Verificar_Completo
  350. End Sub
  351. Private Sub Text3_Change()
  352. Verificar_Completo
  353. End Sub
  354. Private Sub Text4_Change()
  355. Verificar_Completo
  356. End Sub
  357. Private Sub Text5_Change()
  358. Verificar_Completo
  359. End Sub
  360. Private Sub Text6_Change()
  361. Verificar_Completo
  362. End Sub
  363.