home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 January (DVD)
/
VPR980100.ISO
/
OLS
/
WIN16
/
TENTORI
/
TENTORI.LZH
/
TENT_S.LZH
/
TENTORI.FRM
next >
Wrap
Text File
|
1995-02-12
|
6KB
|
218 lines
VERSION 2.00
Begin Form formTentori
BorderStyle = 0 'なし
Caption = "点取り占い様"
Height = 2595
Icon = TENTORI.FRX:0000
Left = 2010
LinkTopic = "Form1"
ScaleHeight = 2190
ScaleWidth = 5310
Top = 2265
Width = 5430
Begin TextBox textTen
BorderStyle = 0 'なし
Enabled = 0 'False
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 14.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 360
MousePointer = 1 '矢印
MultiLine = -1 'True
TabIndex = 4
TabStop = 0 'False
Top = 840
Width = 735
End
Begin TextBox textUranai
BorderStyle = 0 'なし
Enabled = 0 'False
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 14.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1815
Index = 3
Left = 1560
MousePointer = 1 '矢印
MultiLine = -1 'True
TabIndex = 3
TabStop = 0 'False
Top = 240
Width = 375
End
Begin TextBox textUranai
BorderStyle = 0 'なし
Enabled = 0 'False
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 14.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1815
Index = 2
Left = 2520
MousePointer = 1 '矢印
MultiLine = -1 'True
TabIndex = 2
TabStop = 0 'False
Top = 240
Width = 375
End
Begin TextBox textUranai
BorderStyle = 0 'なし
Enabled = 0 'False
FontBold = -1 'True
FontItalic = 0 'False
FontName = "標準ゴシック"
FontSize = 14.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1815
Index = 1
Left = 3480
MousePointer = 1 '矢印
MultiLine = -1 'True
TabIndex = 1
TabStop = 0 'False
Top = 240
Width = 375
End
Begin TextBox textUranai
BorderStyle = 0 'なし
Enabled = 0 'False
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 14.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1815
Index = 0
Left = 4440
MousePointer = 1 '矢印
MultiLine = -1 'True
TabIndex = 0
TabStop = 0 'False
Top = 240
Width = 375
End
Begin Shape shapeCircle
BorderWidth = 2
Height = 495
Left = 480
Shape = 3 '円
Top = 1440
Width = 495
End
Begin Shape shapeWaku
BorderColor = &H00000000&
BorderWidth = 3
Height = 2175
Left = 0
Top = 0
Width = 5295
End
End
Sub Form_KeyPress (KeyAscii As Integer)
End
End Sub
Sub Form_Load ()
Dim iFileLength As Integer ' ファイルの大きさ
Dim lpszUranai As String ' 占いメッセージ
Dim iTextPos As Integer ' 文字位置
Dim lColor As Long ' 表示色
Dim i As Integer ' 有象無象
' データファイルのopen
Open App.Path & "\tentori.dat" For Input As #1
iFileLength = LOF(1) - 3 ' EOFとCr,Lfの分は削っておこうかな
If iFileLength > 32000 Then
MsgBox "tentori.datが大きすぎます!", 16, "点取り占い様からの伝言"
Close #1
End
End If
' 占い文の選択
Randomize
Seek #1, Int(iFileLength * Rnd + 1)
Line Input #1, lpszUranai
If EOF(1) Then
Seek #1, 1
End If
Line Input #1, lpszUranai
' クローズだ
Close #1
' 表示位置の設定
formTentori.Width = 5295
formTentori.Height = 2175
formTentori.Left = (Screen.Width - formTentori.Width) / 2
formTentori.Top = (Screen.Height - formTentori.Height) / 2
' とりあえずフォームを見せておくよ
Show
' 占い文の縦書き化(と言っても今のところ横棒のみ対応)
iTextPos = InStr(lpszUranai, "ー")
While iTextPos <> 0
Mid$(lpszUranai, iTextPos) = "|"
iTextPos = InStr(lpszUranai, "ー")
Wend
' 表示色の選択
lColor = RGB(&HFF * Int(Rnd * 2#), &HFF * Int(Rnd * 2#), &HFF * Int(Rnd * 2#))
If lColor = &HFFFFFF Then
lColor = 0
End If
For i = 0 To 3
textUranai(i).ForeColor = lColor
Next
textTen.ForeColor = lColor
shapeWaku.BorderColor = lColor
shapeCircle.BorderColor = lColor
shapeCircle.FillColor = lColor
' 占い文の表示
If LenB(lpszUranai) <= 36 Then
iTextPos = 1
Else
iTextPos = 0
End If
For i = iTextPos To 3
textUranai(i).Text = MidB$(lpszUranai, 1 + (i - iTextPos) * 12, 12)
Next
' 点数の表示
textTen.Text = Str$(Int(Rnd * 10#)) & "点"
'占い円(?)の表示
shapeCircle.FillStyle = Int(Rnd * 7#)
End Sub
Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
Static f As Integer
' や~、ようするにあっさりした終わり方をしたかったわけです
If f < 4 Then
f = f + 1
Else
End
End If
End Sub