VERSION 5.00 Begin VB.Form Form1 BorderStyle = 1 'Fixed Single Caption = "Trokanalni interfejs - XP" ClientHeight = 3930 ClientLeft = 45 ClientTop = 330 ClientWidth = 4575 ForeColor = &H00004080& LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3930 ScaleWidth = 4575 StartUpPosition = 2 'CenterScreen Begin VB.Frame Frame1 Caption = "Bazna Adresa - Heksa" ForeColor = &H00C000C0& Height = 1215 Left = 120 TabIndex = 0 Top = 2640 Width = 1815 Begin VB.OptionButton Option1 Caption = "Option1" Height = 195 Left = 240 TabIndex = 3 Top = 360 Value = -1 'True Width = 255 End Begin VB.OptionButton Option2 Caption = "Option2" Height = 195 Left = 240 TabIndex = 2 Top = 600 Width = 255 End Begin VB.OptionButton Option3 Caption = "Option3" Height = 195 Left = 240 TabIndex = 1 Top = 840 Width = 255 End Begin VB.Label Label6 Caption = "LPT2: 2F8" ForeColor = &H00404080& Height = 255 Index = 1 Left = 600 TabIndex = 7 Top = 600 Width = 1095 End Begin VB.Label Label3 Caption = "LPT1: 378" ForeColor = &H00404080& Height = 255 Index = 0 Left = 600 TabIndex = 5 Top = 360 Width = 975 End Begin VB.Label Label6 Caption = "LPT3: 3BC" ForeColor = &H00404080& Height = 255 Index = 0 Left = 600 TabIndex = 4 Top = 840 Width = 1095 End End Begin VB.Label Label1 Caption = "By V. Milanovic" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 238 Weight = 400 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H000000C0& Height = 375 Index = 3 Left = 2400 TabIndex = 12 Top = 3120 Width = 1695 End Begin VB.Label Label1 Caption = "Kanal3" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 238 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 375 Index = 2 Left = 3480 TabIndex = 11 Top = 2160 Width = 855 End Begin VB.Label Label1 Caption = "Kanal2" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 238 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 375 Index = 1 Left = 1800 TabIndex = 10 Top = 2160 Width = 855 End Begin VB.Label Label2 Caption = "3-KANALNI INTERFEJS" BeginProperty Font Name = "MS Sans Serif" Size = 17.25 Charset = 238 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C00000& Height = 375 Left = 120 TabIndex = 9 Top = 120 Width = 4215 End Begin VB.Label Label1 Caption = "Kanal1" BeginProperty Font Name = "MS Sans Serif" Size = 13.5 Charset = 238 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00008000& Height = 375 Index = 0 Left = 120 TabIndex = 8 Top = 2160 Width = 855 End Begin VB.Label Label3 Caption = "LPT2: 278" ForeColor = &H00404080& Height = 255 Index = 1 Left = 720 TabIndex = 6 Top = 2640 Width = 975 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 1335 Index = 2 Left = 120 Top = 720 Width = 975 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 1335 Index = 1 Left = 1800 Top = 720 Width = 975 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 1335 Index = 0 Left = 3480 Top = 720 Width = 975 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte) Public Broj, LPTadresa As Integer Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i, j As Integer i = 4 j = 0 If (X >= 120) And (X < 1095) And (Y > 720) And (Y < 2055) Then i = 2 If (X >= 1800) And (X < 2775) And (Y > 720) And (Y < 2055) Then i = 1 If (X >= 3480) And (X < 4455) And (Y > 720) And (Y < 2055) Then i = 0 If i <> 4 Then If i = 2 And (Shape1(2).BackColor = RGB(255, 255, 255)) Then Shape1(2).BackColor = RGB(255, 0, 0) j = 1 End If If i = 2 And j = 0 And (Shape1(2).BackColor = RGB(255, 0, 0)) Then Shape1(2).BackColor = RGB(255, 255, 255) j = 1 End If If i = 1 And (Shape1(1).BackColor = RGB(255, 255, 255)) Then Shape1(1).BackColor = RGB(255, 255, 0) j = 1 End If If i = 1 And j = 0 And (Shape1(1).BackColor = RGB(255, 255, 0)) Then Shape1(1).BackColor = RGB(255, 255, 255) j = 1 End If If i = 0 And (Shape1(0).BackColor = RGB(255, 255, 255)) Then Shape1(0).BackColor = RGB(0, 255, 0) j = 1 End If If i = 0 And j = 0 And (Shape1(0).BackColor = RGB(0, 255, 0)) Then Shape1(0).BackColor = RGB(255, 255, 255) j = 1 End If End If Broj = 0 For i = 0 To 2 j = 0 If (Shape1(i).BackColor <> RGB(255, 255, 255)) Then j = 1 Broj = Broj + 2 ^ i * j Next i Call PortOut(LPTadresa, Broj) End Sub Private Sub Form_Load() LPTadresa = &H378 Call PortOut(LPTadresa, 0) End Sub Private Sub Option1_Click() If Option1 Then LPTadresa = &H378 End Sub Private Sub Option2_Click() If Option2 Then LPTadresa = &H278 End Sub Private Sub Option3_Click() If Option3 Then LPTadresa = &H3BC End Sub