暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

卜卦2.vb 126KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285
  1. Option Strict Off
  2. Public Class 卜卦2
  3. ReadOnly ds As New DataSet
  4. Dim NUM1 As Integer : Dim NUM2(6) As Integer
  5. Private Sub Set_grid()
  6. DataGridView1.Columns(0).Width = 53 : DataGridView1.Columns(1).Width = 87 : DataGridView1.Columns(2).Visible = False : DataGridView1.Columns(3).Visible = False
  7. DataGridView1.Columns(4).Visible = False : DataGridView1.Columns(5).Visible = False : DataGridView1.Columns(6).Visible = False : DataGridView1.Columns(7).Visible = False
  8. DataGridView1.Columns(8).Visible = False : DataGridView1.Columns(9).Visible = False : DataGridView1.Columns(10).Width = 90 : DataGridView1.Columns(11).Width = 285
  9. DataGridView1.Columns(12).Visible = False : DataGridView1.Columns(13).Visible = False : DataGridView1.Columns(14).Visible = False
  10. End Sub
  11. Private Sub Set_格式設定()
  12. TextBox25.Visible = False : TextBox26.Visible = False : TextBox27.Visible = False : TextBox28.Visible = False : TextBox29.Visible = False : TextBox30.Visible = False
  13. TextBox31.Visible = False : TextBox32.Visible = False : TextBox33.Visible = False : TextBox34.Visible = False : TextBox35.Visible = False : TextBox36.Visible = False
  14. TextBox37.Visible = False : TextBox38.Visible = False : TextBox39.Visible = False : TextBox40.Visible = False : TextBox41.Visible = False : TextBox42.Visible = False
  15. TextBox43.Visible = False : TextBox44.Visible = False : TextBox45.Visible = False : TextBox46.Visible = False : TextBox47.Visible = False : TextBox48.Visible = False
  16. TextBox49.Visible = False : TextBox50.Visible = False : TextBox51.Visible = False : TextBox52.Visible = False : TextBox53.Visible = False : TextBox54.Visible = False
  17. Label34.Visible = False : Label35.Visible = False : Label36.Visible = False : Label37.Visible = False : Label38.Visible = False : Label39.Visible = False
  18. TextBox55.Visible = False : TextBox56.Visible = False : TextBox57.Visible = False : TextBox58.Visible = False : TextBox59.Visible = False : TextBox60.Visible = False
  19. TextBox61.Visible = False : TextBox62.Visible = False : TextBox63.Visible = False : TextBox64.Visible = False : TextBox65.Visible = False : TextBox66.Visible = False
  20. TextBox67.Visible = False : TextBox68.Visible = False : TextBox69.Visible = False : TextBox70.Visible = False : TextBox71.Visible = False : TextBox72.Visible = False
  21. TextBox73.Visible = False : TextBox74.Visible = False : TextBox75.Visible = False : TextBox76.Visible = False : TextBox77.Visible = False : TextBox78.Visible = False
  22. TextBox79.Visible = False : TextBox80.Visible = False : TextBox81.Visible = False : TextBox82.Visible = False : TextBox83.Visible = False : TextBox84.Visible = False
  23. TextBox85.Visible = False : TextBox86.Visible = False : TextBox87.Visible = False : TextBox88.Visible = False : TextBox89.Visible = False : TextBox90.Visible = False
  24. TextBox91.Visible = False : TextBox92.Visible = False : TextBox93.Visible = False : TextBox94.Visible = False : TextBox95.Visible = False : TextBox96.Visible = False
  25. TextBox102.Visible = False : TextBox103.Visible = False : TextBox104.Visible = False : TextBox105.Visible = False : TextBox106.Visible = False : TextBox107.Visible = False
  26. TextBox108.Visible = False : TextBox109.Visible = False : TextBox110.Visible = False : TextBox111.Visible = False : TextBox112.Visible = False : TextBox113.Visible = False
  27. TextBox114.Visible = False : TextBox115.Visible = False : TextBox116.Visible = False : TextBox117.Visible = False : TextBox118.Visible = False : TextBox119.Visible = False
  28. TextBox120.Visible = False : TextBox121.Visible = False : TextBox122.Visible = False : TextBox123.Visible = False : TextBox124.Visible = False : TextBox125.Visible = False
  29. TextBox126.Visible = False : TextBox127.Visible = False : TextBox128.Visible = False : TextBox129.Visible = False : TextBox130.Visible = False : TextBox131.Visible = False
  30. Label40.Visible = False : Label41.Visible = False : Label42.Visible = False : Label43.Visible = False : Label44.Visible = False : Label45.Visible = False
  31. TextBox133.Visible = False : TextBox134.Visible = False : TextBox135.Visible = False : TextBox136.Visible = False : TextBox137.Visible = False : TextBox138.Visible = False
  32. TextBox226.Visible = False : TextBox227.Visible = False : TextBox193.Visible = False : TextBox194.Visible = False : TextBox195.Visible = False : TextBox196.Visible = False
  33. TextBox197.Visible = False : TextBox198.Visible = False
  34. End Sub
  35. Private Sub Set_萬年曆()
  36. ConnOpen()
  37. SQL1 = "SELECT 年, 月, 旬, 日, 旬空1, 旬空2 FROM 萬年曆 WHERE (西元 = '" & Format(DateTimePicker1.Value, "yyyy/MM/dd") & "')"
  38. CmdSet_For_dr()
  39. If dr.Read() Then
  40. TextBox1.Text = dr("年").ToString : TextBox2.Text = dr("月").ToString : TextBox3.Text = dr("旬").ToString : TextBox4.Text = dr("日").ToString
  41. TextBox97.Text = dr("旬空1").ToString : TextBox98.Text = dr("旬空2").ToString
  42. End If
  43. conn.Close() : dr.Close()
  44. End Sub
  45. Private Sub Set_萬年曆五行()
  46. For NUM1 = 1 To 4
  47. Dim 條件1 As String = "(地支 = RIGHT('" & TextBox1.Text & "', 1))" : Dim 條件2 As String = "(地支 = RIGHT('" & TextBox2.Text & "', 1))"
  48. Dim 條件3 As String = "(地支 = RIGHT('" & TextBox3.Text & "', 1))" : Dim 條件4 As String = "(地支 = RIGHT('" & TextBox4.Text & "', 1))"
  49. ConnOpen()
  50. If NUM1 = 1 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件1 : End If : If NUM1 = 2 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件2 : End If
  51. If NUM1 = 3 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件3 : End If : If NUM1 = 4 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件4 : End If
  52. CmdSet_For_dr()
  53. If dr.Read() Then
  54. If NUM1 = 1 Then : TextBox5.Text = dr("五行").ToString : End If : If NUM1 = 2 Then : TextBox6.Text = dr("五行").ToString : End If
  55. If NUM1 = 3 Then : TextBox7.Text = dr("五行").ToString : End If : If NUM1 = 4 Then : TextBox8.Text = dr("五行").ToString : End If
  56. End If
  57. conn.Close() : dr.Close()
  58. Next
  59. TextBox9.Text = TextBox6.Text
  60. End Sub
  61. Private Sub Set_相氣休囚()
  62. ConnOpen()
  63. SQL1 = "SELECT 相, 氣, 休, 囚 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox2.Text & "', 1))"
  64. CmdSet_For_dr()
  65. If dr.Read() Then
  66. TextBox10.Text = dr("相").ToString : TextBox11.Text = dr("氣").ToString
  67. TextBox187.Text = dr("休").ToString : TextBox188.Text = dr("囚").ToString
  68. End If
  69. conn.Close() : dr.Close()
  70. End Sub
  71. Private Sub Set_六獸()
  72. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "甲" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "乙" Then
  73. Label9.Text = "青龍" : Label10.Text = "朱雀" : Label11.Text = "勾陳" : Label12.Text = "騰蛇" : Label13.Text = "白虎" : Label14.Text = "玄武" : Else
  74. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "丙" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "丁" Then
  75. Label9.Text = "朱雀" : Label10.Text = "勾陳" : Label11.Text = "騰蛇" : Label12.Text = "白虎" : Label13.Text = "玄武" : Label14.Text = "青龍" : Else
  76. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "戊" Then
  77. Label9.Text = "勾陳" : Label10.Text = "騰蛇" : Label11.Text = "白虎" : Label12.Text = "玄武" : Label13.Text = "青龍" : Label14.Text = "朱雀" : Else
  78. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "己" Then
  79. Label9.Text = "騰蛇" : Label10.Text = "白虎" : Label11.Text = "玄武" : Label12.Text = "青龍" : Label13.Text = "朱雀" : Label14.Text = "勾陳" : Else
  80. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "庚" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "辛" Then
  81. Label9.Text = "白虎" : Label10.Text = "玄武" : Label11.Text = "青龍" : Label12.Text = "朱雀" : Label13.Text = "勾陳" : Label14.Text = "騰蛇" : Else
  82. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "壬" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "癸" Then
  83. Label9.Text = "玄武" : Label10.Text = "青龍" : Label11.Text = "朱雀" : Label12.Text = "勾陳" : Label13.Text = "騰蛇" : Label14.Text = "白虎"
  84. End If : End If : End If : End If : End If : End If
  85. End Sub
  86. Private Sub Set_日長生()
  87. If TextBox8.Text = "火" Then
  88. TextBox145.Text = "寅" : TextBox146.Text = "卯" : TextBox147.Text = "辰" : TextBox148.Text = "巳" : TextBox149.Text = "午" : TextBox150.Text = "未"
  89. TextBox151.Text = "申" : TextBox152.Text = "酉" : TextBox153.Text = "戌" : TextBox154.Text = "亥" : TextBox155.Text = "子" : TextBox156.Text = "丑" : Else
  90. If TextBox8.Text = "金" Then
  91. TextBox145.Text = "巳" : TextBox146.Text = "午" : TextBox147.Text = "未" : TextBox148.Text = "申" : TextBox149.Text = "酉" : TextBox150.Text = "戌"
  92. TextBox151.Text = "亥" : TextBox152.Text = "子" : TextBox153.Text = "丑" : TextBox154.Text = "寅" : TextBox155.Text = "卯" : TextBox156.Text = "辰" : Else
  93. If TextBox8.Text = "水" Then
  94. TextBox145.Text = "申" : TextBox146.Text = "酉" : TextBox147.Text = "戌" : TextBox148.Text = "亥" : TextBox149.Text = "子" : TextBox150.Text = "丑"
  95. TextBox151.Text = "寅" : TextBox152.Text = "卯" : TextBox153.Text = "辰" : TextBox154.Text = "巳" : TextBox155.Text = "午" : TextBox156.Text = "未" : Else
  96. If TextBox8.Text = "木" Then
  97. TextBox145.Text = "亥" : TextBox146.Text = "子" : TextBox147.Text = "丑" : TextBox148.Text = "寅" : TextBox149.Text = "卯" : TextBox150.Text = "辰"
  98. TextBox151.Text = "巳" : TextBox152.Text = "午" : TextBox153.Text = "未" : TextBox154.Text = "申" : TextBox155.Text = "酉" : TextBox156.Text = "戌" : Else
  99. If TextBox8.Text = "土" Then
  100. TextBox145.Text = "申" : TextBox146.Text = "酉" : TextBox147.Text = "戌" : TextBox148.Text = "亥" : TextBox149.Text = "子" : TextBox150.Text = "丑"
  101. TextBox151.Text = "寅" : TextBox152.Text = "卯" : TextBox153.Text = "辰" : TextBox154.Text = "巳" : TextBox155.Text = "午" : TextBox156.Text = "未"
  102. End If : End If : End If : End If : End If
  103. End Sub
  104. Private Sub Set_取卦()
  105. If ComboBox1.Text = "一" Then : TextBox202.Text = "一" : TextBox208.Text = "一" : ElseIf ComboBox1.Text = "- -" Then : TextBox202.Text = "- -" : TextBox208.Text = "- -"
  106. ElseIf ComboBox1.Text = "O" Then : TextBox202.Text = "一" : TextBox208.Text = "- -" : ElseIf ComboBox1.Text = "X" Then : TextBox202.Text = "- -" : TextBox208.Text = "一" : End If
  107. If ComboBox2.Text = "一" Then : TextBox203.Text = "一" : TextBox209.Text = "一" : ElseIf ComboBox2.Text = "- -" Then : TextBox203.Text = "- -" : TextBox209.Text = "- -"
  108. ElseIf ComboBox2.Text = "O" Then : TextBox203.Text = "一" : TextBox209.Text = "- -" : ElseIf ComboBox2.Text = "X" Then : TextBox203.Text = "- -" : TextBox209.Text = "一" : End If
  109. If ComboBox3.Text = "一" Then : TextBox204.Text = "一" : TextBox210.Text = "一" : ElseIf ComboBox3.Text = "- -" Then : TextBox204.Text = "- -" : TextBox210.Text = "- -"
  110. ElseIf ComboBox3.Text = "O" Then : TextBox204.Text = "一" : TextBox210.Text = "- -" : ElseIf ComboBox3.Text = "X" Then : TextBox204.Text = "- -" : TextBox210.Text = "一" : End If
  111. If ComboBox6.Text = "一" Then : TextBox205.Text = "一" : TextBox211.Text = "一" : ElseIf ComboBox6.Text = "- -" Then : TextBox205.Text = "- -" : TextBox211.Text = "- -"
  112. ElseIf ComboBox6.Text = "O" Then : TextBox205.Text = "一" : TextBox211.Text = "- -" : ElseIf ComboBox6.Text = "X" Then : TextBox205.Text = "- -" : TextBox211.Text = "一" : End If
  113. If ComboBox7.Text = "一" Then : TextBox206.Text = "一" : TextBox212.Text = "一" : ElseIf ComboBox7.Text = "- -" Then : TextBox206.Text = "- -" : TextBox212.Text = "- -"
  114. ElseIf ComboBox7.Text = "O" Then : TextBox206.Text = "一" : TextBox212.Text = "- -" : ElseIf ComboBox7.Text = "X" Then : TextBox206.Text = "- -" : TextBox212.Text = "一" : End If
  115. If ComboBox8.Text = "一" Then : TextBox207.Text = "一" : TextBox213.Text = "一" : ElseIf ComboBox8.Text = "- -" Then : TextBox207.Text = "- -" : TextBox213.Text = "- -"
  116. ElseIf ComboBox8.Text = "O" Then : TextBox207.Text = "一" : TextBox213.Text = "- -" : ElseIf ComboBox8.Text = "X" Then : TextBox207.Text = "- -" : TextBox213.Text = "一" : End If
  117. If TextBox202.Text = "一" And TextBox203.Text = "一" And TextBox204.Text = "一" Then
  118. Label21.Text = "甲" : Label22.Text = "甲" : Label23.Text = "甲" : Label27.Text = "子" : Label28.Text = "寅" : Label29.Text = "辰" : TextBox214.Text = "1" : Else
  119. If TextBox202.Text = "一" And TextBox203.Text = "一" And TextBox204.Text = "- -" Then
  120. Label21.Text = "丁" : Label22.Text = "丁" : Label23.Text = "丁" : Label27.Text = "巳" : Label28.Text = "卯" : Label29.Text = "丑" : TextBox214.Text = "2" : Else
  121. If TextBox202.Text = "一" And TextBox203.Text = "- -" And TextBox204.Text = "一" Then
  122. Label21.Text = "己" : Label22.Text = "己" : Label23.Text = "己" : Label27.Text = "卯" : Label28.Text = "丑" : Label29.Text = "亥" : TextBox214.Text = "3" : Else
  123. If TextBox202.Text = "一" And TextBox203.Text = "- -" And TextBox204.Text = "- -" Then
  124. Label21.Text = "庚" : Label22.Text = "庚" : Label23.Text = "庚" : Label27.Text = "子" : Label28.Text = "寅" : Label29.Text = "辰" : TextBox214.Text = "4" : Else
  125. If TextBox202.Text = "- -" And TextBox203.Text = "一" And TextBox204.Text = "一" Then
  126. Label21.Text = "辛" : Label22.Text = "辛" : Label23.Text = "辛" : Label27.Text = "丑" : Label28.Text = "亥" : Label29.Text = "酉" : TextBox214.Text = "5" : Else
  127. If TextBox202.Text = "- -" And TextBox203.Text = "一" And TextBox204.Text = "- -" Then
  128. Label21.Text = "戊" : Label22.Text = "戊" : Label23.Text = "戊" : Label27.Text = "寅" : Label28.Text = "辰" : Label29.Text = "午" : TextBox214.Text = "6" : Else
  129. If TextBox202.Text = "- -" And TextBox203.Text = "- -" And TextBox204.Text = "一" Then
  130. Label21.Text = "丙" : Label22.Text = "丙" : Label23.Text = "丙" : Label27.Text = "辰" : Label28.Text = "午" : Label29.Text = "申" : TextBox214.Text = "7" : Else
  131. If TextBox202.Text = "- -" And TextBox203.Text = "- -" And TextBox204.Text = "- -" Then
  132. Label21.Text = "乙" : Label22.Text = "乙" : Label23.Text = "乙" : Label27.Text = "未" : Label28.Text = "巳" : Label29.Text = "卯" : TextBox214.Text = "8"
  133. End If : End If : End If : End If : End If : End If : End If : End If
  134. If TextBox205.Text = "一" And TextBox206.Text = "一" And TextBox207.Text = "一" Then
  135. Label24.Text = "壬" : Label25.Text = "壬" : Label26.Text = "壬" : Label30.Text = "午" : Label31.Text = "申" : Label32.Text = "戌" : TextBox215.Text = "1" : Else
  136. If TextBox205.Text = "一" And TextBox206.Text = "一" And TextBox207.Text = "- -" Then
  137. Label24.Text = "丁" : Label25.Text = "丁" : Label26.Text = "丁" : Label30.Text = "亥" : Label31.Text = "酉" : Label32.Text = "未" : TextBox215.Text = "2" : Else
  138. If TextBox205.Text = "一" And TextBox206.Text = "- -" And TextBox207.Text = "一" Then
  139. Label24.Text = "己" : Label25.Text = "己" : Label26.Text = "己" : Label30.Text = "酉" : Label31.Text = "未" : Label32.Text = "巳" : TextBox215.Text = "3" : Else
  140. If TextBox205.Text = "一" And TextBox206.Text = "- -" And TextBox207.Text = "- -" Then
  141. Label24.Text = "庚" : Label25.Text = "庚" : Label26.Text = "庚" : Label30.Text = "午" : Label31.Text = "申" : Label32.Text = "戌" : TextBox215.Text = "4" : Else
  142. If TextBox205.Text = "- -" And TextBox206.Text = "一" And TextBox207.Text = "一" Then
  143. Label24.Text = "辛" : Label25.Text = "辛" : Label26.Text = "辛" : Label30.Text = "未" : Label31.Text = "巳" : Label32.Text = "卯" : TextBox215.Text = "5" : Else
  144. If TextBox205.Text = "- -" And TextBox206.Text = "一" And TextBox207.Text = "- -" Then
  145. Label24.Text = "戊" : Label25.Text = "戊" : Label26.Text = "戊" : Label30.Text = "申" : Label31.Text = "戌" : Label32.Text = "子" : TextBox215.Text = "6" : Else
  146. If TextBox205.Text = "- -" And TextBox206.Text = "- -" And TextBox207.Text = "一" Then
  147. Label24.Text = "丙" : Label25.Text = "丙" : Label26.Text = "丙" : Label30.Text = "戌" : Label31.Text = "子" : Label32.Text = "寅" : TextBox215.Text = "7" : Else
  148. If TextBox205.Text = "- -" And TextBox206.Text = "- -" And TextBox207.Text = "- -" Then
  149. Label24.Text = "癸" : Label25.Text = "癸" : Label26.Text = "癸" : Label30.Text = "丑" : Label31.Text = "亥" : Label32.Text = "酉" : TextBox215.Text = "8"
  150. End If : End If : End If : End If : End If : End If : End If : End If
  151. If TextBox208.Text = "一" And TextBox209.Text = "一" And TextBox210.Text = "一" Then : TextBox216.Text = "1" : Else
  152. If TextBox208.Text = "一" And TextBox209.Text = "一" And TextBox210.Text = "- -" Then : TextBox216.Text = "2" : Else
  153. If TextBox208.Text = "一" And TextBox209.Text = "- -" And TextBox210.Text = "一" Then : TextBox216.Text = "3" : Else
  154. If TextBox208.Text = "一" And TextBox209.Text = "- -" And TextBox210.Text = "- -" Then : TextBox216.Text = "4" : Else
  155. If TextBox208.Text = "- -" And TextBox209.Text = "一" And TextBox210.Text = "一" Then : TextBox216.Text = "5" : Else
  156. If TextBox208.Text = "- -" And TextBox209.Text = "一" And TextBox210.Text = "- -" Then : TextBox216.Text = "6" : Else
  157. If TextBox208.Text = "- -" And TextBox209.Text = "- -" And TextBox210.Text = "一" Then : TextBox216.Text = "7" : Else
  158. If TextBox208.Text = "- -" And TextBox209.Text = "- -" And TextBox210.Text = "- -" Then : TextBox216.Text = "8" : Else
  159. End If : End If : End If : End If : End If : End If : End If : End If
  160. If TextBox211.Text = "一" And TextBox212.Text = "一" And TextBox213.Text = "一" Then : TextBox217.Text = "1" : Else
  161. If TextBox211.Text = "一" And TextBox212.Text = "一" And TextBox213.Text = "- -" Then : TextBox217.Text = "2" : Else
  162. If TextBox211.Text = "一" And TextBox212.Text = "- -" And TextBox213.Text = "一" Then : TextBox217.Text = "3" : Else
  163. If TextBox211.Text = "一" And TextBox212.Text = "- -" And TextBox213.Text = "- -" Then : TextBox217.Text = "4" : Else
  164. If TextBox211.Text = "- -" And TextBox212.Text = "一" And TextBox213.Text = "一" Then : TextBox217.Text = "5" : Else
  165. If TextBox211.Text = "- -" And TextBox212.Text = "一" And TextBox213.Text = "- -" Then : TextBox217.Text = "6" : Else
  166. If TextBox211.Text = "- -" And TextBox212.Text = "- -" And TextBox213.Text = "一" Then : TextBox217.Text = "7" : Else
  167. If TextBox211.Text = "- -" And TextBox212.Text = "- -" And TextBox213.Text = "- -" Then : TextBox217.Text = "8" : Else
  168. End If : End If : End If : End If : End If : End If : End If : End If
  169. If TextBox208.Text = "一" And TextBox209.Text = "一" And TextBox210.Text = "一" Then : TextBox102.Text = "子" : TextBox103.Text = "寅" : TextBox104.Text = "辰" : Else
  170. If TextBox208.Text = "一" And TextBox209.Text = "一" And TextBox210.Text = "- -" Then : TextBox102.Text = "巳" : TextBox103.Text = "卯" : TextBox104.Text = "丑" : Else
  171. If TextBox208.Text = "一" And TextBox209.Text = "- -" And TextBox210.Text = "一" Then : TextBox102.Text = "卯" : TextBox103.Text = "丑" : TextBox104.Text = "亥" : Else
  172. If TextBox208.Text = "一" And TextBox209.Text = "- -" And TextBox210.Text = "- -" Then : TextBox102.Text = "子" : TextBox103.Text = "寅" : TextBox104.Text = "辰" : Else
  173. If TextBox208.Text = "- -" And TextBox209.Text = "一" And TextBox210.Text = "一" Then : TextBox102.Text = "丑" : TextBox103.Text = "亥" : TextBox104.Text = "酉" : Else
  174. If TextBox208.Text = "- -" And TextBox209.Text = "一" And TextBox210.Text = "- -" Then : TextBox102.Text = "寅" : TextBox103.Text = "辰" : TextBox104.Text = "午" : Else
  175. If TextBox208.Text = "- -" And TextBox209.Text = "- -" And TextBox210.Text = "一" Then : TextBox102.Text = "辰" : TextBox103.Text = "午" : TextBox104.Text = "申" : Else
  176. If TextBox208.Text = "- -" And TextBox209.Text = "- -" And TextBox210.Text = "- -" Then : TextBox102.Text = "未" : TextBox103.Text = "巳" : TextBox104.Text = "卯"
  177. End If : End If : End If : End If : End If : End If : End If : End If
  178. If TextBox211.Text = "一" And TextBox212.Text = "一" And TextBox213.Text = "一" Then : TextBox105.Text = "午" : TextBox106.Text = "申" : TextBox107.Text = "戌" : Else
  179. If TextBox211.Text = "一" And TextBox212.Text = "一" And TextBox213.Text = "- -" Then : TextBox105.Text = "亥" : TextBox106.Text = "酉" : TextBox107.Text = "未" : Else
  180. If TextBox211.Text = "一" And TextBox212.Text = "- -" And TextBox213.Text = "一" Then : TextBox105.Text = "酉" : TextBox106.Text = "未" : TextBox107.Text = "巳" : Else
  181. If TextBox211.Text = "一" And TextBox212.Text = "- -" And TextBox213.Text = "- -" Then : TextBox105.Text = "午" : TextBox106.Text = "申" : TextBox107.Text = "戌" : Else
  182. If TextBox211.Text = "- -" And TextBox212.Text = "一" And TextBox213.Text = "一" Then : TextBox105.Text = "未" : TextBox106.Text = "巳" : TextBox107.Text = "卯" : Else
  183. If TextBox211.Text = "- -" And TextBox212.Text = "一" And TextBox213.Text = "- -" Then : TextBox105.Text = "申" : TextBox106.Text = "戌" : TextBox107.Text = "子" : Else
  184. If TextBox211.Text = "- -" And TextBox212.Text = "- -" And TextBox213.Text = "一" Then : TextBox105.Text = "戌" : TextBox106.Text = "子" : TextBox107.Text = "寅" : Else
  185. If TextBox211.Text = "- -" And TextBox212.Text = "- -" And TextBox213.Text = "- -" Then : TextBox105.Text = "丑" : TextBox106.Text = "亥" : TextBox107.Text = "酉"
  186. End If : End If : End If : End If : End If : End If : End If : End If
  187. End Sub
  188. Private Sub Set_排卦()
  189. ConnOpen()
  190. SQL1 = "SELECT 初爻, 二爻, 三爻, 四爻, 五爻, 上爻 FROM 八卦六親 WHERE (卦數 = '" & TextBox215.Text + TextBox214.Text & "')"
  191. CmdSet_For_dr()
  192. If dr.Read() Then
  193. TextBox12.Text = dr("初爻").ToString : TextBox13.Text = dr("二爻").ToString : TextBox14.Text = dr("三爻").ToString
  194. TextBox15.Text = dr("四爻").ToString : TextBox16.Text = dr("五爻").ToString : TextBox17.Text = dr("上爻").ToString
  195. End If
  196. conn.Close() : dr.Close()
  197. End Sub
  198. Private Sub Set_掛名()
  199. For NUM1 = 1 To 4
  200. Dim 條件1 As String = "SELECT 卦名 FROM 八卦六親 WHERE (卦數 = '" & TextBox215.Text + TextBox214.Text & "')"
  201. Dim 條件2 As String = "SELECT 五行 FROM 八卦六親 WHERE (卦數 = '" & TextBox215.Text + TextBox214.Text & "')"
  202. Dim 條件3 As String = "SELECT 卦名 FROM 八卦六親 WHERE (卦數 = '" & TextBox217.Text + TextBox216.Text & "')"
  203. Dim 條件4 As String = "SELECT 五行 FROM 八卦六親 WHERE (卦名 = '" & TextBox100.Text & "')"
  204. ConnOpen()
  205. If NUM1 = 1 Then : SQL1 = 條件1 : End If : If NUM1 = 2 Then : SQL1 = 條件2 : End If
  206. If NUM1 = 3 Then : SQL1 = 條件3 : End If : If NUM1 = 4 Then : SQL1 = 條件4 : End If
  207. CmdSet_For_dr()
  208. If dr.Read() Then
  209. If NUM1 = 1 Then : TextBox24.Text = dr("卦名").ToString : End If : If NUM1 = 2 Then : TextBox99.Text = dr("五行").ToString : End If
  210. If NUM1 = 3 Then : TextBox100.Text = dr("卦名").ToString : End If : If NUM1 = 4 Then : TextBox101.Text = dr("五行").ToString : End If
  211. End If
  212. conn.Close() : dr.Close()
  213. Next
  214. End Sub
  215. Private Sub Set_掛地支五行()
  216. For NUM1 = 1 To 6
  217. Dim 條件1 As String = "(地支 = '" & Label27.Text & "')"
  218. Dim 條件2 As String = "(地支 = '" & Label28.Text & "')"
  219. Dim 條件3 As String = "(地支 = '" & Label29.Text & "')"
  220. Dim 條件4 As String = "(地支 = '" & Label30.Text & "')"
  221. Dim 條件5 As String = "(地支 = '" & Label31.Text & "')"
  222. Dim 條件6 As String = "(地支 = '" & Label32.Text & "')"
  223. ConnOpen()
  224. If NUM1 = 1 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件1 : End If : If NUM1 = 2 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件2 : End If
  225. If NUM1 = 3 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件3 : End If : If NUM1 = 4 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件4 : End If
  226. If NUM1 = 5 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件5 : End If : If NUM1 = 6 Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件6 : End If
  227. CmdSet_For_dr()
  228. If dr.Read() Then
  229. If NUM1 = 1 Then : TextBox18.Text = dr("五行").ToString : End If : If NUM1 = 2 Then : TextBox19.Text = dr("五行").ToString : End If
  230. If NUM1 = 3 Then : TextBox20.Text = dr("五行").ToString : End If : If NUM1 = 4 Then : TextBox21.Text = dr("五行").ToString : End If
  231. If NUM1 = 5 Then : TextBox22.Text = dr("五行").ToString : End If : If NUM1 = 6 Then : TextBox23.Text = dr("五行").ToString : End If
  232. End If
  233. conn.Close() : dr.Close()
  234. Next
  235. End Sub
  236. Private Sub Set_世應伏身()
  237. ConnOpen()
  238. SQL1 = "SELECT 世應初爻, 世應二爻, 世應三爻, 世應四爻,世應五爻,世應上爻, 初爻卦身, 二爻卦身, 三爻卦身, 四爻卦身, 五爻卦身, 上爻卦身, 初爻伏一, " &
  239. "二爻伏一, 三爻伏一, 四爻伏一, 五爻伏一, 上爻伏一, 初爻伏二, 二爻伏二, 三爻伏二, 四爻伏二, 五爻伏二, 上爻伏二, 初爻伏三, 二爻伏三, " &
  240. "三爻伏三, 四爻伏三, 五爻伏三, 上爻伏三 FROM 八卦六親 " &
  241. "WHERE (卦數 = '" & TextBox215.Text + TextBox214.Text & "')"
  242. CmdSet_For_dr()
  243. If dr.Read() Then
  244. TextBox25.Text = dr("世應初爻").ToString : TextBox26.Text = dr("世應二爻").ToString : TextBox27.Text = dr("世應三爻").ToString
  245. TextBox28.Text = dr("世應四爻").ToString : TextBox29.Text = dr("世應五爻").ToString : TextBox30.Text = dr("世應上爻").ToString
  246. TextBox31.Text = dr("初爻卦身").ToString : TextBox32.Text = dr("二爻卦身").ToString : TextBox33.Text = dr("三爻卦身").ToString
  247. TextBox34.Text = dr("四爻卦身").ToString : TextBox35.Text = dr("五爻卦身").ToString : TextBox36.Text = dr("上爻卦身").ToString
  248. TextBox37.Text = dr("初爻伏一").ToString : TextBox38.Text = dr("二爻伏一").ToString : TextBox39.Text = dr("三爻伏一").ToString
  249. TextBox40.Text = dr("四爻伏一").ToString : TextBox41.Text = dr("五爻伏一").ToString : TextBox42.Text = dr("上爻伏一").ToString
  250. TextBox43.Text = dr("初爻伏二").ToString : TextBox44.Text = dr("二爻伏二").ToString : TextBox45.Text = dr("三爻伏二").ToString
  251. TextBox46.Text = dr("四爻伏二").ToString : TextBox47.Text = dr("五爻伏二").ToString : TextBox48.Text = dr("上爻伏二").ToString
  252. TextBox49.Text = dr("初爻伏三").ToString : TextBox50.Text = dr("二爻伏三").ToString : TextBox51.Text = dr("三爻伏三").ToString
  253. TextBox52.Text = dr("四爻伏三").ToString : TextBox53.Text = dr("五爻伏三").ToString : TextBox54.Text = dr("上爻伏三").ToString
  254. End If
  255. conn.Close() : dr.Close()
  256. If TextBox25.Text <> "0" Then : TextBox25.Visible = True : End If : If TextBox26.Text <> "0" Then : TextBox26.Visible = True : End If
  257. If TextBox27.Text <> "0" Then : TextBox27.Visible = True : End If : If TextBox28.Text <> "0" Then : TextBox28.Visible = True : End If
  258. If TextBox29.Text <> "0" Then : TextBox29.Visible = True : End If : If TextBox30.Text <> "0" Then : TextBox30.Visible = True : End If
  259. If TextBox31.Text <> "0" Then : TextBox31.Visible = True : End If : If TextBox32.Text <> "0" Then : TextBox32.Visible = True : End If
  260. If TextBox33.Text <> "0" Then : TextBox33.Visible = True : End If : If TextBox34.Text <> "0" Then : TextBox34.Visible = True : End If
  261. If TextBox35.Text <> "0" Then : TextBox35.Visible = True : End If : If TextBox36.Text <> "0" Then : TextBox36.Visible = True : End If
  262. If TextBox37.Text <> "0" Then : TextBox37.Visible = True : End If : If TextBox38.Text <> "0" Then : TextBox38.Visible = True : End If
  263. If TextBox39.Text <> "0" Then : TextBox39.Visible = True : End If : If TextBox40.Text <> "0" Then : TextBox40.Visible = True : End If
  264. If TextBox41.Text <> "0" Then : TextBox41.Visible = True : End If : If TextBox42.Text <> "0" Then : TextBox42.Visible = True : End If
  265. If TextBox43.Text <> "0" Then : TextBox43.Visible = True : Label34.Visible = True : End If
  266. If TextBox44.Text <> "0" Then : TextBox44.Visible = True : Label35.Visible = True : End If
  267. If TextBox45.Text <> "0" Then : TextBox45.Visible = True : Label36.Visible = True : End If
  268. If TextBox46.Text <> "0" Then : TextBox46.Visible = True : Label37.Visible = True : End If
  269. If TextBox47.Text <> "0" Then : TextBox47.Visible = True : Label38.Visible = True : End If
  270. If TextBox48.Text <> "0" Then : TextBox48.Visible = True : Label39.Visible = True : End If
  271. If TextBox49.Text <> "0" Then : TextBox49.Visible = True : End If : If TextBox50.Text <> "0" Then : TextBox50.Visible = True : End If
  272. If TextBox51.Text <> "0" Then : TextBox51.Visible = True : End If : If TextBox52.Text <> "0" Then : TextBox52.Visible = True : End If
  273. If TextBox53.Text <> "0" Then : TextBox53.Visible = True : End If : If TextBox54.Text <> "0" Then : TextBox54.Visible = True : End If
  274. End Sub
  275. Private Sub Set_伏掛五行()
  276. NUM2(1) = 0 : NUM2(2) = 0 : NUM2(3) = 0 : NUM2(4) = 0 : NUM2(5) = 0 : NUM2(6) = 0
  277. For NUM1 = 1 To 6
  278. Dim 條件11 As String = "(地支 = RIGHT('" & TextBox43.Text & "', 1))" : Dim 條件12 As String = "(地支 = RIGHT('" & TextBox44.Text & "', 1))"
  279. Dim 條件13 As String = "(地支 = RIGHT('" & TextBox45.Text & "', 1))" : Dim 條件14 As String = "(地支 = RIGHT('" & TextBox46.Text & "', 1))"
  280. Dim 條件15 As String = "(地支 = RIGHT('" & TextBox47.Text & "', 1))" : Dim 條件16 As String = "(地支 = RIGHT('" & TextBox48.Text & "', 1))"
  281. ConnOpen()
  282. If NUM1 = 1 And TextBox43.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件11 : NUM2(1) = 1 : End If
  283. If NUM1 = 2 And TextBox44.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件12 : NUM2(2) = 1 : End If
  284. If NUM1 = 3 And TextBox45.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件13 : NUM2(3) = 1 : End If
  285. If NUM1 = 4 And TextBox46.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件14 : NUM2(4) = 1 : End If
  286. If NUM1 = 5 And TextBox47.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件15 : NUM2(5) = 1 : End If
  287. If NUM1 = 6 And TextBox48.Text <> "0" Then : SQL1 = "SELECT 五行 FROM 地支五行 WHERE " & 條件16 : NUM2(6) = 1 : End If
  288. CmdSet_For_dr()
  289. If dr.Read() Then
  290. If NUM1 = 1 And NUM2(1) = 1 Then : TextBox55.Text = dr("五行").ToString : End If : If NUM1 = 2 And NUM2(2) = 1 Then : TextBox56.Text = dr("五行").ToString : End If
  291. If NUM1 = 3 And NUM2(3) = 1 Then : TextBox57.Text = dr("五行").ToString : End If : If NUM1 = 4 And NUM2(4) = 1 Then : TextBox58.Text = dr("五行").ToString : End If
  292. If NUM1 = 5 And NUM2(5) = 1 Then : TextBox59.Text = dr("五行").ToString : End If : If NUM1 = 6 And NUM2(6) = 1 Then : TextBox60.Text = dr("五行").ToString : End If
  293. End If
  294. conn.Close() : dr.Close()
  295. Next
  296. End Sub
  297. Private Sub Set_月建月破()
  298. If Label27.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox61.Text = "月建" : TextBox61.Visible = True : End If
  299. If Label28.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox67.Text = "月建" : TextBox67.Visible = True : End If
  300. If Label29.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox73.Text = "月建" : TextBox73.Visible = True : End If
  301. If Label30.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox79.Text = "月建" : TextBox79.Visible = True : End If
  302. If Label31.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox85.Text = "月建" : TextBox85.Visible = True : End If
  303. If Label32.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox91.Text = "月建" : TextBox91.Visible = True : End If
  304. For NUM1 = 1 To 6
  305. Dim 條件17 As String = "(地支對衝 = '" & Label27.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  306. Dim 條件18 As String = "(地支對衝 = '" & Label28.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  307. Dim 條件19 As String = "(地支對衝 = '" & Label29.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  308. Dim 條件20 As String = "(地支對衝 = '" & Label30.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  309. Dim 條件21 As String = "(地支對衝 = '" & Label31.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  310. Dim 條件22 As String = "(地支對衝 = '" & Label32.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  311. ConnOpen()
  312. If NUM1 = 1 And Label27.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  313. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件17 : CmdSet_For_dr()
  314. If dr.Read() Then
  315. If NUM1 = 1 Then : TextBox61.Text = dr("月破").ToString : TextBox61.Visible = True : End If
  316. End If
  317. End If
  318. If NUM1 = 2 And Label28.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  319. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件18 : CmdSet_For_dr()
  320. If dr.Read() Then
  321. If NUM1 = 2 Then : TextBox67.Text = dr("月破").ToString : TextBox67.Visible = True : End If
  322. End If
  323. End If
  324. If NUM1 = 3 And Label29.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  325. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件19 : CmdSet_For_dr()
  326. If dr.Read() Then
  327. If NUM1 = 3 Then : TextBox73.Text = dr("月破").ToString : TextBox73.Visible = True : End If
  328. End If
  329. End If
  330. If NUM1 = 4 And Label30.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  331. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件20 : CmdSet_For_dr()
  332. If dr.Read() Then
  333. If NUM1 = 4 Then : TextBox79.Text = dr("月破").ToString : TextBox79.Visible = True : End If
  334. End If
  335. End If
  336. If NUM1 = 5 And Label31.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  337. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件21 : CmdSet_For_dr()
  338. If dr.Read() Then
  339. If NUM1 = 5 Then : TextBox85.Text = dr("月破").ToString : TextBox85.Visible = True : End If
  340. End If
  341. End If
  342. If NUM1 = 6 And Label32.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then
  343. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件22 : CmdSet_For_dr()
  344. If dr.Read() Then
  345. If NUM1 = 6 Then : TextBox91.Text = dr("月破").ToString : TextBox91.Visible = True : End If
  346. End If
  347. End If
  348. conn.Close() : dr.Close()
  349. Next
  350. End Sub
  351. Private Sub Set_旬空()
  352. If Label27.Text = TextBox97.Text Then : TextBox62.Text = "旬空" : TextBox62.Visible = True : Else
  353. If Label27.Text = TextBox98.Text Then : TextBox62.Text = "旬空" : TextBox62.Visible = True : End If : End If
  354. If Label28.Text = TextBox97.Text Then : TextBox68.Text = "旬空" : TextBox68.Visible = True : Else
  355. If Label28.Text = TextBox98.Text Then : TextBox68.Text = "旬空" : TextBox68.Visible = True : End If : End If
  356. If Label29.Text = TextBox97.Text Then : TextBox74.Text = "旬空" : TextBox74.Visible = True : Else
  357. If Label29.Text = TextBox98.Text Then : TextBox74.Text = "旬空" : TextBox74.Visible = True : End If : End If
  358. If Label30.Text = TextBox97.Text Then : TextBox80.Text = "旬空" : TextBox80.Visible = True : Else
  359. If Label30.Text = TextBox98.Text Then : TextBox80.Text = "旬空" : TextBox80.Visible = True : End If : End If
  360. If Label31.Text = TextBox97.Text Then : TextBox86.Text = "旬空" : TextBox86.Visible = True : Else
  361. If Label31.Text = TextBox98.Text Then : TextBox86.Text = "旬空" : TextBox86.Visible = True : End If : End If
  362. If Label32.Text = TextBox97.Text Then : TextBox92.Text = "旬空" : TextBox92.Visible = True : Else
  363. If Label32.Text = TextBox98.Text Then : TextBox92.Text = "旬空" : TextBox92.Visible = True : End If : End If
  364. End Sub
  365. Private Sub Set_日建日沖()
  366. If Label27.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox63.Text = "日建" : TextBox63.Visible = True : End If
  367. If Label28.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox69.Text = "日建" : TextBox69.Visible = True : End If
  368. If Label29.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox75.Text = "日建" : TextBox75.Visible = True : End If
  369. If Label30.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox81.Text = "日建" : TextBox81.Visible = True : End If
  370. If Label31.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox87.Text = "日建" : TextBox87.Visible = True : End If
  371. If Label32.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox93.Text = "日建" : TextBox93.Visible = True : End If
  372. For NUM1 = 1 To 6
  373. Dim 條件23 As String = "(地支對衝 = '" & Label27.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  374. Dim 條件24 As String = "(地支對衝 = '" & Label28.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  375. Dim 條件25 As String = "(地支對衝 = '" & Label29.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  376. Dim 條件26 As String = "(地支對衝 = '" & Label30.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  377. Dim 條件27 As String = "(地支對衝 = '" & Label31.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  378. Dim 條件28 As String = "(地支對衝 = '" & Label32.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  379. ConnOpen()
  380. If NUM1 = 1 And Label27.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件23 : End If
  381. If NUM1 = 2 And Label28.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件24 : End If
  382. If NUM1 = 3 And Label29.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件25 : End If
  383. If NUM1 = 4 And Label30.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件26 : End If
  384. If NUM1 = 5 And Label31.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件27 : End If
  385. If NUM1 = 6 And Label32.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件28 : End If
  386. CmdSet_For_dr()
  387. If dr.Read() Then
  388. If NUM1 = 1 Then : TextBox63.Text = dr("日衝").ToString : TextBox63.Visible = True : End If
  389. If NUM1 = 2 Then : TextBox69.Text = dr("日衝").ToString : TextBox69.Visible = True : End If
  390. If NUM1 = 3 Then : TextBox75.Text = dr("日衝").ToString : TextBox75.Visible = True : End If
  391. If NUM1 = 4 Then : TextBox81.Text = dr("日衝").ToString : TextBox81.Visible = True : End If
  392. If NUM1 = 5 Then : TextBox87.Text = dr("日衝").ToString : TextBox87.Visible = True : End If
  393. If NUM1 = 6 Then : TextBox93.Text = dr("日衝").ToString : TextBox93.Visible = True : End If
  394. End If
  395. conn.Close() : dr.Close()
  396. Next
  397. End Sub
  398. Private Sub Set_伏卦月建月破()
  399. If TextBox43.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox64.Text = "月建" : TextBox64.Visible = True : End If
  400. If TextBox44.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox70.Text = "月建" : TextBox70.Visible = True : End If
  401. If TextBox45.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox76.Text = "月建" : TextBox76.Visible = True : End If
  402. If TextBox46.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox82.Text = "月建" : TextBox82.Visible = True : End If
  403. If TextBox47.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox88.Text = "月建" : TextBox88.Visible = True : End If
  404. If TextBox48.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox94.Text = "月建" : TextBox94.Visible = True : End If
  405. For NUM1 = 1 To 6
  406. Dim 條件29 As String = "(地支對衝 = '" & TextBox43.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  407. Dim 條件30 As String = "(地支對衝 = '" & TextBox44.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  408. Dim 條件31 As String = "(地支對衝 = '" & TextBox45.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  409. Dim 條件32 As String = "(地支對衝 = '" & TextBox46.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  410. Dim 條件33 As String = "(地支對衝 = '" & TextBox47.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  411. Dim 條件34 As String = "(地支對衝 = '" & TextBox48.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  412. ConnOpen()
  413. If NUM1 = 1 And TextBox43.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件29 : End If
  414. If NUM1 = 2 And TextBox44.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件30 : End If
  415. If NUM1 = 3 And TextBox45.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件31 : End If
  416. If NUM1 = 4 And TextBox46.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件32 : End If
  417. If NUM1 = 5 And TextBox47.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件33 : End If
  418. If NUM1 = 6 And TextBox48.Text <> Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : SQL1 = "SELECT 月破 FROM 日月衝破 WHERE " & 條件34 : End If
  419. CmdSet_For_dr()
  420. If dr.Read() Then
  421. If NUM1 = 1 Then : TextBox64.Text = dr("月破").ToString : TextBox64.Visible = True : End If
  422. If NUM1 = 2 Then : TextBox70.Text = dr("月破").ToString : TextBox70.Visible = True : End If
  423. If NUM1 = 3 Then : TextBox76.Text = dr("月破").ToString : TextBox76.Visible = True : End If
  424. If NUM1 = 4 Then : TextBox82.Text = dr("月破").ToString : TextBox82.Visible = True : End If
  425. If NUM1 = 5 Then : TextBox88.Text = dr("月破").ToString : TextBox88.Visible = True : End If
  426. If NUM1 = 6 Then : TextBox94.Text = dr("月破").ToString : TextBox94.Visible = True : End If
  427. End If
  428. conn.Close() : dr.Close()
  429. Next
  430. End Sub
  431. Private Sub Set_伏卦旬空()
  432. If TextBox43.Text = TextBox97.Text Then : TextBox65.Text = "旬空" : TextBox65.Visible = True : Else
  433. If TextBox43.Text = TextBox98.Text Then : TextBox65.Text = "旬空" : TextBox65.Visible = True : End If : End If
  434. If TextBox44.Text = TextBox97.Text Then : TextBox71.Text = "旬空" : TextBox71.Visible = True : Else
  435. If TextBox44.Text = TextBox98.Text Then : TextBox71.Text = "旬空" : TextBox71.Visible = True : End If : End If
  436. If TextBox45.Text = TextBox97.Text Then : TextBox77.Text = "旬空" : TextBox77.Visible = True : Else
  437. If TextBox45.Text = TextBox98.Text Then : TextBox77.Text = "旬空" : TextBox77.Visible = True : End If : End If
  438. If TextBox46.Text = TextBox97.Text Then : TextBox83.Text = "旬空" : TextBox83.Visible = True : Else
  439. If TextBox46.Text = TextBox98.Text Then : TextBox83.Text = "旬空" : TextBox83.Visible = True : End If : End If
  440. If TextBox47.Text = TextBox97.Text Then : TextBox89.Text = "旬空" : TextBox89.Visible = True : Else
  441. If TextBox47.Text = TextBox98.Text Then : TextBox89.Text = "旬空" : TextBox89.Visible = True : End If : End If
  442. If TextBox48.Text = TextBox97.Text Then : TextBox95.Text = "旬空" : TextBox95.Visible = True : Else
  443. If TextBox48.Text = TextBox98.Text Then : TextBox95.Text = "旬空" : TextBox95.Visible = True : End If : End If
  444. End Sub
  445. Private Sub Set_伏卦日建日沖()
  446. If TextBox43.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox66.Text = "日建" : TextBox66.Visible = True : End If
  447. If TextBox44.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox72.Text = "日建" : TextBox72.Visible = True : End If
  448. If TextBox45.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox78.Text = "日建" : TextBox78.Visible = True : End If
  449. If TextBox46.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox84.Text = "日建" : TextBox84.Visible = True : End If
  450. If TextBox47.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox90.Text = "日建" : TextBox90.Visible = True : End If
  451. If TextBox48.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox96.Text = "日建" : TextBox96.Visible = True : End If
  452. For NUM1 = 1 To 6
  453. Dim 條件35 As String = "(地支對衝 = '" & TextBox43.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  454. Dim 條件36 As String = "(地支對衝 = '" & TextBox44.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  455. Dim 條件37 As String = "(地支對衝 = '" & TextBox45.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  456. Dim 條件38 As String = "(地支對衝 = '" & TextBox46.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  457. Dim 條件39 As String = "(地支對衝 = '" & TextBox47.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  458. Dim 條件40 As String = "(地支對衝 = '" & TextBox48.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  459. ConnOpen()
  460. If NUM1 = 1 And TextBox43.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件35 : End If
  461. If NUM1 = 2 And TextBox44.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件36 : End If
  462. If NUM1 = 3 And TextBox45.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件37 : End If
  463. If NUM1 = 4 And TextBox46.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件38 : End If
  464. If NUM1 = 5 And TextBox47.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件39 : End If
  465. If NUM1 = 6 And TextBox48.Text <> Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE " & 條件40 : End If
  466. CmdSet_For_dr()
  467. If dr.Read() Then
  468. If NUM1 = 1 Then : TextBox66.Text = dr("日衝").ToString : TextBox66.Visible = True : End If
  469. If NUM1 = 2 Then : TextBox72.Text = dr("日衝").ToString : TextBox72.Visible = True : End If
  470. If NUM1 = 3 Then : TextBox78.Text = dr("日衝").ToString : TextBox78.Visible = True : End If
  471. If NUM1 = 4 Then : TextBox84.Text = dr("日衝").ToString : TextBox84.Visible = True : End If
  472. If NUM1 = 5 Then : TextBox90.Text = dr("日衝").ToString : TextBox90.Visible = True : End If
  473. If NUM1 = 6 Then : TextBox96.Text = dr("日衝").ToString : TextBox96.Visible = True : End If
  474. End If
  475. conn.Close() : dr.Close()
  476. Next
  477. End Sub
  478. Private Sub Set_化卦內容()
  479. If ComboBox1.Text = "O" Or ComboBox1.Text = "X" Then : Label40.Visible = True
  480. TextBox102.Visible = True
  481. If TextBox102.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox114.Text = "月建" : TextBox114.Visible = True : Else
  482. ConnOpen()
  483. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox102.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  484. CmdSet_For_dr()
  485. If dr.Read() Then : TextBox114.Text = dr("月破").ToString : TextBox114.Visible = True : End If : conn.Close() : dr.Close() : End If
  486. If TextBox102.Text = TextBox97.Text Then : TextBox120.Text = "旬空" : TextBox120.Visible = True : Else
  487. If TextBox102.Text = TextBox98.Text Then : TextBox120.Text = "旬空" : TextBox120.Visible = True : End If : End If
  488. If TextBox102.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox126.Text = "日建" : TextBox126.Visible = True : Else
  489. ConnOpen()
  490. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox102.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  491. CmdSet_For_dr()
  492. If dr.Read() Then : TextBox126.Text = dr("日衝").ToString : TextBox126.Visible = True : End If : conn.Close() : dr.Close() : End If
  493. ConnOpen()
  494. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox102.Text & "', 1))"
  495. CmdSet_For_dr() : If dr.Read() Then : TextBox133.Text = dr("五行").ToString
  496. TextBox133.Visible = True : End If : conn.Close() : dr.Close()
  497. ConnOpen()
  498. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  499. CmdSet_For_dr()
  500. If dr.Read() Then
  501. If TextBox133.Text = "水" Then : TextBox108.Text = dr("水").ToString : End If : If TextBox133.Text = "火" Then : TextBox108.Text = dr("火").ToString : End If
  502. If TextBox133.Text = "木" Then : TextBox108.Text = dr("木").ToString : End If : If TextBox133.Text = "金" Then : TextBox108.Text = dr("金").ToString : End If
  503. If TextBox133.Text = "土" Then : TextBox108.Text = dr("土").ToString : End If
  504. End If
  505. conn.Close() : dr.Close() : TextBox108.Visible = True
  506. End If
  507. If ComboBox2.Text = "O" Or ComboBox2.Text = "X" Then : Label41.Visible = True
  508. TextBox103.Visible = True
  509. If TextBox103.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox115.Text = "月建" : TextBox115.Visible = True : Else
  510. ConnOpen()
  511. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox103.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  512. CmdSet_For_dr()
  513. If dr.Read() Then : TextBox115.Text = dr("月破").ToString : TextBox115.Visible = True : End If : conn.Close() : dr.Close() : End If
  514. If TextBox103.Text = TextBox97.Text Then : TextBox121.Text = "旬空" : TextBox121.Visible = True : Else
  515. If TextBox103.Text = TextBox98.Text Then : TextBox121.Text = "旬空" : TextBox121.Visible = True : End If : End If
  516. If TextBox103.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox127.Text = "日建" : TextBox127.Visible = True : Else
  517. ConnOpen()
  518. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox103.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  519. CmdSet_For_dr()
  520. If dr.Read() Then : TextBox127.Text = dr("日衝").ToString : TextBox127.Visible = True : End If : conn.Close() : dr.Close() : End If
  521. ConnOpen()
  522. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox103.Text & "', 1))"
  523. CmdSet_For_dr() : If dr.Read() Then : TextBox134.Text = dr("五行").ToString
  524. TextBox134.Visible = True : End If : conn.Close() : dr.Close()
  525. ConnOpen()
  526. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  527. CmdSet_For_dr()
  528. If dr.Read() Then
  529. If TextBox134.Text = "水" Then : TextBox109.Text = dr("水").ToString : End If : If TextBox134.Text = "火" Then : TextBox109.Text = dr("火").ToString : End If
  530. If TextBox134.Text = "木" Then : TextBox109.Text = dr("木").ToString : End If : If TextBox134.Text = "金" Then : TextBox109.Text = dr("金").ToString : End If
  531. If TextBox134.Text = "土" Then : TextBox109.Text = dr("土").ToString : End If
  532. End If
  533. conn.Close() : dr.Close() : TextBox109.Visible = True
  534. End If
  535. If ComboBox3.Text = "O" Or ComboBox3.Text = "X" Then : Label42.Visible = True
  536. TextBox104.Visible = True
  537. If TextBox104.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox116.Text = "月建" : TextBox116.Visible = True : Else
  538. ConnOpen()
  539. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox104.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  540. CmdSet_For_dr()
  541. If dr.Read() Then : TextBox116.Text = dr("月破").ToString : TextBox116.Visible = True : End If : conn.Close() : dr.Close() : End If
  542. If TextBox104.Text = TextBox97.Text Then : TextBox122.Text = "旬空" : TextBox122.Visible = True : Else
  543. If TextBox104.Text = TextBox98.Text Then : TextBox122.Text = "旬空" : TextBox122.Visible = True : End If : End If
  544. If TextBox104.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox128.Text = "日建" : TextBox128.Visible = True : Else
  545. ConnOpen()
  546. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox104.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  547. CmdSet_For_dr()
  548. If dr.Read() Then : TextBox128.Text = dr("日衝").ToString : TextBox128.Visible = True : End If : conn.Close() : dr.Close() : End If
  549. ConnOpen()
  550. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox104.Text & "', 1))"
  551. CmdSet_For_dr() : If dr.Read() Then : TextBox135.Text = dr("五行").ToString
  552. TextBox135.Visible = True : End If : conn.Close() : dr.Close()
  553. ConnOpen()
  554. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  555. CmdSet_For_dr()
  556. If dr.Read() Then
  557. If TextBox135.Text = "水" Then : TextBox110.Text = dr("水").ToString : End If : If TextBox135.Text = "火" Then : TextBox110.Text = dr("火").ToString : End If
  558. If TextBox135.Text = "木" Then : TextBox110.Text = dr("木").ToString : End If : If TextBox135.Text = "金" Then : TextBox110.Text = dr("金").ToString : End If
  559. If TextBox135.Text = "土" Then : TextBox110.Text = dr("土").ToString : End If
  560. End If
  561. conn.Close() : dr.Close() : TextBox110.Visible = True
  562. End If
  563. If ComboBox6.Text = "O" Or ComboBox6.Text = "X" Then : Label43.Visible = True
  564. TextBox105.Visible = True
  565. If TextBox105.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox117.Text = "月建" : TextBox117.Visible = True : Else
  566. ConnOpen()
  567. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox105.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  568. CmdSet_For_dr()
  569. If dr.Read() Then : TextBox117.Text = dr("月破").ToString : TextBox117.Visible = True : End If : conn.Close() : dr.Close() : End If
  570. If TextBox105.Text = TextBox97.Text Then : TextBox123.Text = "旬空" : TextBox123.Visible = True : Else
  571. If TextBox105.Text = TextBox98.Text Then : TextBox123.Text = "旬空" : TextBox123.Visible = True : End If : End If
  572. If TextBox105.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox129.Text = "日建" : TextBox129.Visible = True : Else
  573. ConnOpen()
  574. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox105.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  575. CmdSet_For_dr()
  576. If dr.Read() Then : TextBox129.Text = dr("日衝").ToString : TextBox129.Visible = True : End If : conn.Close() : dr.Close() : End If
  577. ConnOpen()
  578. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox105.Text & "', 1))"
  579. CmdSet_For_dr() : If dr.Read() Then : TextBox136.Text = dr("五行").ToString
  580. TextBox136.Visible = True : End If : conn.Close() : dr.Close()
  581. ConnOpen()
  582. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  583. CmdSet_For_dr()
  584. If dr.Read() Then
  585. If TextBox136.Text = "水" Then : TextBox111.Text = dr("水").ToString : End If : If TextBox136.Text = "火" Then : TextBox111.Text = dr("火").ToString : End If
  586. If TextBox136.Text = "木" Then : TextBox111.Text = dr("木").ToString : End If : If TextBox136.Text = "金" Then : TextBox111.Text = dr("金").ToString : End If
  587. If TextBox136.Text = "土" Then : TextBox111.Text = dr("土").ToString : End If
  588. End If
  589. conn.Close() : dr.Close() : TextBox111.Visible = True
  590. End If
  591. If ComboBox7.Text = "O" Or ComboBox7.Text = "X" Then : Label44.Visible = True
  592. TextBox106.Visible = True
  593. If TextBox106.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox118.Text = "月建" : TextBox118.Visible = True : Else
  594. ConnOpen()
  595. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox106.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  596. CmdSet_For_dr()
  597. If dr.Read() Then : TextBox118.Text = dr("月破").ToString : TextBox118.Visible = True : End If : conn.Close() : dr.Close() : End If
  598. If TextBox106.Text = TextBox97.Text Then : TextBox124.Text = "旬空" : TextBox124.Visible = True : Else
  599. If TextBox106.Text = TextBox98.Text Then : TextBox124.Text = "旬空" : TextBox124.Visible = True : End If : End If
  600. If TextBox106.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox130.Text = "日建" : TextBox130.Visible = True : Else
  601. ConnOpen()
  602. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox106.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  603. CmdSet_For_dr()
  604. If dr.Read() Then : TextBox130.Text = dr("日衝").ToString : TextBox130.Visible = True : End If : conn.Close() : dr.Close() : End If
  605. ConnOpen()
  606. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox106.Text & "', 1))"
  607. CmdSet_For_dr() : If dr.Read() Then : TextBox137.Text = dr("五行").ToString
  608. TextBox137.Visible = True : End If : conn.Close() : dr.Close()
  609. ConnOpen()
  610. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  611. CmdSet_For_dr()
  612. If dr.Read() Then
  613. If TextBox137.Text = "水" Then : TextBox112.Text = dr("水").ToString : End If : If TextBox137.Text = "火" Then : TextBox112.Text = dr("火").ToString : End If
  614. If TextBox137.Text = "木" Then : TextBox112.Text = dr("木").ToString : End If : If TextBox137.Text = "金" Then : TextBox112.Text = dr("金").ToString : End If
  615. If TextBox137.Text = "土" Then : TextBox112.Text = dr("土").ToString : End If
  616. End If
  617. conn.Close() : dr.Close() : TextBox112.Visible = True
  618. End If
  619. If ComboBox8.Text = "O" Or ComboBox8.Text = "X" Then : Label45.Visible = True
  620. TextBox107.Visible = True
  621. If TextBox107.Text = Microsoft.VisualBasic.Right(TextBox2.Text, 1) Then : TextBox119.Text = "月建" : TextBox119.Visible = True : Else
  622. ConnOpen()
  623. SQL1 = "SELECT 月破 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox107.Text + Microsoft.VisualBasic.Right(TextBox2.Text, 1) & "')"
  624. CmdSet_For_dr()
  625. If dr.Read() Then : TextBox119.Text = dr("月破").ToString : TextBox119.Visible = True : End If : conn.Close() : dr.Close() : End If
  626. If TextBox107.Text = TextBox97.Text Then : TextBox125.Text = "旬空" : TextBox125.Visible = True : Else
  627. If TextBox107.Text = TextBox98.Text Then : TextBox125.Text = "旬空" : TextBox125.Visible = True : End If : End If
  628. If TextBox107.Text = Microsoft.VisualBasic.Right(TextBox4.Text, 1) Then : TextBox131.Text = "日建" : TextBox131.Visible = True : Else
  629. ConnOpen()
  630. SQL1 = "SELECT 日衝 FROM 日月衝破 WHERE (地支對衝 = '" & TextBox107.Text + Microsoft.VisualBasic.Right(TextBox4.Text, 1) & "')"
  631. CmdSet_For_dr()
  632. If dr.Read() Then : TextBox131.Text = dr("日衝").ToString : TextBox131.Visible = True : End If : conn.Close() : dr.Close() : End If
  633. ConnOpen()
  634. SQL1 = "SELECT 五行 FROM 地支五行 WHERE (地支 = RIGHT('" & TextBox107.Text & "', 1))"
  635. CmdSet_For_dr() : If dr.Read() Then : TextBox138.Text = dr("五行").ToString
  636. TextBox138.Visible = True : End If : conn.Close() : dr.Close()
  637. ConnOpen()
  638. SQL1 = "SELECT 水, 火, 木, 金, 土 FROM 化卦六親 WHERE (我 = '" & TextBox99.Text & "')"
  639. CmdSet_For_dr()
  640. If dr.Read() Then
  641. If TextBox138.Text = "水" Then : TextBox113.Text = dr("水").ToString : End If : If TextBox138.Text = "火" Then : TextBox113.Text = dr("火").ToString : End If
  642. If TextBox138.Text = "木" Then : TextBox113.Text = dr("木").ToString : End If : If TextBox138.Text = "金" Then : TextBox113.Text = dr("金").ToString : End If
  643. If TextBox138.Text = "土" Then : TextBox113.Text = dr("土").ToString : End If
  644. End If
  645. conn.Close() : dr.Close() : TextBox113.Visible = True
  646. End If
  647. End Sub
  648. Private Sub Set_周易經文()
  649. ConnOpen()
  650. SQL1 = "SELECT 經文, 篆曰, 象曰 FROM 周易本文 WHERE (卦名 = '" & TextBox24.Text & "')"
  651. CmdSet_For_dr()
  652. If dr.Read() Then
  653. TextBox169.Text = dr("經文").ToString : TextBox170.Text = dr("篆曰").ToString : TextBox171.Text = dr("象曰").ToString
  654. End If
  655. conn.Close() : dr.Close()
  656. For NUM1 = 1 To 6
  657. ConnOpen()
  658. SQL1 = "SELECT 本卦爻辭, 本卦爻象 FROM 卜筮化卦 WHERE (卦數 LIKE '%" & TextBox215.Text + TextBox214.Text & "' AND 爻數 = '" & NUM1 & "')"
  659. CmdSet_For_dr()
  660. If dr.Read() Then
  661. If NUM1 = 1 Then : TextBox174.Text = dr("本卦爻象").ToString : TextBox220.Text = dr("本卦爻辭").ToString : End If
  662. If NUM1 = 2 Then : TextBox175.Text = dr("本卦爻象").ToString : TextBox221.Text = dr("本卦爻辭").ToString : End If
  663. If NUM1 = 3 Then : TextBox176.Text = dr("本卦爻象").ToString : TextBox222.Text = dr("本卦爻辭").ToString : End If
  664. If NUM1 = 4 Then : TextBox177.Text = dr("本卦爻象").ToString : TextBox223.Text = dr("本卦爻辭").ToString : End If
  665. If NUM1 = 5 Then : TextBox218.Text = dr("本卦爻象").ToString : TextBox224.Text = dr("本卦爻辭").ToString : End If
  666. If NUM1 = 6 Then : TextBox219.Text = dr("本卦爻象").ToString : TextBox225.Text = dr("本卦爻辭").ToString : End If
  667. End If
  668. conn.Close() : dr.Close()
  669. Next
  670. For NUM1 = 1 To 6
  671. ConnOpen()
  672. SQL1 = "SELECT 本卦爻辭, 本卦爻象 FROM 卜筮化卦 WHERE (卦數 LIKE '%" & TextBox217.Text + TextBox216.Text & "' AND 爻數 = '" & NUM1 & "')"
  673. CmdSet_For_dr()
  674. If dr.Read() Then
  675. If NUM1 = 1 Then : TextBox234.Text = dr("本卦爻象").ToString : TextBox228.Text = dr("本卦爻辭").ToString : End If
  676. If NUM1 = 2 Then : TextBox235.Text = dr("本卦爻象").ToString : TextBox229.Text = dr("本卦爻辭").ToString : End If
  677. If NUM1 = 3 Then : TextBox236.Text = dr("本卦爻象").ToString : TextBox230.Text = dr("本卦爻辭").ToString : End If
  678. If NUM1 = 4 Then : TextBox237.Text = dr("本卦爻象").ToString : TextBox231.Text = dr("本卦爻辭").ToString : End If
  679. If NUM1 = 5 Then : TextBox238.Text = dr("本卦爻象").ToString : TextBox232.Text = dr("本卦爻辭").ToString : End If
  680. If NUM1 = 6 Then : TextBox239.Text = dr("本卦爻象").ToString : TextBox233.Text = dr("本卦爻辭").ToString : End If
  681. End If
  682. conn.Close() : dr.Close()
  683. Next
  684. End Sub
  685. Private Sub Set_焦氏易林()
  686. ConnOpen()
  687. SQL1 = "SELECT 易林 FROM 焦氏易林注 WHERE 主卦 LIKE '" & TextBox24.Text & "' AND 化卦 LIKE '" & TextBox100.Text & "' "
  688. CmdSet_For_dr()
  689. If dr.Read() Then
  690. TextBox240.Text = dr("易林").ToString
  691. End If
  692. conn.Close() : dr.Close()
  693. End Sub
  694. Private Sub Set_六沖六和()
  695. For NUM1 = 1 To 2
  696. Dim 條件41 As String = "(卦名 = '" & TextBox24.Text & "')" : Dim 條件42 As String = "(卦名 = '" & TextBox100.Text & "')"
  697. ConnOpen()
  698. If NUM1 = 1 Then : SQL1 = "SELECT 和衝 FROM 八卦六親 WHERE " & 條件41 : End If : If NUM1 = 2 Then : SQL1 = "SELECT 和衝 FROM 八卦六親 WHERE " & 條件42 : End If
  699. CmdSet_For_dr()
  700. If dr.Read() Then
  701. If NUM1 = 1 Then : TextBox226.Text = dr("和衝").ToString : End If : If NUM1 = 2 Then : TextBox227.Text = dr("和衝").ToString : End If
  702. End If
  703. conn.Close() : dr.Close()
  704. Next
  705. If TextBox226.Text <> "0" Then : TextBox226.Visible = True : End If
  706. If TextBox227.Text <> "0" Then : TextBox227.Visible = True : End If
  707. End Sub
  708. Private Sub Set_格式設定2()
  709. If Label27.Text = TextBox145.Text Then : TextBox184.Text = Label50.Text : Else
  710. If Label27.Text = TextBox146.Text Then : TextBox184.Text = Label51.Text : Else
  711. If Label27.Text = TextBox147.Text Then : TextBox184.Text = Label52.Text : Else
  712. If Label27.Text = TextBox148.Text Then : TextBox184.Text = Label61.Text : Else
  713. If Label27.Text = TextBox149.Text Then : TextBox184.Text = Label53.Text : Else
  714. If Label27.Text = TextBox150.Text Then : TextBox184.Text = Label56.Text : Else
  715. If Label27.Text = TextBox151.Text Then : TextBox184.Text = Label57.Text : Else
  716. If Label27.Text = TextBox152.Text Then : TextBox184.Text = Label58.Text : Else
  717. If Label27.Text = TextBox153.Text Then : TextBox184.Text = Label59.Text : Else
  718. If Label27.Text = TextBox154.Text Then : TextBox184.Text = Label60.Text : Else
  719. If Label27.Text = TextBox155.Text Then : TextBox184.Text = Label62.Text : Else
  720. If Label27.Text = TextBox156.Text Then : TextBox184.Text = Label63.Text
  721. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  722. If Label28.Text = TextBox145.Text Then : TextBox185.Text = Label50.Text : Else
  723. If Label28.Text = TextBox146.Text Then : TextBox185.Text = Label51.Text : Else
  724. If Label28.Text = TextBox147.Text Then : TextBox185.Text = Label52.Text : Else
  725. If Label28.Text = TextBox148.Text Then : TextBox185.Text = Label61.Text : Else
  726. If Label28.Text = TextBox149.Text Then : TextBox185.Text = Label53.Text : Else
  727. If Label28.Text = TextBox150.Text Then : TextBox185.Text = Label56.Text : Else
  728. If Label28.Text = TextBox151.Text Then : TextBox185.Text = Label57.Text : Else
  729. If Label28.Text = TextBox152.Text Then : TextBox185.Text = Label58.Text : Else
  730. If Label28.Text = TextBox153.Text Then : TextBox185.Text = Label59.Text : Else
  731. If Label28.Text = TextBox154.Text Then : TextBox185.Text = Label60.Text : Else
  732. If Label28.Text = TextBox155.Text Then : TextBox185.Text = Label62.Text : Else
  733. If Label28.Text = TextBox156.Text Then : TextBox185.Text = Label63.Text
  734. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  735. If Label29.Text = TextBox145.Text Then : TextBox186.Text = Label50.Text : Else
  736. If Label29.Text = TextBox146.Text Then : TextBox186.Text = Label51.Text : Else
  737. If Label29.Text = TextBox147.Text Then : TextBox186.Text = Label52.Text : Else
  738. If Label29.Text = TextBox148.Text Then : TextBox186.Text = Label61.Text : Else
  739. If Label29.Text = TextBox149.Text Then : TextBox186.Text = Label53.Text : Else
  740. If Label29.Text = TextBox150.Text Then : TextBox186.Text = Label56.Text : Else
  741. If Label29.Text = TextBox151.Text Then : TextBox186.Text = Label57.Text : Else
  742. If Label29.Text = TextBox152.Text Then : TextBox186.Text = Label58.Text : Else
  743. If Label29.Text = TextBox153.Text Then : TextBox186.Text = Label59.Text : Else
  744. If Label29.Text = TextBox154.Text Then : TextBox186.Text = Label60.Text : Else
  745. If Label29.Text = TextBox155.Text Then : TextBox186.Text = Label62.Text : Else
  746. If Label29.Text = TextBox156.Text Then : TextBox186.Text = Label63.Text
  747. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  748. If Label30.Text = TextBox145.Text Then : TextBox189.Text = Label50.Text : Else
  749. If Label30.Text = TextBox146.Text Then : TextBox189.Text = Label51.Text : Else
  750. If Label30.Text = TextBox147.Text Then : TextBox189.Text = Label52.Text : Else
  751. If Label30.Text = TextBox148.Text Then : TextBox189.Text = Label61.Text : Else
  752. If Label30.Text = TextBox149.Text Then : TextBox189.Text = Label53.Text : Else
  753. If Label30.Text = TextBox150.Text Then : TextBox189.Text = Label56.Text : Else
  754. If Label30.Text = TextBox151.Text Then : TextBox189.Text = Label57.Text : Else
  755. If Label30.Text = TextBox152.Text Then : TextBox189.Text = Label58.Text : Else
  756. If Label30.Text = TextBox153.Text Then : TextBox189.Text = Label59.Text : Else
  757. If Label30.Text = TextBox154.Text Then : TextBox189.Text = Label60.Text : Else
  758. If Label30.Text = TextBox155.Text Then : TextBox189.Text = Label62.Text : Else
  759. If Label30.Text = TextBox156.Text Then : TextBox189.Text = Label63.Text
  760. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  761. If Label31.Text = TextBox145.Text Then : TextBox191.Text = Label50.Text : Else
  762. If Label31.Text = TextBox146.Text Then : TextBox191.Text = Label51.Text : Else
  763. If Label31.Text = TextBox147.Text Then : TextBox191.Text = Label52.Text : Else
  764. If Label31.Text = TextBox148.Text Then : TextBox191.Text = Label61.Text : Else
  765. If Label31.Text = TextBox149.Text Then : TextBox191.Text = Label53.Text : Else
  766. If Label31.Text = TextBox150.Text Then : TextBox191.Text = Label56.Text : Else
  767. If Label31.Text = TextBox151.Text Then : TextBox191.Text = Label57.Text : Else
  768. If Label31.Text = TextBox152.Text Then : TextBox191.Text = Label58.Text : Else
  769. If Label31.Text = TextBox153.Text Then : TextBox191.Text = Label59.Text : Else
  770. If Label31.Text = TextBox154.Text Then : TextBox191.Text = Label60.Text : Else
  771. If Label31.Text = TextBox155.Text Then : TextBox191.Text = Label62.Text : Else
  772. If Label31.Text = TextBox156.Text Then : TextBox191.Text = Label63.Text
  773. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  774. If Label32.Text = TextBox145.Text Then : TextBox192.Text = Label50.Text : Else
  775. If Label32.Text = TextBox146.Text Then : TextBox192.Text = Label51.Text : Else
  776. If Label32.Text = TextBox147.Text Then : TextBox192.Text = Label52.Text : Else
  777. If Label32.Text = TextBox148.Text Then : TextBox192.Text = Label61.Text : Else
  778. If Label32.Text = TextBox149.Text Then : TextBox192.Text = Label53.Text : Else
  779. If Label32.Text = TextBox150.Text Then : TextBox192.Text = Label56.Text : Else
  780. If Label32.Text = TextBox151.Text Then : TextBox192.Text = Label57.Text : Else
  781. If Label32.Text = TextBox152.Text Then : TextBox192.Text = Label58.Text : Else
  782. If Label32.Text = TextBox153.Text Then : TextBox192.Text = Label59.Text : Else
  783. If Label32.Text = TextBox154.Text Then : TextBox192.Text = Label60.Text : Else
  784. If Label32.Text = TextBox155.Text Then : TextBox192.Text = Label62.Text : Else
  785. If Label32.Text = TextBox156.Text Then : TextBox192.Text = Label63.Text
  786. End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If : End If
  787. If TextBox102.Visible = True And TextBox102.Text = TextBox145.Text Then : TextBox193.Text = Label50.Text : TextBox193.Visible = True : Else
  788. If TextBox102.Visible = True And TextBox102.Text = TextBox153.Text Then : TextBox193.Text = Label59.Text : TextBox193.Visible = True : Else
  789. If TextBox102.Visible = True And TextBox102.Text = TextBox154.Text Then : TextBox193.Text = Label60.Text : TextBox193.Visible = True
  790. End If : End If : End If
  791. If TextBox103.Visible = True And TextBox103.Text = TextBox145.Text Then : TextBox194.Text = Label50.Text : TextBox194.Visible = True : Else
  792. If TextBox103.Visible = True And TextBox103.Text = TextBox153.Text Then : TextBox194.Text = Label59.Text : TextBox194.Visible = True : Else
  793. If TextBox103.Visible = True And TextBox103.Text = TextBox154.Text Then : TextBox194.Text = Label60.Text : TextBox194.Visible = True
  794. End If : End If : End If
  795. If TextBox104.Visible = True And TextBox104.Text = TextBox145.Text Then : TextBox195.Text = Label50.Text : TextBox195.Visible = True : Else
  796. If TextBox104.Visible = True And TextBox104.Text = TextBox153.Text Then : TextBox195.Text = Label59.Text : TextBox195.Visible = True : Else
  797. If TextBox104.Visible = True And TextBox104.Text = TextBox154.Text Then : TextBox195.Text = Label60.Text : TextBox195.Visible = True : Else
  798. End If : End If : End If
  799. If TextBox105.Visible = True And TextBox105.Text = TextBox145.Text Then : TextBox196.Text = Label50.Text : TextBox196.Visible = True : Else
  800. If TextBox105.Visible = True And TextBox105.Text = TextBox153.Text Then : TextBox196.Text = Label59.Text : TextBox196.Visible = True : Else
  801. If TextBox105.Visible = True And TextBox105.Text = TextBox154.Text Then : TextBox196.Text = Label60.Text : TextBox196.Visible = True : Else
  802. End If : End If : End If
  803. If TextBox106.Visible = True And TextBox106.Text = TextBox145.Text Then : TextBox197.Text = Label50.Text : TextBox197.Visible = True : Else
  804. If TextBox106.Visible = True And TextBox106.Text = TextBox153.Text Then : TextBox197.Text = Label59.Text : TextBox197.Visible = True : Else
  805. If TextBox106.Visible = True And TextBox106.Text = TextBox154.Text Then : TextBox197.Text = Label60.Text : TextBox197.Visible = True : Else
  806. End If : End If : End If
  807. If TextBox107.Visible = True And TextBox107.Text = TextBox145.Text Then : TextBox198.Text = Label50.Text : TextBox198.Visible = True : Else
  808. If TextBox107.Visible = True And TextBox107.Text = TextBox153.Text Then : TextBox198.Text = Label59.Text : TextBox198.Visible = True : Else
  809. If TextBox107.Visible = True And TextBox107.Text = TextBox154.Text Then : TextBox198.Text = Label60.Text : TextBox198.Visible = True : Else
  810. End If : End If : End If
  811. End Sub
  812. Private Sub Set_用原忌仇()
  813. ConnOpen()
  814. SQL1 = "SELECT 原神, 仇神, 忌神, 原神五行, 仇神五行, 忌神五行 FROM 用原仇忌 WHERE (用神 = '" & ComboBox5.Text + ComboBox4.Text & "')"
  815. CmdSet_For_dr()
  816. If dr.Read() Then
  817. TextBox139.Text = dr("原神").ToString : TextBox140.Text = dr("仇神").ToString : TextBox141.Text = dr("忌神").ToString
  818. TextBox142.Text = dr("原神五行").ToString : TextBox143.Text = dr("仇神五行").ToString : TextBox144.Text = dr("忌神五行").ToString
  819. End If
  820. conn.Close() : dr.Close()
  821. End Sub
  822. Private Sub Set_用神五行()
  823. If ComboBox5.Text = "火" Then
  824. TextBox157.Text = "寅" : TextBox158.Text = "卯" : TextBox159.Text = "辰" : TextBox160.Text = "巳" : TextBox161.Text = "午" : TextBox162.Text = "未"
  825. TextBox163.Text = "申" : TextBox164.Text = "酉" : TextBox165.Text = "戌" : TextBox166.Text = "亥" : TextBox167.Text = "子" : TextBox168.Text = "丑" : Else
  826. If ComboBox5.Text = "金" Then
  827. TextBox157.Text = "巳" : TextBox158.Text = "午" : TextBox159.Text = "未" : TextBox160.Text = "申" : TextBox161.Text = "酉" : TextBox162.Text = "戌"
  828. TextBox163.Text = "亥" : TextBox164.Text = "子" : TextBox165.Text = "丑" : TextBox166.Text = "寅" : TextBox167.Text = "卯" : TextBox168.Text = "辰" : Else
  829. If ComboBox5.Text = "水" Then
  830. TextBox157.Text = "申" : TextBox158.Text = "酉" : TextBox159.Text = "戌" : TextBox160.Text = "亥" : TextBox161.Text = "子" : TextBox162.Text = "丑"
  831. TextBox163.Text = "寅" : TextBox164.Text = "卯" : TextBox165.Text = "辰" : TextBox166.Text = "巳" : TextBox167.Text = "午" : TextBox168.Text = "未" : Else
  832. If ComboBox5.Text = "木" Then
  833. TextBox157.Text = "亥" : TextBox158.Text = "子" : TextBox159.Text = "丑" : TextBox160.Text = "寅" : TextBox161.Text = "卯" : TextBox162.Text = "辰"
  834. TextBox163.Text = "巳" : TextBox164.Text = "午" : TextBox165.Text = "未" : TextBox166.Text = "申" : TextBox167.Text = "酉" : TextBox168.Text = "戌" : Else
  835. If ComboBox5.Text = "土" Then
  836. TextBox157.Text = "申" : TextBox158.Text = "酉" : TextBox159.Text = "戌" : TextBox160.Text = "亥" : TextBox161.Text = "子" : TextBox162.Text = "丑"
  837. TextBox163.Text = "寅" : TextBox164.Text = "卯" : TextBox165.Text = "辰" : TextBox166.Text = "巳" : TextBox167.Text = "午" : TextBox168.Text = "未"
  838. End If : End If : End If : End If : End If
  839. End Sub
  840. Private Sub Set_貴人爻()
  841. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "甲" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "戊" Then : TextBox199.Text = " 丑未爻--即是日貴人" : End If
  842. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "乙" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "己" Then : TextBox199.Text = " 子申爻--即是日貴人" : End If
  843. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "丙" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "丁" Then : TextBox199.Text = " 酉亥爻--即是日貴人" : End If
  844. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "壬" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "癸" Then : TextBox199.Text = " 卯巳爻--即是日貴人" : End If
  845. If Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "庚" Or Microsoft.VisualBasic.Left(TextBox4.Text, 1) = "辛" Then : TextBox199.Text = " 午寅爻--即是日貴人" : End If
  846. End Sub
  847. Private Sub Set_紀錄清單()
  848. DataGridView1.DataSource = Nothing : ds.Clear()
  849. DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  850. DataGridView1.ColumnHeadersHeight = 25
  851. DataGridView1.AllowUserToAddRows = False
  852. ConnOpen()
  853. SQL1 = "SELECT 流水號, 日期, 初爻, 二爻, 三爻, 四爻, 五爻, 上爻, 用神, 五行, 占事者, 占事, 貴人, 三合, 三刑 FROM 卜卦記錄2 ORDER BY 流水號 DESC"
  854. CmdSet_For_DGV() : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
  855. End Sub
  856. Private Sub 卜卦_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  857. Me.WindowState = 2
  858. TextBox199.Text = "" : TextBox200.Text = "" : TextBox201.Text = ""
  859. DateTimePicker1.Value = Today
  860. Set_紀錄清單() : Set_萬年曆() : Set_萬年曆五行() : Set_相氣休囚() : Set_六獸() : Set_日長生() : Set_格式設定() : Set_grid()
  861. End Sub
  862. Private Sub 登入閒置控制_MouseMove(sender As Object, e As EventArgs) Handles MyBase.MouseMove
  863. timeNow = 0
  864. GCM_ERP_SYS.Timer1.Enabled = False
  865. GCM_ERP_SYS.Timer1.Enabled = True
  866. End Sub
  867. Private Sub 登入閒置控制_KeyPress(sender As Object, e As EventArgs) Handles MyBase.KeyPress
  868. timeNow = 0
  869. GCM_ERP_SYS.Timer1.Enabled = False
  870. GCM_ERP_SYS.Timer1.Enabled = True
  871. End Sub
  872. Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
  873. If e.RowIndex = -1 Then : Else
  874. TextBox182.Text = DataGridView1(0, e.RowIndex).Value.ToString : DateTimePicker1.Text = DataGridView1(1, e.RowIndex).Value.ToString
  875. ComboBox1.Text = DataGridView1(2, e.RowIndex).Value.ToString : ComboBox2.Text = DataGridView1(3, e.RowIndex).Value.ToString
  876. ComboBox3.Text = DataGridView1(4, e.RowIndex).Value.ToString : ComboBox6.Text = DataGridView1(5, e.RowIndex).Value.ToString
  877. ComboBox7.Text = DataGridView1(6, e.RowIndex).Value.ToString : ComboBox8.Text = DataGridView1(7, e.RowIndex).Value.ToString
  878. ComboBox4.Text = DataGridView1(8, e.RowIndex).Value.ToString : ComboBox5.Text = DataGridView1(9, e.RowIndex).Value.ToString
  879. TextBox183.Text = DataGridView1(10, e.RowIndex).Value.ToString : TextBox179.Text = DataGridView1(11, e.RowIndex).Value.ToString
  880. TextBox199.Text = DataGridView1(12, e.RowIndex).Value.ToString : TextBox200.Text = DataGridView1(13, e.RowIndex).Value.ToString
  881. TextBox201.Text = DataGridView1(14, e.RowIndex).Value.ToString
  882. Set_格式設定() : Set_萬年曆() : Set_萬年曆五行() : Set_相氣休囚() : Set_六獸() : Set_日長生()
  883. Set_取卦() : Set_排卦() : Set_掛名() : Set_掛地支五行() : Set_世應伏身() : Set_伏掛五行() : Set_月建月破() : Set_旬空() : Set_日建日沖() : Set_伏卦月建月破()
  884. Set_伏卦旬空() : Set_伏卦日建日沖() : Set_化卦內容() : Set_周易經文() : Set_六沖六和()
  885. Set_格式設定2() : Set_用原忌仇() : Set_用神五行() : Set_焦氏易林() : Set_貴人爻()
  886. End If
  887. End Sub
  888. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  889. Set_格式設定()
  890. If ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  891. MsgBox("請輸入卜筮卦數 。")
  892. Else
  893. Set_萬年曆() : Set_萬年曆五行() : Set_相氣休囚() : Set_六獸() : Set_日長生()
  894. Set_取卦() : Set_排卦() : Set_掛名() : Set_掛地支五行() : Set_世應伏身() : Set_伏掛五行() : Set_月建月破() : Set_旬空() : Set_日建日沖() : Set_伏卦月建月破() : Set_伏卦旬空()
  895. Set_伏卦日建日沖() : Set_化卦內容() : Set_周易經文() : Set_六沖六和() : Set_格式設定2() : Set_焦氏易林() : Set_貴人爻()
  896. End If
  897. End Sub
  898. Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  899. If DateTimePicker1.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox4.Text = "" Or
  900. ComboBox5.Text = "" Or TextBox179.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  901. MsgBox("請確認資料已輸入完整。")
  902. Else
  903. ConnOpen()
  904. SQL1 = "SELECT TOP (1) 流水號 FROM 卜卦記錄2 ORDER BY 流水號 DESC"
  905. CmdSet_For_dr()
  906. If dr.Read() Then : TextBox181.Text = dr("流水號").ToString : End If : conn.Close() : dr.Close()
  907. If TextBox181.Text = "" Then : TextBox181.Text = "0" : End If
  908. TextBox182.Text = CStr(Double.Parse(TextBox181.Text) + 1)
  909. ConnOpen()
  910. SQL1 = "INSERT INTO 卜卦記錄2 (流水號, 日期, 初爻, 二爻, 三爻, 四爻, 五爻, 上爻, 用神, 五行, 占事者, 占事, 貴人, 三合, 三刑) VALUES ('" & TextBox182.Text &
  911. "', '" & Format(DateTimePicker1.Value, "yyyy/MM/dd") & "','" & ComboBox1.Text & "','" & ComboBox2.Text & "','" & ComboBox3.Text & "','" & ComboBox6.Text &
  912. "','" & ComboBox7.Text & "','" & ComboBox8.Text & "','" & ComboBox4.Text & "','" & ComboBox5.Text & "','" & TextBox183.Text & "','" & TextBox179.Text &
  913. "','" & TextBox199.Text & "','" & TextBox201.Text & "','" & TextBox201.Text & "')"
  914. CmdSet_For_dr
  915. MsgBox("存檔完成")
  916. conn.Close()
  917. Set_紀錄清單() : Set_grid()
  918. End If
  919. End Sub
  920. Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  921. If DateTimePicker1.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox4.Text = "" Or ComboBox5.Text = "" Or
  922. TextBox179.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  923. MsgBox("請確已選擇歷史資料。")
  924. Else
  925. ConnOpen()
  926. SQL1 = "UPDATE 卜卦記錄2 SET 日期 = '" & Format(DateTimePicker1.Value, "yyyy/MM/dd") & "', 初爻 = '" & ComboBox1.Text & "', 二爻 = '" & ComboBox2.Text & "', 三爻 = '" &
  927. ComboBox3.Text & "', 四爻 = '" & ComboBox6.Text & "', 五爻 = '" & ComboBox7.Text & "', 上爻 = '" & ComboBox8.Text & "', 用神 = '" & ComboBox4.Text & "' , 五行 = '" &
  928. ComboBox5.Text & "' , 占事者 = '" & TextBox183.Text & "' , 占事 = '" & TextBox179.Text & "', 貴人 = '" & TextBox199.Text & "' , 三合 = '" & TextBox200.Text & "' , 三刑 = '" &
  929. TextBox201.Text & "' WHERE (流水號 = '" & TextBox182.Text & "')"
  930. CmdSet_For_dr
  931. MsgBox("修改完成")
  932. conn.Close()
  933. Set_紀錄清單() : Set_grid()
  934. End If
  935. End Sub
  936. Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  937. If DateTimePicker1.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox4.Text = "" Or ComboBox5.Text = "" Or
  938. TextBox179.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  939. MsgBox("請確已選擇歷史資料。")
  940. Else
  941. SQL1 = "DELETE FROM 卜卦記錄2 WHERE (流水號 = '" & TextBox182.Text & "')"
  942. cmd.CommandText = SQL : cmd.Connection = conn
  943. ConnOpen()
  944. Dim aa As MsgBoxResult
  945. aa = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
  946. If aa = MsgBoxResult.Ok Then : cmd.ExecuteNonQuery() : MsgBox("刪除完成") : End If
  947. conn.Close()
  948. Set_紀錄清單() : Set_grid()
  949. End If
  950. End Sub
  951. Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
  952. If DateTimePicker1.Text = "" Or ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox4.Text = "" Or ComboBox5.Text = "" Or
  953. TextBox179.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  954. MsgBox("請確已選擇歷史資料。")
  955. Else
  956. Set_格式設定() : Set_萬年曆() : Set_萬年曆五行() : Set_相氣休囚() : Set_六獸() : Set_日長生()
  957. If ComboBox1.Text = "" Or ComboBox2.Text = "" Or ComboBox3.Text = "" Or ComboBox6.Text = "" Or ComboBox7.Text = "" Or ComboBox8.Text = "" Then
  958. MsgBox("請輸入卜筮卦數 。")
  959. Else
  960. Set_取卦() : Set_排卦() : Set_掛名() : Set_掛地支五行() : Set_世應伏身() : Set_伏掛五行() : Set_月建月破() : Set_旬空() : Set_日建日沖() : Set_伏卦月建月破()
  961. Set_伏卦旬空() : Set_伏卦日建日沖() : Set_化卦內容() : Set_周易經文() : Set_六沖六和()
  962. End If
  963. If ComboBox4.Text = "" Or ComboBox5.Text = "" Then : MsgBox("請選擇用神、五行。") : Else : Set_用原忌仇() : Set_用神五行() : End If
  964. Set_格式設定2() : Set_焦氏易林()
  965. End If
  966. End Sub
  967. Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
  968. Set_格式設定()
  969. DateTimePicker1.Value = Today : ComboBox1.Text = "" : ComboBox2.Text = "" : ComboBox3.Text = ""
  970. TextBox24.Text = "" : TextBox99.Text = "" : TextBox100.Text = "" : TextBox101.Text = "" : TextBox139.Text = "" : TextBox140.Text = "" : TextBox141.Text = "" : TextBox142.Text = ""
  971. TextBox143.Text = "" : TextBox144.Text = "" : TextBox157.Text = "" : TextBox158.Text = "" : TextBox159.Text = "" : TextBox160.Text = "" : TextBox161.Text = "" : TextBox162.Text = ""
  972. TextBox163.Text = "" : TextBox164.Text = "" : TextBox165.Text = "" : TextBox166.Text = "" : TextBox167.Text = "" : TextBox168.Text = "" : TextBox169.Text = "" : TextBox170.Text = ""
  973. TextBox171.Text = "" : TextBox174.Text = "" : TextBox175.Text = "" : TextBox176.Text = "" : TextBox177.Text = "" : TextBox18.Text = "" : TextBox19.Text = ""
  974. TextBox20.Text = "" : TextBox21.Text = "" : TextBox22.Text = "" : TextBox23.Text = "" : TextBox12.Text = "" : TextBox13.Text = "" : TextBox14.Text = "" : TextBox15.Text = ""
  975. TextBox16.Text = "" : TextBox17.Text = "" : Label21.Text = " " : Label22.Text = " " : Label23.Text = " " : Label24.Text = " " : Label25.Text = " " : Label26.Text = " "
  976. Label27.Text = " " : Label28.Text = " " : Label29.Text = " " : Label30.Text = " " : Label31.Text = " " : Label32.Text = " " : ComboBox1.Text = "一" : ComboBox2.Text = "一"
  977. ComboBox3.Text = "一" : ComboBox6.Text = "一" : ComboBox7.Text = "一" : ComboBox8.Text = "一" : TextBox184.Text = "" : TextBox185.Text = "" : TextBox186.Text = "" : TextBox189.Text = ""
  978. TextBox191.Text = "" : TextBox192.Text = "" : TextBox199.Text = "" : TextBox200.Text = "" : TextBox201.Text = ""
  979. TextBox240.Text = "" : TextBox179.Text = "" : TextBox199.Text = ""
  980. TextBox175.Text = "" : TextBox176.Text = "" : TextBox177.Text = "" : TextBox218.Text = "" : TextBox219.Text = ""
  981. TextBox220.Text = "" : TextBox221.Text = "" : TextBox222.Text = "" : TextBox223.Text = "" : TextBox224.Text = "" : TextBox225.Text = ""
  982. TextBox228.Text = "" : TextBox229.Text = "" : TextBox230.Text = "" : TextBox231.Text = "" : TextBox232.Text = "" : TextBox233.Text = ""
  983. TextBox234.Text = "" : TextBox235.Text = "" : TextBox236.Text = "" : TextBox237.Text = "" : TextBox238.Text = "" : TextBox239.Text = ""
  984. Set_萬年曆() : Set_萬年曆五行() : Set_相氣休囚() : Set_六獸() : Set_日長生() : Set_grid()
  985. End Sub
  986. Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
  987. Set_紀錄清單() : Set_grid()
  988. End Sub
  989. Private Sub RadioButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.Click
  990. RadioButton1.Checked = True : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False : RadioButton5.Checked = False
  991. End Sub
  992. Private Sub RadioButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.Click
  993. RadioButton1.Checked = False : RadioButton2.Checked = True : RadioButton3.Checked = False : RadioButton4.Checked = False : RadioButton5.Checked = False
  994. End Sub
  995. Private Sub RadioButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.Click
  996. RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = True : RadioButton4.Checked = False : RadioButton5.Checked = False
  997. End Sub
  998. Private Sub RadioButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.Click
  999. RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = True : RadioButton5.Checked = False
  1000. End Sub
  1001. Private Sub RadioButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.Click
  1002. RadioButton1.Checked = False : RadioButton2.Checked = False : RadioButton3.Checked = False : RadioButton4.Checked = False : RadioButton5.Checked = True
  1003. End Sub
  1004. Private Sub RadioButton10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton10.Click
  1005. RadioButton10.Checked = True : RadioButton9.Checked = False : RadioButton8.Checked = False : RadioButton7.Checked = False : RadioButton6.Checked = False
  1006. End Sub
  1007. Private Sub RadioButton9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton9.Click
  1008. RadioButton10.Checked = False : RadioButton9.Checked = True : RadioButton8.Checked = False : RadioButton7.Checked = False : RadioButton6.Checked = False
  1009. End Sub
  1010. Private Sub RadioButton8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton8.Click
  1011. RadioButton10.Checked = False : RadioButton9.Checked = False : RadioButton8.Checked = True : RadioButton7.Checked = False : RadioButton6.Checked = False
  1012. End Sub
  1013. Private Sub RadioButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton7.Click
  1014. RadioButton10.Checked = False : RadioButton9.Checked = False : RadioButton8.Checked = False : RadioButton7.Checked = True : RadioButton6.Checked = False
  1015. End Sub
  1016. Private Sub RadioButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.Click
  1017. RadioButton10.Checked = False : RadioButton9.Checked = False : RadioButton8.Checked = False : RadioButton7.Checked = False : RadioButton6.Checked = True
  1018. End Sub
  1019. Private Sub Label9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label9.Click
  1020. If Label9.Text = "青龍" Then : 青龍() : Else : If Label9.Text = "朱雀" Then : 朱雀() : Else : If Label9.Text = "勾陳" Then : 勾陳() : Else : If Label9.Text = "騰蛇" Then : 騰蛇()
  1021. Else : If Label9.Text = "白虎" Then : 白虎() : Else : If Label9.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1022. End Sub
  1023. Private Sub Label10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label10.Click
  1024. If Label10.Text = "青龍" Then : 青龍() : Else : If Label10.Text = "朱雀" Then : 朱雀() : Else : If Label10.Text = "勾陳" Then : 勾陳() : Else : If Label10.Text = "騰蛇" Then : 騰蛇()
  1025. Else : If Label10.Text = "白虎" Then : 白虎() : Else : If Label10.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1026. End Sub
  1027. Private Sub Label11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label11.Click
  1028. If Label11.Text = "青龍" Then : 青龍() : Else : If Label11.Text = "朱雀" Then : 朱雀() : Else : If Label11.Text = "勾陳" Then : 勾陳() : Else : If Label11.Text = "騰蛇" Then : 騰蛇()
  1029. Else : If Label11.Text = "白虎" Then : 白虎() : Else : If Label11.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1030. End Sub
  1031. Private Sub Label12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label12.Click
  1032. If Label12.Text = "青龍" Then : 青龍() : Else : If Label12.Text = "朱雀" Then : 朱雀() : Else : If Label12.Text = "勾陳" Then : 勾陳() : Else : If Label12.Text = "騰蛇" Then : 騰蛇()
  1033. Else : If Label12.Text = "白虎" Then : 白虎() : Else : If Label12.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1034. End Sub
  1035. Private Sub Label13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label13.Click
  1036. If Label13.Text = "青龍" Then : 青龍() : Else : If Label13.Text = "朱雀" Then : 朱雀() : Else : If Label13.Text = "勾陳" Then : 勾陳() : Else : If Label13.Text = "騰蛇" Then : 騰蛇()
  1037. Else : If Label13.Text = "白虎" Then : 白虎() : Else : If Label13.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1038. End Sub
  1039. Private Sub Label14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label14.Click
  1040. If Label14.Text = "青龍" Then : 青龍() : Else : If Label14.Text = "朱雀" Then : 朱雀() : Else : If Label14.Text = "勾陳" Then : 勾陳() : Else : If Label14.Text = "騰蛇" Then : 騰蛇()
  1041. Else : If Label14.Text = "白虎" Then : 白虎() : Else : If Label14.Text = "玄武" Then : 玄武() : End If : End If : End If : End If : End If : End If
  1042. End Sub
  1043. Private Sub 青龍()
  1044. MsgBox("發動青龍附用通,進財進祿福無窮,臨仇遇忌都無益,酒色成災在此中。")
  1045. End Sub
  1046. Private Sub 朱雀()
  1047. MsgBox("朱雀交重文印旺,煞神相併漫勞功,是非口舌皆因此,動出生身卻利公。")
  1048. End Sub
  1049. Private Sub 勾陳()
  1050. MsgBox("勾陳發動優田土,累歲迍邅為忌逢,生用有情方是吉,若然安靜不迷蒙。")
  1051. End Sub
  1052. Private Sub 騰蛇()
  1053. MsgBox("騰蛇鬼剋憂縈粹,怪夢陰魔暗裡攻,持木落空休道吉,逢沖之日莫逃凶。")
  1054. End Sub
  1055. Private Sub 白虎()
  1056. MsgBox("白虎交重喪惡事,官司病患必成凶,持金動剋妨人口,遇火生身便不同。")
  1057. End Sub
  1058. Private Sub 玄武()
  1059. MsgBox("玄武動搖多暗昧,若臨官鬼賊交攻,有情生世邪無犯,仇忌臨之姦盜凶。")
  1060. End Sub
  1061. Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
  1062. MsgBox("凡卦中旺相之爻,倘被日辰及動爻克制,目下貪榮得令,過時仍受其毒,此旺相者暫時之用也。凡卦中休囚之爻,如得日辰及動爻生扶,目下雖不能逞志,遇時仍然得意,此休囚者待時之用也。")
  1063. End Sub
  1064. Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
  1065. MsgBox("《黃金策》事阻隔兮間發,謂此兩爻,居世應之中,動阻兩家之事,使彼此不能相通也,世應中間兩間爻發動,則所求多阻隔。《增刪卜易》世為己,應為人,彼此欲相親者,若遇間 _爻發動,不" &
  1066. "可概以阻隔斷之,若得動而生合世應,反得此輩之力。近世爻者,幫我之人也。近應爻者,扶彼之人也。生我者,我當親之;剋我者,我宜遠之。獨忌剋乎世應,事必難成。剋我者,壞我之事,我" &
  1067. "被其愚;剋應者,壞彼之事,他為所誘。")
  1068. End Sub
  1069. Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
  1070. MsgBox("凡卦中月破之爻,乃關因之所現也。動者亦能生剋他爻,變者亦能生剋本爻。目下雖破,出月不破! 今日雖破,值日不破矣! 月破最喜逢合填實,遠應年月,近應日時。如破而安靜,再值旬空衰" &
  1071. "弱,遇動爻、月建、日辰剋害,此等月破,謂之真破,到比破矣!")
  1072. End Sub
  1073. Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
  1074. MsgBox("凡卦中遇旬空,乃神蹟發現於此也。如旺相旬空、或休囚發動、日辰生扶、爻動生扶、爻動變空、伏而旺相,此等旬空到底有用,不過待其出旬之日。有合空、沖起、充實、填補之法,後捲占驗" &
  1075. "注明。如休囚安靜、或日辰剋、動爻剋、伏而被剋、靜逢月破,值此等旬空者,謂之真空,到底空矣!")
  1076. End Sub
  1077. Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
  1078. MsgBox("原用二神局則吉,忌仇二構局則凶。成局者結黨也,卦中動爻雖敢制之,如三爻齊發合成用神局,必有一爻用神;合成原神局,必有一爻原神;合成仇忌局,必有一爻仇忌,宗其一爻有病關因者" &
  1079. "斷之。或遇日沖者,曰暗動(此言靜而日沖),曰實(此言動而逢空,日辰沖也),曰破(此言月建沖也),但其沖破也,必待相合之期至,而應事之吉凶。如一爻靜二爻發者,待一爻靜者值日應事。" &
  1080. "如一爻靜而逢空、或動而逢空者、或化而逢空者,待其出空之期應事之吉凶。如空而逢合、靜而逢合、動而逢合者,必待沖期至而應事之吉凶;如自化合或與日合,如自化墓或墓于日者,必待其" &
  1081. "沖(此言三爻齊發,二爻無病,至自化者言也),如自化絕或絕于日者,必待其生(亦指一爻有病者而言也)。")
  1082. End Sub
  1083. Private Sub Label48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label48.Click
  1084. MsgBox("如卦中仇神發動,則原神被傷,用神無根,忌神倍力,其禍可勝道耶。")
  1085. End Sub
  1086. Private Sub Label49_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label49.Click
  1087. MsgBox("看卦先須看忌神,忌神宜靜不宜興,忌神急要逢傷剋,若遇生扶用受刑。---如忌神動來剋用,而用爻出現不空,則受剋也。倘卦中又動出一爻原神生用,則忌神反生原神,是名貪生忘剋,則用" &
  1088. "神根蒂深固,其吉更倍矣。如忌神獨發而用爻旬空,謂之避空,如伏藏不現,謂之避凶。如月建日辰生用謂之得救,如是等仍為吉兆,夫亦何嫌何疑哉。如忌神變回頭之剋,或日辰月建沖剋之," &
  1089. "謂之賊欲害我是賊先受害也,我又何傷。如日辰月建生扶忌神,或忌神疊疊剋用,即使用神蔽空伏藏者,至出空出透時便受其毒,難免其災也。")
  1090. End Sub
  1091. Private Sub Label47_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label47.Click
  1092. MsgBox("原神發動志揚揚,用扶藏兮也不妨,需要生扶兼旺相,最嫌化剋及逢傷。---如用神旬空、月破、衰弱或伏藏不現,得原神動來生之,或日辰月建作原神生之,必待用神出旬出破得令值日,所求必" &
  1093. "遂矣。如用神旺相,原神休囚不動,或動而變墓、變絕、變剋、變破、變退,或被日辰月建剋制,皆不能生用,是用神根蒂被傷矣,不唯無益,而反有損也。")
  1094. End Sub
  1095. Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click
  1096. MsgBox("問卦先須看日辰,日辰剋用不甚親,日辰與用相生合,作事何愁不趁心。")
  1097. End Sub
  1098. Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
  1099. MsgBox("易爻不妄成,神爻豈亂發。體象或既成,無者型憂色。使須論用神,次必看原神。三合會用吉,祿馬最為良。爻動始為定,次者論空亡。六沖主沖併,刑剋具主傷。世應俱發動,必然有改張。" &
  1100. "龍動家有喜,虎動主有喪。勾陳朱雀動,田土與文章。財動憂尊長,父動損兒郎。子動男人滯,兄動女人殃。出行宜世動,歸魂不出疆。用動值三合,行人立回莊。占宅財龍旺,豪富冠一鄉。" &
  1101. "父母爻興旺,為官至侯王。福神若持世,官頌定無妨。勾陳剋玄武,補賊不須忙。父病嫌財殺,財興母不長。無鬼病難療,鬼旺主發狂。請看考鬼歷,禱謝得安康。占婚兼剋用,占產看陰陽。" &
  1102. "若要問風水,三四世吉昌。長生墓絕決,卦卦要審祥。萬千言不盡,略舉其大綱。分別各有類,無務不包藏。")
  1103. End Sub
  1104. Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
  1105. If CheckBox1.Checked = True Then : MsgBox("世爻旺相最為強,做事亨通大吉昌,謀望諸般皆遂意,用神生合妙難量,旬空月破逢非吉,剋害刑沖遇不良。") : End If
  1106. If RadioButton1.Checked = False And RadioButton2.Checked = False And RadioButton3.Checked = False And RadioButton4.Checked = False And RadioButton5.Checked = False Then
  1107. MsgBox("請選擇持世之六親") : Else
  1108. If RadioButton1.Checked = True And RadioButton2.Checked = False And RadioButton3.Checked = False And RadioButton4.Checked = False And RadioButton5.Checked = False Then
  1109. MsgBox("父母持世主身勞,求嗣妾眾也難招,官動財旺宜赴試,財搖謀利莫心焦,占身財動無賢婦,又恐區區壽不高。") : Else
  1110. If RadioButton1.Checked = False And RadioButton2.Checked = True And RadioButton3.Checked = False And RadioButton4.Checked = False And RadioButton5.Checked = False Then
  1111. MsgBox("子身持世事無憂,求名切忌坐當頭,避亂許安失可得,官頌從今了便休,有生無剋諸般吉,有剋無生反見愁。") : Else
  1112. If RadioButton1.Checked = False And RadioButton2.Checked = False And RadioButton3.Checked = True And RadioButton4.Checked = False And RadioButton5.Checked = False Then
  1113. MsgBox("鬼爻持世事難安,占身不病也遭官,財物時時憂失脫,功名最喜世當權,入墓愁疑無散日,逢沖轉禍變成歡。") : Else
  1114. If RadioButton1.Checked = False And RadioButton2.Checked = False And RadioButton3.Checked = False And RadioButton4.Checked = True And RadioButton5.Checked = False Then
  1115. MsgBox("財搖持世益財榮,兄弟交重不可逢,更遇子孫明暗動,利身剋父喪文風,求官問訟宜財托,變動兄官萬事兄。") : Else
  1116. If RadioButton1.Checked = False And RadioButton2.Checked = False And RadioButton3.Checked = False And RadioButton4.Checked = False And RadioButton5.Checked = True Then
  1117. MsgBox("兄弟持世莫求財,官興需慮禍將來,朱雀並臨防口舌,如搖必定損妻財,父母相生身有壽,化官化鬼有奇災。")
  1118. End If : End If : End If : End If : End If : End If
  1119. End Sub
  1120. Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click
  1121. MsgBox("身臨福德不見官,所憂畢竟變成歡,目前兇事終須吉,緊急還來漸漸寬。身臨原用與青龍,定期喜事入門中,若逢驛馬身爻動,出路謀求事事通。身爻切忌入空亡,做事難成且守常,刑傷破絕皆為忌" &
  1122. "勸君安分守家邦。")
  1123. End Sub
  1124. Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click
  1125. MsgBox("正卦如無變又無,就將首卦六親攻,動爻生用終須吉,若遇交重剋用兇。")
  1126. End Sub
  1127. Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
  1128. MsgBox("發動逢沖不謂空,靜空遇剋卻為空,忌神最喜逢空吉,用與原神不可空。春土夏金秋樹木,三冬逢火是真空,旬空又值真空象,再遇爻傷到底空。" &
  1129. "勸君安分守家邦。")
  1130. End Sub
  1131. Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
  1132. MsgBox("用爻發動再宮中,縱值休囚亦不兇,更得生扶兼旺相,管教作事永亨通。")
  1133. End Sub
  1134. Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button24.Click
  1135. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1136. MsgBox("請選擇發動之六親") : Else
  1137. If RadioButton10.Checked = True And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1138. MsgBox("父動當頭剋子孫,病人無藥主昏沉,姻親子息應難得,買賣勞心利不存,觀望行人書信動,論官下狀理先分,士人科舉登金榜,失誤逃亡要訴論。") : Else
  1139. End If
  1140. If RadioButton10.Checked = False And RadioButton9.Checked = True And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1141. MsgBox("子孫發動傷官鬼,占病求醫身便癒,行人買賣身康泰,婚姻喜美事前緣,產婦當生子易養,詞訟私和不到官,謁貴求名休進用,勸君守分聽乎天。") : Else
  1142. End If
  1143. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = True And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1144. MsgBox("官鬼從來剋兄弟,婚姻未就生疑滯,病困門庭禍崇來,耕種蠶桑皆不利,外出逃亡定見災,詞訟官非有囚繫,買賣財輕賭博輸,失脫難尋多暗昧。") : Else
  1145. End If
  1146. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = True And RadioButton6.Checked = False Then
  1147. MsgBox("財爻發動剋文書,應舉求名總是虛,將本經營為大吉,親姻如意藥無虞,行人在外身將動,產婦求財身脫除,失物安靜家未出,病人傷胃更傷脾。") : Else
  1148. End If
  1149. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = True Then
  1150. MsgBox("兄弟交重剋了財,病人離癒未難災,應舉奪標為忌客,官非陰賊耗錢財,若帶吉神為有助,出入行人便未來,貨物經商消折本,買婢求妻事不諧。") : Else
  1151. End If
  1152. End If
  1153. End Sub
  1154. Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click
  1155. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1156. MsgBox("請選擇發動之六親") : Else
  1157. If RadioButton10.Checked = True And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1158. MsgBox("父母化父母,近神文書許,化子不傷丁,化鬼官遷舉,化財宅長憂,兄弟為泄氣。") : Else
  1159. End If
  1160. If RadioButton10.Checked = False And RadioButton9.Checked = True And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1161. MsgBox("子孫化退神,人財不稱情,化父田蠶敗,化財加倍榮,化鬼憂生產,兄弟謂相生。") : Else
  1162. End If
  1163. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = True And RadioButton7.Checked = False And RadioButton6.Checked = False Then
  1164. MsgBox("官化進神祿,求官應疾連,化財占病兇,化父父書遂,化子必傷官,化兄家不睡。") : Else
  1165. End If
  1166. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = True And RadioButton6.Checked = False Then
  1167. MsgBox("妻財化進神,錢財入宅來,化官憂戚戚,化子笑哈哈,化父宜家長,化兄當破財。") : Else
  1168. End If
  1169. If RadioButton10.Checked = False And RadioButton9.Checked = False And RadioButton8.Checked = False And RadioButton7.Checked = False And RadioButton6.Checked = True Then
  1170. MsgBox("兄弟化退神,凡占無所忌,化父妾奴驚,化財財未遂,化官弟有災,化子卻如意。") : Else
  1171. End If : End If
  1172. End Sub
  1173. Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button25.Click
  1174. MsgBox("土爻動而變木,木爻動而變金,金爻動而變火,火爻動而變水,水爻動而變土,此是爻之回頭剋也。乾兌卦之離,離之坎,坎之艮坤,艮坤之震巽,震巽之乾兌,此是卦之回頭剋也。凡遇回頭剋" &
  1175. "者,徹底剋盡。原用二神遇之則兇,忌仇二神遇之反吉。")
  1176. End Sub
  1177. Private Sub Label80_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label80.Click
  1178. MsgBox("寅日占卦,金爻絕于寅,如卦中有土爻動而生之,是絕處逢生也。")
  1179. End Sub
  1180. Private Sub Label81_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label81.Click
  1181. MsgBox("申日占卦,木爻絕于申,如卦中有水爻動而生之,是絕處逢生也。")
  1182. End Sub
  1183. Private Sub Label84_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label84.Click
  1184. MsgBox("巳日占卦,水爻絕于巳,如卦中有金爻動而生之,是絕處逢生也。")
  1185. End Sub
  1186. Private Sub Label82_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label82.Click
  1187. MsgBox("亥日占卦,火爻絕于亥,如卦中有木爻動而生之,是絕處逢生也。")
  1188. End Sub
  1189. Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button31.Click
  1190. MsgBox("青龍最喜悅而多仁,附忌神凡謀不利。白虎最兇勇而好殺,生用神諸為則吉。朱雀剋身,口舌是非常有,如來生用,文書音信當回。勾陳屬土,空則田園欠熟,剛強剋世,公差牽扯拘遲。騰蛇怪異" &
  1191. "虛驚,玄武私情盜賊。白虎血神生產,偏宜發動。午宮化朱雀水,何忌火災。騰蛇木鬼欺身,恐自縊難逃枷鎖。玄武官生靜世,交小人莫慮干連。世剋靜,青龍巡捕戲場酒肆上。鬼動勾陳,論祈禱" &
  1192. "訴酬太歲,問病原腫脹黃浮。")
  1193. End Sub
  1194. Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click
  1195. MsgBox("凡卦中子爻變丑,戌變卯,此子與丑合,卯與戌合,合中帶剋,合三剋七之分,如旺相得日月生扶幫比,或卦中動爻生之,世作合論也。被日月剋之,或卦中動剋之,世作剋論也。為申金化巳火者" &
  1196. "即無日月與動爻相生,不作剋論,乃化合化長生也,倘寅月日占之,是三刑會聚,申被寅沖,則不可以吉論矣。")
  1197. End Sub
  1198. Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click
  1199. MsgBox("合處逢沖有三 : 凡六合變六沖一也。日月沖爻二也。動爻變沖三也。---沖中處逢合亦有三 : 凡六沖變六合一也。日月合爻二也。動爻變合三也---合處逢沖,謀雖成而終散。沖中逢合,事已散而復成")
  1200. End Sub
  1201. Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click
  1202. MsgBox("為巳日占卦,土爻絕于巳,如月建生扶幫比,土爻不謂絕也,謂之日生。如土化出巳,有日月幫比,不云化絕,乃云回頭生也。如日月制土,則是絕于日也,則是化絕于爻也。如酉日占卦,寅爻被剋" &
  1203. ",卦終有水爻動而生之,是剋處逢生矣,餘例如之。大凡絕處逢生,寒谷逢春,剋處逢生,兇後見吉也。")
  1204. End Sub
  1205. Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click
  1206. MsgBox("凡卦終亥變子,丑變辰,寅變卯,辰變未,巳變午,未變戌,申變酉,戌變丑,乃進神也。進神者吉凶倍增其勢也。")
  1207. End Sub
  1208. Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click
  1209. MsgBox("凡卦終子變亥,戌變未,酉變申,未變辰,午變巳,辰變丑,卯變寅,丑變戌,乃退神也。退神者吉凶漸減其威也。")
  1210. End Sub
  1211. Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click
  1212. MsgBox("如甲戊日卜卦,見丑未爻即是日貴人,又如甲戊生人見之,為命貴人。----甲戊兼牛羊,乙己鼠猴鄉,丙丁豬雞位,壬癸兔蛇藏,庚辛逢馬虎,此是貴人方。")
  1213. End Sub
  1214. Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click
  1215. MsgBox("子水鼠,丑土牛,寅木虎,卯木兔,辰土龍,巳火蛇,午火馬,未土羊,申金猴,酉金雞,戌土狗,亥水豬")
  1216. End Sub
  1217. Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged
  1218. If ComboBox4.Text = "" Then : MsgBox("請選擇用神、五行。") : Else : Set_用原忌仇() : End If
  1219. End Sub
  1220. Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.TextChanged
  1221. If ComboBox5.Text = "" Then : MsgBox("請選擇用神、五行。") : Else : Set_用原忌仇() : Set_用神五行() : End If
  1222. End Sub
  1223. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  1224. Dim ran = New Random(DateTime.Now.Millisecond)
  1225. Label126.Text = ran.Next(1, 4096)
  1226. For NUM3 = 1 To 4096
  1227. Dim NUM4 As Integer = Label126.Text
  1228. If NUM4 > 4 Then
  1229. NUM4 -= 4
  1230. Label126.Text = NUM4
  1231. ElseIf NUM4 < 4 Then
  1232. Label126.Text = NUM4
  1233. NUM3 = 4096
  1234. End If
  1235. Next
  1236. If RadioButton11.Checked = True Then
  1237. If Label126.Text = 1 Then : ComboBox1.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox1.Text = "- -" : End If
  1238. If Label126.Text = 3 Then : ComboBox1.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox1.Text = "X" : End If
  1239. End If
  1240. If RadioButton12.Checked = True Then
  1241. If Label126.Text = 1 Then : ComboBox2.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox2.Text = "- -" : End If
  1242. If Label126.Text = 3 Then : ComboBox2.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox2.Text = "X" : End If
  1243. End If
  1244. If RadioButton13.Checked = True Then
  1245. If Label126.Text = 1 Then : ComboBox3.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox3.Text = "- -" : End If
  1246. If Label126.Text = 3 Then : ComboBox3.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox3.Text = "X" : End If
  1247. End If
  1248. If RadioButton14.Checked = True Then
  1249. If Label126.Text = 1 Then : ComboBox6.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox6.Text = "- -" : End If
  1250. If Label126.Text = 3 Then : ComboBox6.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox6.Text = "X" : End If
  1251. End If
  1252. If RadioButton15.Checked = True Then
  1253. If Label126.Text = 1 Then : ComboBox7.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox7.Text = "- -" : End If
  1254. If Label126.Text = 3 Then : ComboBox7.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox7.Text = "X" : End If
  1255. End If
  1256. If RadioButton16.Checked = True Then
  1257. If Label126.Text = 1 Then : ComboBox8.Text = "一" : End If : If Label126.Text = 2 Then : ComboBox8.Text = "- -" : End If
  1258. If Label126.Text = 3 Then : ComboBox8.Text = "O" : End If : If Label126.Text = 4 Then : ComboBox8.Text = "X" : End If
  1259. End If
  1260. End Sub
  1261. Private Sub RadioButton11_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton11.Click
  1262. RadioButton11.Checked = True : RadioButton12.Checked = False : RadioButton13.Checked = False : RadioButton14.Checked = False : RadioButton15.Checked = False : RadioButton16.Checked = False
  1263. End Sub
  1264. Private Sub RadioButton12_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton12.Click
  1265. RadioButton11.Checked = False : RadioButton12.Checked = True : RadioButton13.Checked = False : RadioButton14.Checked = False : RadioButton15.Checked = False : RadioButton16.Checked = False
  1266. End Sub
  1267. Private Sub RadioButton13_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton13.Click
  1268. RadioButton11.Checked = False : RadioButton12.Checked = False : RadioButton13.Checked = True : RadioButton14.Checked = False : RadioButton15.Checked = False : RadioButton16.Checked = False
  1269. End Sub
  1270. Private Sub RadioButton14_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton14.Click
  1271. RadioButton11.Checked = False : RadioButton12.Checked = False : RadioButton13.Checked = False : RadioButton14.Checked = True : RadioButton15.Checked = False : RadioButton16.Checked = False
  1272. End Sub
  1273. Private Sub RadioButton15_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton15.Click
  1274. RadioButton11.Checked = False : RadioButton12.Checked = False : RadioButton13.Checked = False : RadioButton14.Checked = False : RadioButton15.Checked = True : RadioButton16.Checked = False
  1275. End Sub
  1276. Private Sub RadioButton16_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton16.Click
  1277. RadioButton11.Checked = False : RadioButton12.Checked = False : RadioButton13.Checked = False : RadioButton14.Checked = False : RadioButton15.Checked = False : RadioButton16.Checked = True
  1278. End Sub
  1279. End Class