home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / Chip_2000-10_cd1.bin / ctenari / Havlicek / zdttt / Form1.frm next >
Text File  |  2000-03-08  |  13KB  |  327 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "TicTacToe"
  5.    ClientHeight    =   2415
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   1725
  9.    ControlBox      =   0   'False
  10.    Icon            =   "Form1.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2415
  15.    ScaleWidth      =   1725
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.Timer Timer1 
  18.       Interval        =   1
  19.       Left            =   1200
  20.       Top             =   1080
  21.    End
  22.    Begin VB.CommandButton Command2 
  23.       Caption         =   "X"
  24.       Height          =   255
  25.       Left            =   1320
  26.       TabIndex        =   2
  27.       Top             =   1920
  28.       Width           =   255
  29.    End
  30.    Begin VB.CommandButton Command3 
  31.       Caption         =   "?"
  32.       Height          =   255
  33.       Left            =   1080
  34.       TabIndex        =   1
  35.       Top             =   1920
  36.       Width           =   255
  37.    End
  38.    Begin VB.CommandButton Command1 
  39.       Caption         =   "Znova"
  40.       Height          =   255
  41.       Left            =   120
  42.       TabIndex        =   0
  43.       Top             =   1920
  44.       Width           =   975
  45.    End
  46.    Begin VB.Label Label2 
  47.       Caption         =   "    (c) David HavlφΦek"
  48.       Height          =   255
  49.       Left            =   0
  50.       TabIndex        =   4
  51.       Top             =   2160
  52.       Width           =   1695
  53.    End
  54.    Begin VB.Label Label1 
  55.       Caption         =   "Hraje hrßΦ Φ.1"
  56.       Height          =   255
  57.       Left            =   360
  58.       TabIndex        =   3
  59.       Top             =   1680
  60.       Width           =   1095
  61.    End
  62.    Begin VB.Line Line8 
  63.       X1              =   1560
  64.       X2              =   1560
  65.       Y1              =   120
  66.       Y2              =   1560
  67.    End
  68.    Begin VB.Line Line7 
  69.       X1              =   120
  70.       X2              =   1560
  71.       Y1              =   1560
  72.       Y2              =   1560
  73.    End
  74.    Begin VB.Line Line6 
  75.       X1              =   120
  76.       X2              =   1560
  77.       Y1              =   1080
  78.       Y2              =   1080
  79.    End
  80.    Begin VB.Line Line5 
  81.       X1              =   1080
  82.       X2              =   1080
  83.       Y1              =   120
  84.       Y2              =   1560
  85.    End
  86.    Begin VB.Line Line4 
  87.       X1              =   120
  88.       X2              =   1560
  89.       Y1              =   120
  90.       Y2              =   120
  91.    End
  92.    Begin VB.Line Line3 
  93.       X1              =   120
  94.       X2              =   120
  95.       Y1              =   120
  96.       Y2              =   1560
  97.    End
  98.    Begin VB.Line Line2 
  99.       X1              =   120
  100.       X2              =   1560
  101.       Y1              =   600
  102.       Y2              =   600
  103.    End
  104.    Begin VB.Line Line1 
  105.       X1              =   600
  106.       X2              =   600
  107.       Y1              =   120
  108.       Y2              =   1560
  109.    End
  110.    Begin VB.Image Image9 
  111.       Height          =   480
  112.       Left            =   1080
  113.       Top             =   1080
  114.       Width           =   480
  115.    End
  116.    Begin VB.Image Image8 
  117.       Height          =   480
  118.       Left            =   600
  119.       Top             =   1080
  120.       Width           =   480
  121.    End
  122.    Begin VB.Image Image7 
  123.       Height          =   480
  124.       Left            =   120
  125.       Top             =   1080
  126.       Width           =   480
  127.    End
  128.    Begin VB.Image Image6 
  129.       Height          =   480
  130.       Left            =   1080
  131.       Top             =   600
  132.       Width           =   480
  133.    End
  134.    Begin VB.Image Image5 
  135.       Height          =   480
  136.       Left            =   600
  137.       Top             =   600
  138.       Width           =   480
  139.    End
  140.    Begin VB.Image Image4 
  141.       Height          =   480
  142.       Left            =   120
  143.       Top             =   600
  144.       Width           =   480
  145.    End
  146.    Begin VB.Image Image3 
  147.       Height          =   480
  148.       Left            =   1080
  149.       Top             =   120
  150.       Width           =   480
  151.    End
  152.    Begin VB.Image Image2 
  153.       Height          =   480
  154.       Left            =   600
  155.       Top             =   120
  156.       Width           =   480
  157.    End
  158.    Begin VB.Image Image1 
  159.       Height          =   480
  160.       Left            =   120
  161.       Top             =   120
  162.       Width           =   480
  163.    End
  164. End
  165. Attribute VB_Name = "Form1"
  166. Attribute VB_GlobalNameSpace = False
  167. Attribute VB_Creatable = False
  168. Attribute VB_PredeclaredId = True
  169. Attribute VB_Exposed = False
  170. Private Sub Command1_Click()
  171. Image1.Picture = LoadPicture(None)
  172. Image2.Picture = LoadPicture(None)
  173. Image3.Picture = LoadPicture(None)
  174. Image4.Picture = LoadPicture(None)
  175. Image5.Picture = LoadPicture(None)
  176. Image6.Picture = LoadPicture(None)
  177. Image7.Picture = LoadPicture(None)
  178. Image8.Picture = LoadPicture(None)
  179. Image9.Picture = LoadPicture(None)
  180. Label1.Caption = "Hraje hrßΦ Φ.1"
  181. End Sub
  182.  
  183. Private Sub Command2_Click()
  184. End
  185. End Sub
  186.  
  187. Private Sub Command3_Click()
  188. MsgBox "(c) David HavlφΦek 9.1.2000        Tento program je FREEWARE !"
  189. MsgBox "Autor neruΦφ za Ükody zp∙sobenΘ pou₧itφm tohoto softwaru!"
  190. End Sub
  191.  
  192. Private Sub Form_Load()
  193. Image1.Picture = LoadPicture(None)
  194. Image2.Picture = LoadPicture(None)
  195. Image3.Picture = LoadPicture(None)
  196. Image4.Picture = LoadPicture(None)
  197. Image5.Picture = LoadPicture(None)
  198. Image6.Picture = LoadPicture(None)
  199. Image7.Picture = LoadPicture(None)
  200. Image8.Picture = LoadPicture(None)
  201. Image9.Picture = LoadPicture(None)
  202. End Sub
  203.  
  204. Private Sub Image1_Click()
  205. If Image1.Picture = Form2.Image1.Picture Then GoTo k
  206. If Image1.Picture = Form2.Image2.Picture Then GoTo k
  207. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image1.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  208. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image1.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  209. k:
  210. End Sub
  211.  
  212. Private Sub Image2_Click()
  213. If Image2.Picture = Form2.Image1.Picture Then GoTo k
  214. If Image2.Picture = Form2.Image2.Picture Then GoTo k
  215. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image2.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  216. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image2.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  217. k:
  218.  
  219. End Sub
  220.  
  221. Private Sub Image3_Click()
  222. If Image3.Picture = Form2.Image1.Picture Then GoTo k
  223. If Image3.Picture = Form2.Image2.Picture Then GoTo k
  224. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image3.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  225. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image3.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  226. k:
  227. End Sub
  228.  
  229. Private Sub Image4_Click()
  230. If Image4.Picture = Form2.Image1.Picture Then GoTo k
  231. If Image4.Picture = Form2.Image2.Picture Then GoTo k
  232. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image4.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  233. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image4.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  234. k:
  235.  
  236. End Sub
  237.  
  238. Private Sub Image5_Click()
  239. If Image5.Picture = Form2.Image1.Picture Then GoTo k
  240. If Image5.Picture = Form2.Image2.Picture Then GoTo k
  241. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image5.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  242. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image5.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  243. k:
  244.  
  245. End Sub
  246.  
  247. Private Sub Image6_Click()
  248. If Image6.Picture = Form2.Image1.Picture Then GoTo k
  249. If Image6.Picture = Form2.Image2.Picture Then GoTo k
  250. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image6.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  251. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image6.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  252. k:
  253.  
  254. End Sub
  255.  
  256. Private Sub Image7_Click()
  257. If Image7.Picture = Form2.Image1.Picture Then GoTo k
  258. If Image7.Picture = Form2.Image2.Picture Then GoTo k
  259. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image7.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  260. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image7.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  261. k:
  262.  
  263. End Sub
  264.  
  265. Private Sub Image8_Click()
  266. If Image8.Picture = Form2.Image1.Picture Then GoTo k
  267. If Image8.Picture = Form2.Image2.Picture Then GoTo k
  268. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image8.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  269. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image8.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  270. k:
  271.  
  272. End Sub
  273.  
  274. Private Sub Image9_Click()
  275. If Image9.Picture = Form2.Image1.Picture Then GoTo k
  276. If Image9.Picture = Form2.Image2.Picture Then GoTo k
  277. If Label1.Caption = "Hraje hrßΦ Φ.1" Then Image9.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hrßΦ Φ.2": GoTo k
  278. If Label1.Caption = "Hraje hrßΦ Φ.2" Then Image9.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hrßΦ Φ.1": GoTo k
  279. k:
  280.  
  281. End Sub
  282.  
  283. Private Sub Timer1_Timer()
  284. If Image1.Picture = Form2.Image1.Picture And Image4.Picture = Form2.Image1.Picture And Image7.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  285. If Image1.Picture = Form2.Image2.Picture And Image4.Picture = Form2.Image2.Picture And Image7.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  286. If Image2.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image8.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  287. If Image2.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image8.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  288. If Image3.Picture = Form2.Image1.Picture And Image6.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  289. If Image3.Picture = Form2.Image2.Picture And Image6.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  290. If Image1.Picture = Form2.Image1.Picture And Image2.Picture = Form2.Image1.Picture And Image3.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  291. If Image1.Picture = Form2.Image2.Picture And Image2.Picture = Form2.Image2.Picture And Image3.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  292. If Image4.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image6.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  293. If Image4.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image6.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  294. If Image7.Picture = Form2.Image1.Picture And Image8.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  295. If Image7.Picture = Form2.Image2.Picture And Image8.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  296. If Image1.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  297. If Image1.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  298. If Image3.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image7.Picture = Form2.Image1.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 1": GoTo k
  299. If Image3.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image7.Picture = Form2.Image2.Picture Then MsgBox "Vyhrßl hrßΦ Φφslo 2": GoTo k
  300.  
  301.  
  302. GoTo k2
  303.  
  304. k:
  305. Image1.Picture = Form2.Image3.Picture
  306. Image2.Picture = Form2.Image3.Picture
  307. Image3.Picture = Form2.Image3.Picture
  308. Image4.Picture = Form2.Image3.Picture
  309. Image5.Picture = Form2.Image3.Picture
  310. Image6.Picture = Form2.Image3.Picture
  311. Image7.Picture = Form2.Image3.Picture
  312. Image8.Picture = Form2.Image3.Picture
  313. Image9.Picture = Form2.Image3.Picture
  314. Label1.Caption = "Click to Znova"
  315. k2:
  316. If Image1.Picture = Form2.Image1.Picture Or Image1.Picture = Form2.Image2.Picture Then t = t + 1
  317. If Image2.Picture = Form2.Image1.Picture Or Image2.Picture = Form2.Image2.Picture Then t = t + 1
  318. If Image3.Picture = Form2.Image1.Picture Or Image3.Picture = Form2.Image2.Picture Then t = t + 1
  319. If Image4.Picture = Form2.Image1.Picture Or Image4.Picture = Form2.Image2.Picture Then t = t + 1
  320. If Image5.Picture = Form2.Image1.Picture Or Image5.Picture = Form2.Image2.Picture Then t = t + 1
  321. If Image6.Picture = Form2.Image1.Picture Or Image6.Picture = Form2.Image2.Picture Then t = t + 1
  322. If Image7.Picture = Form2.Image1.Picture Or Image7.Picture = Form2.Image2.Picture Then t = t + 1
  323. If Image8.Picture = Form2.Image1.Picture Or Image8.Picture = Form2.Image2.Picture Then t = t + 1
  324. If Image9.Picture = Form2.Image1.Picture Or Image9.Picture = Form2.Image2.Picture Then t = t + 1
  325. If t = 9 Then MsgBox "Nikdo nevyhrßl !": t = 0: GoTo k
  326. End Sub
  327.