home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / Chip_2000-10_cd1.bin / ctenari / Havlicek / zdttt / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-03-08  |  13.0 KB  |  348 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
  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
  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. Attribute VB_Name = "Form1"
  165. Attribute VB_GlobalNameSpace = False
  166. Attribute VB_Creatable = False
  167. Attribute VB_PredeclaredId = True
  168. Attribute VB_Exposed = False
  169. Private Sub Command1_Click()
  170. Image1.Picture = LoadPicture(None)
  171. Image2.Picture = LoadPicture(None)
  172. Image3.Picture = LoadPicture(None)
  173. Image4.Picture = LoadPicture(None)
  174. Image5.Picture = LoadPicture(None)
  175. Image6.Picture = LoadPicture(None)
  176. Image7.Picture = LoadPicture(None)
  177. Image8.Picture = LoadPicture(None)
  178. Image9.Picture = LoadPicture(None)
  179. Label1.Caption = "Hraje hr
  180. End Sub
  181. Private Sub Command2_Click()
  182. End Sub
  183. Private Sub Command3_Click()
  184. MsgBox "(c) David Havl
  185. ek 9.1.2000        Tento program je FREEWARE !"
  186. MsgBox "Autor neru
  187. kody zp
  188. soben
  189. m tohoto softwaru!"
  190. End Sub
  191. Private Sub Form_Load()
  192. Image1.Picture = LoadPicture(None)
  193. Image2.Picture = LoadPicture(None)
  194. Image3.Picture = LoadPicture(None)
  195. Image4.Picture = LoadPicture(None)
  196. Image5.Picture = LoadPicture(None)
  197. Image6.Picture = LoadPicture(None)
  198. Image7.Picture = LoadPicture(None)
  199. Image8.Picture = LoadPicture(None)
  200. Image9.Picture = LoadPicture(None)
  201. End Sub
  202. Private Sub Image1_Click()
  203. If Image1.Picture = Form2.Image1.Picture Then GoTo k
  204. If Image1.Picture = Form2.Image2.Picture Then GoTo k
  205. If Label1.Caption = "Hraje hr
  206. .1" Then Image1.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  207. .2": GoTo k
  208. If Label1.Caption = "Hraje hr
  209. .2" Then Image1.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  210. .1": GoTo k
  211. End Sub
  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
  216. .1" Then Image2.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  217. .2": GoTo k
  218. If Label1.Caption = "Hraje hr
  219. .2" Then Image2.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  220. .1": GoTo k
  221. End Sub
  222. Private Sub Image3_Click()
  223. If Image3.Picture = Form2.Image1.Picture Then GoTo k
  224. If Image3.Picture = Form2.Image2.Picture Then GoTo k
  225. If Label1.Caption = "Hraje hr
  226. .1" Then Image3.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  227. .2": GoTo k
  228. If Label1.Caption = "Hraje hr
  229. .2" Then Image3.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  230. .1": GoTo k
  231. End Sub
  232. Private Sub Image4_Click()
  233. If Image4.Picture = Form2.Image1.Picture Then GoTo k
  234. If Image4.Picture = Form2.Image2.Picture Then GoTo k
  235. If Label1.Caption = "Hraje hr
  236. .1" Then Image4.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  237. .2": GoTo k
  238. If Label1.Caption = "Hraje hr
  239. .2" Then Image4.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  240. .1": GoTo k
  241. End Sub
  242. Private Sub Image5_Click()
  243. If Image5.Picture = Form2.Image1.Picture Then GoTo k
  244. If Image5.Picture = Form2.Image2.Picture Then GoTo k
  245. If Label1.Caption = "Hraje hr
  246. .1" Then Image5.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  247. .2": GoTo k
  248. If Label1.Caption = "Hraje hr
  249. .2" Then Image5.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  250. .1": GoTo k
  251. End Sub
  252. Private Sub Image6_Click()
  253. If Image6.Picture = Form2.Image1.Picture Then GoTo k
  254. If Image6.Picture = Form2.Image2.Picture Then GoTo k
  255. If Label1.Caption = "Hraje hr
  256. .1" Then Image6.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  257. .2": GoTo k
  258. If Label1.Caption = "Hraje hr
  259. .2" Then Image6.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  260. .1": GoTo k
  261. End Sub
  262. Private Sub Image7_Click()
  263. If Image7.Picture = Form2.Image1.Picture Then GoTo k
  264. If Image7.Picture = Form2.Image2.Picture Then GoTo k
  265. If Label1.Caption = "Hraje hr
  266. .1" Then Image7.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  267. .2": GoTo k
  268. If Label1.Caption = "Hraje hr
  269. .2" Then Image7.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  270. .1": GoTo k
  271. End Sub
  272. Private Sub Image8_Click()
  273. If Image8.Picture = Form2.Image1.Picture Then GoTo k
  274. If Image8.Picture = Form2.Image2.Picture Then GoTo k
  275. If Label1.Caption = "Hraje hr
  276. .1" Then Image8.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  277. .2": GoTo k
  278. If Label1.Caption = "Hraje hr
  279. .2" Then Image8.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  280. .1": GoTo k
  281. End Sub
  282. Private Sub Image9_Click()
  283. If Image9.Picture = Form2.Image1.Picture Then GoTo k
  284. If Image9.Picture = Form2.Image2.Picture Then GoTo k
  285. If Label1.Caption = "Hraje hr
  286. .1" Then Image9.Picture = Form2.Image1.Picture: Label1.Caption = "Hraje hr
  287. .2": GoTo k
  288. If Label1.Caption = "Hraje hr
  289. .2" Then Image9.Picture = Form2.Image2.Picture: Label1.Caption = "Hraje hr
  290. .1": GoTo k
  291. End Sub
  292. Private Sub Timer1_Timer()
  293. If Image1.Picture = Form2.Image1.Picture And Image4.Picture = Form2.Image1.Picture And Image7.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  294. slo 1": GoTo k
  295. If Image1.Picture = Form2.Image2.Picture And Image4.Picture = Form2.Image2.Picture And Image7.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  296. slo 2": GoTo k
  297. If Image2.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image8.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  298. slo 1": GoTo k
  299. If Image2.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image8.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  300. slo 2": GoTo k
  301. If Image3.Picture = Form2.Image1.Picture And Image6.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  302. slo 1": GoTo k
  303. If Image3.Picture = Form2.Image2.Picture And Image6.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  304. slo 2": GoTo k
  305. If Image1.Picture = Form2.Image1.Picture And Image2.Picture = Form2.Image1.Picture And Image3.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  306. slo 1": GoTo k
  307. If Image1.Picture = Form2.Image2.Picture And Image2.Picture = Form2.Image2.Picture And Image3.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  308. slo 2": GoTo k
  309. If Image4.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image6.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  310. slo 1": GoTo k
  311. If Image4.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image6.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  312. slo 2": GoTo k
  313. If Image7.Picture = Form2.Image1.Picture And Image8.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  314. slo 1": GoTo k
  315. If Image7.Picture = Form2.Image2.Picture And Image8.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  316. slo 2": GoTo k
  317. If Image1.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image9.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  318. slo 1": GoTo k
  319. If Image1.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image9.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  320. slo 2": GoTo k
  321. If Image3.Picture = Form2.Image1.Picture And Image5.Picture = Form2.Image1.Picture And Image7.Picture = Form2.Image1.Picture Then MsgBox "Vyhr
  322. slo 1": GoTo k
  323. If Image3.Picture = Form2.Image2.Picture And Image5.Picture = Form2.Image2.Picture And Image7.Picture = Form2.Image2.Picture Then MsgBox "Vyhr
  324. slo 2": GoTo k
  325. GoTo k2
  326. Image1.Picture = Form2.Image3.Picture
  327. Image2.Picture = Form2.Image3.Picture
  328. Image3.Picture = Form2.Image3.Picture
  329. Image4.Picture = Form2.Image3.Picture
  330. Image5.Picture = Form2.Image3.Picture
  331. Image6.Picture = Form2.Image3.Picture
  332. Image7.Picture = Form2.Image3.Picture
  333. Image8.Picture = Form2.Image3.Picture
  334. Image9.Picture = Form2.Image3.Picture
  335. Label1.Caption = "Click to Znova"
  336. If Image1.Picture = Form2.Image1.Picture Or Image1.Picture = Form2.Image2.Picture Then t = t + 1
  337. If Image2.Picture = Form2.Image1.Picture Or Image2.Picture = Form2.Image2.Picture Then t = t + 1
  338. If Image3.Picture = Form2.Image1.Picture Or Image3.Picture = Form2.Image2.Picture Then t = t + 1
  339. If Image4.Picture = Form2.Image1.Picture Or Image4.Picture = Form2.Image2.Picture Then t = t + 1
  340. If Image5.Picture = Form2.Image1.Picture Or Image5.Picture = Form2.Image2.Picture Then t = t + 1
  341. If Image6.Picture = Form2.Image1.Picture Or Image6.Picture = Form2.Image2.Picture Then t = t + 1
  342. If Image7.Picture = Form2.Image1.Picture Or Image7.Picture = Form2.Image2.Picture Then t = t + 1
  343. If Image8.Picture = Form2.Image1.Picture Or Image8.Picture = Form2.Image2.Picture Then t = t + 1
  344. If Image9.Picture = Form2.Image1.Picture Or Image9.Picture = Form2.Image2.Picture Then t = t + 1
  345. If t = 9 Then MsgBox "Nikdo nevyhr
  346. l !": t = 0: GoTo k
  347. End Sub
  348.