當前位置:編程學習大全網 - 源碼下載 - Iapp網站獲取亂碼源代碼。

Iapp網站獲取亂碼源代碼。

首先要說的是點數太少。。。。。

我花了兩個小時才寫完試卷。

首先,建立壹個新項目。

添加兩個表單,即Form1和Form2。

將框架1添加到表單1。

在Frame1中添加的控件數組Option1(0)和Option1(1)'分別是大字體和小字體。

在Form1中添加Frame2。

在Frame2中添加控制數組check 1 (0),check 1 (1),check 1 (2)和Check1(3)?分別是宋體、仿宋體、楷體、黑體。

Check1(0)-Check1(3)樣式屬性全部選擇為1-graphic。

從1

添加壹個標簽1。

添加壹個控件數組Combo1(0)'來設置背景色。

添加標簽2。

添加壹個控件數組Combo1(1)'來設置前景色。

添加標簽3。

添加幻燈片1?TickStyle屬性設置為3-sldNoTick。

加個Text1?用於顯示和輸入、保存字幕內容。

添加框架3。

Frame3增加了控制數組Check2(0-7),對應1-8個預置字幕,可以分別設置和修改。

添加框架4。

在Frame4中添加控制數組Option2(0-3),分別對應“從左到右”、“從右到左”、“穿透擺動”和“墻壁倒影”。

加個Command1?恢復設置

添加命令2 '來啟動和停止。

添加命令3?退出程序

添加壹個定時器1 '來控制字幕移動。

* * * * * * * *以上是1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *,表格中的費用

向Form2添加壹個Label1,將其放在表單的左上角,並將屬性AutoSize設置為True。

控件,下面是代碼:

代碼在' * * * * **********Form1+0

私有聲明函數WritePrivateProfileString Lib " kernel 32 " Alias " WritePrivateProfileString a "(ByVal lpApplicationName為String,ByVal lpKeyName為Any,ByVal lpString為Any,ByVal lpFilename為String)Long

私有聲明函數GetPrivateProfileString Lib " kernel 32 "別名" GetPrivateProfileString a "(ByVal lpApplicationName為String,ByVal lpKeyName為Any,ByVal lpDefault為String,ByVal lpReturnedString為String,ByVal nSize為Long,ByVal lpFilename為String)長

Dim EnableCheck為布爾值

Dim tLeft為布爾值

Dim SetNum為整數

私有函數INIRead(iAppName為String,iKeyName為String,iFileName為String)為String

Dim iStr美元,aaa美元

iStr = String(1000,Chr(0))

aaa = Left(iStr,GetPrivateProfileString(IAPP name,ByVal iKeyName,"",iStr,Len(iStr),iFileName))

INIRead = IIf(InStr(aaa,Chr(0))& gt;0,替換(aaa,Chr(0),""),aaa)

結束功能

私有子檢查1_Click(索引為整數)

如果EnableCheck = False,則

ClickCheck1索引

如果…就會結束

末端接頭

Sub ClickCheck1(索引為整數)

EnableCheck = True

對於i = 0到3

如果i = Index,則

Check1(i)。值= 1

其他

If Check1(i)。值= 1,然後檢查1(i)。值= 0

如果…就會結束

然後

選擇案例索引

案例0

表格2。Label1。font = "π"

案例1

表格2。Label1。Font = "仿宋_GB2312 "?因為這臺機器上沒有隸書,所以改成仿宋字體。

案例2

表格2。Label1。Font = "italics _GB2312 "

案例3

表格2。Label1。Font = "bold "

結束選擇

EnableCheck = False

末端接頭

私有子檢查2_Click(索引為整數)

如果EnableCheck = False,則

點擊檢查2索引

如果…就會結束

末端接頭

Sub ClickCheck2(索引為整數)

EnableCheck = True

對於i = 0到7

如果i = Index,則

檢查2(i)。值= 1

其他

如果檢查2(i)。值= 1,然後檢查2(i)。值= 0

如果…就會結束

然後

Text1。Text = INIRead ("subtitle "," subtitle " &;索引,App。路徑與路徑。" \Config.ini ")?讀取Config.ini文件,獲取相應的字幕內容。

如果Text1。Text = " "那麽

定時器1。間隔= 0

命令2。Caption = "開始"

表格2。隱藏

其他

如果選項2(0)。Value = True或Option2(1)。那麽值=真

表格2。Label1。Caption = Text1。文本& amp" "

其他

表格2。Label1。Caption = Text1。文本

如果…就會結束

如果…就會結束

EnableCheck = False

末端接頭

私有子檢查3_Click()

末端接頭

私有子檢查4_Click()

如果檢查4。那麽值= 1

表格2。WindowState = 2

其他

表格2。WindowState = 0

如果…就會結束

末端接頭

私有子組合1_Click(索引為整數)

Dim SetColor As Long

如果Combo1(0)。Text = Combo1(1)。然後發短信

選擇案例組合1(索引)。文本

案例“紅色”

combo 1((index+1)mod 2)。text = "black "

案例“黃色”

combo 1((index+1)mod 2)。text = "青色"

案例“藍色”

combo 1((index+1)mod 2)。text = "綠色"

案例“綠色”

combo 1((index+1)mod 2)。text = "紫色"

案例“紫色”

combo 1((index+1)mod 2)。text = "黃色"

案例“青色”

combo 1((index+1)mod 2)。text = "黃色"

案例“黑色”

combo 1((index+1)mod 2)。text = "紅色"

案例“白色”

combo 1((index+1)mod 2)。text = "藍色"

結束選擇

如果…就會結束

對於i = 0到1

選擇案例組合1(i)。文本

案例“紅色”

SetColor = & ampHFF & amp;

案例“黃色”

SetColor = & ampHFFFF & amp

案例“藍色”

SetColor = & ampHFF000

案例“綠色”

SetColor = & ampHFF00 & amp

案例“紫色”

SetColor = & ampHFF00FF

案例“青色”

SetColor = & ampH8000 & amp

案例“黑色”

SetColor = & ampH0 & amp;

案例“白色”

SetColor = & ampHFFFFFF

結束選擇

如果i = 0,那麽

表格2。BackColor = SetColor

表格2。Label1。BackColor = SetColor

其他

表格2。Label1。ForeColor = SetColor

如果…就會結束

然後

末端接頭

私有子命令1_Click()

初始化所有設置,但字幕內容沒有改變。(因為沒有預設字幕)

Option1(0)。值=真

表格2。Label1。FontSize = Form2。ScaleHeight \ 24

Check1(0)。值= 0

Combo1(0)。Text = "青色"

Combo1(1)。Text = "黃色"

Slider1。值= 5

定時器1。間隔= 1000-(1000-50)* slider 1。值\ 10

SetNum = Int((1000/timer 1。間隔)* 3)

選項2(0)。值=真

表格2。Label1。Caption = Text1。文本& amp" "

檢查3。值= 0

檢查4。值= 0

表格2。WindowState = 0

末端接頭

私有子命令2_Click()

If命令2。Caption = "開始"

如果Text1。Text & lt& gt”“那麽

如果選項2(0)。Value = True或Option2(1)。那麽值=真

表格2。Label1。Caption = Text1。文本& amp" "

其他

表格2。Label1。Caption = Text1。文本

如果…就會結束

命令2。Caption = "停止"

定時器1。間隔= 1000-(1000-50)* slider 1。值\ 10

SetNum = Int((1000/timer 1。間隔)* 3)

表格2。顯示

我。隱藏

如果…就會結束

其他

命令2。Caption = "開始"

定時器1。間隔= 0

表格2。隱藏

如果…就會結束

末端接頭

私有子命令3_Click()

結束

末端接頭

私有子窗體_Load()

* * * * * * * *為每個控制分配值* * * * * * * * * * * * * * * * * * * * * * * * * * * *

表單1。Caption = "滾動字幕控制臺"

表格2。Caption = "滾動字幕板"

Frame1。Caption = "滾動字幕的文本大小"

Option1(0)。Caption = "大字體"

選項1 (1)。caption = "小字體"

Option1(0)。值=真

表格2。Label1。FontSize = Form2。ScaleHeight \ 24

框架2。Caption = "滾動字幕字體控件"

Check1(0)。標題=“不”

Check1(1)。Caption = "仿宋體"'這臺機器上沒有隸書。

Check1(2)。Caption = "斜體"

Check1(3)。Caption = "bold "

Check1(0)。值= 1

表格2。Label1。font = "π"

Label1。Caption = "背景顏色:"

標簽2。Caption = "前景:"

對於i = 0到1

Combo1 (i)。添加劑“白色”

Combo1(i)。AddItem“紅色”

Combo1(i)。附加項“黃色”

Combo1 (i)。添加劑“藍色”

Combo1(i)。附加項目“綠色”

Combo1 (i)。添加劑“紫色”

Combo1 (i)。添加劑“青色”

Combo1 (i)。添加劑“黑色”

然後

Combo1(0)。Text = "青色"

Combo1(1)。Text = "黃色"

標簽3。Caption = "滾動速度:"

Slider1。值= 5

Text1。Text = "請在此處直接輸入字幕文本"

框架3。Caption = "選擇字幕"

對於i = 0到7

檢查2(i)。Caption = CStr(i + 1)

然後

框架4。Caption = "屏幕滾動方向控件"

選項2(0)。Caption = "從左到右"

選項2(1)。Caption = "從右到左"

選項2(2)。Caption = "穿透性揮桿"

選項2(3)。Caption = "墻壁倒影"

選項2(0)。值=真

檢查3。Caption = "顏色自動改變"

檢查4。Caption = "全屏顯示"

命令1。Caption = "恢復設置"

命令2。Caption = "開始"

命令3。Caption = "退出"

定時器1。間隔= 0

* * * * * * * *為每個控制分配值* * * * * * * * * * * * * * * * * * * * * * * * * * * *

' TLeft = False '初始化TLeft,這樣當穿透擺動和墻壁反射發生時,首先將其向右移動。

末端接頭

private Sub Form _ QueryUnload(Cancel為整數,UnloadMode為整數)

取消= 1

我。隱藏

表格2。顯示

末端接頭

私有子選項1_Click(索引為整數)

表格2。Label1。左= 0

如果索引= 0,則

表格2。Label1。FontSize = Form2。ScaleHeight \ 24

其他

表格2。Label1。FontSize = Form2。ScaleHeight \ 50

如果…就會結束

末端接頭

私有子選項2_Click(索引為整數)

如果索引= 3或索引= 2,則

表格2。Label1。Caption = Text1。文本

其他

表格2。Label1。Caption = Text1。文本& amp"? "

如果…就會結束

末端接頭

私有子幻燈片1_Click()

定時器1。間隔= 1000-(1000-50)* slider 1。值\ 10

SetNum = Int((1000/timer 1。間隔)* 3)

末端接頭

私有子文本1_LostFocus()

對於i = 0到7

如果檢查2(i)。那麽值= 1

WritePrivateProfileString " subtitle "," subtitle " &;CStr(i),Text1。文字,App。路徑與路徑。" \Config.ini "?當文本框1中的輸入完成,鼠標單擊其他控件時,文本框1失去焦點,保存文本框1。Config.ini文件中相應的選定Check2(i)項的文本。

如果…就會結束

然後

末端接頭

私有子定時器1_Timer()

如果選項2(0)。那麽值=真

表格2。Label1。標題=右(Form2。Label1。標題,1);中間(表格2。Label1。標題,1,長度(Form2。Label1。標題)- 1)

ElseIf選項2(1)。那麽值=真

表格2。Label1。Caption = Mid(Form2。Label1。標題,2)& amp;中間(表格2。Label1。標題,1,1)

ElseIf選項2(2)。那麽值=真

如果tLeft = False,則

如果Form2。Label1。Left & gt= Form2。ScaleWidth Then tLeft = True: Form2。Label1。左= Form2。Label1。左- 200否則形成2。Label1。左= Form2。Label1。向左+ 200

其他

如果Form2。Label1。左+ Form2。Label1。寬度& lt= 0則tLeft = False: Form2。Label1。左= Form2。Label1。左+ 200否則形成2。Label1。左= Form2。Label1。向左200度

如果…就會結束

ElseIf選項2(3)。那麽值=真

如果tLeft = False,則

如果Form2。Label1。左+ Form2。Label1。寬度& lt= Form2。ScaleWidth然後Form2。Label1。左= Form2。Label1。Left + 200 Else tLeft = True: Form2。Label1。左= Form2。Label1。向左200度

其他

如果Form2。Label1。Left & gt= 0然後Form2。Label1。左= Form2。Label1。Left - 200 Else tLeft = False: Form2。Label1。左= Form2。Label1。向左+ 200

如果…就會結束

如果…就會結束

如果檢查3。那麽值= 1

如果SetNum & gt那麽0

SetNum = SetNum - 1

其他

SetNum = Int((1000/timer 1。間隔)* 3)

選擇案例表單2。Label1。前景色

凱斯& ampHFFFFFF

SetColor = & ampHFF & amp;

凱斯& ampH0 & amp;

SetColor = & ampHFFFF & amp

凱斯& ampH8000 & amp

SetColor = & ampHFFFFFF

凱斯& ampHFF00FF

SetColor = & ampH8000 & amp

凱斯& ampHFF00 & amp

SetColor = & ampHFF00FF

凱斯& ampHFF000

SetColor = & ampH8000 & amp

凱斯& ampHFFFF & amp

SetColor = & ampHFF00 & amp

凱斯& ampHFF & amp;

SetColor = & ampH0 & amp;

結束選擇

表格2。BackColor = Form2。Label1。前景色

表格2。Label1。BackColor = Form2。Label1。前景色

表格2。Label1。ForeColor = SetColor

如果…就會結束

如果…就會結束

末端接頭

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

私有子窗體_DblClick()

表單1。顯示

末端接頭

private Sub Form _ QueryUnload(Cancel為整數,UnloadMode為整數)

取消= 1

我。隱藏

表單1。顯示

表單1。Command2.Caption = "Start "

表單1。定時器1。間隔= 0

表格2。隱藏

末端接頭

私有子窗體_Resize()

如果Form1。Option1(0)。那麽值=真

Label1。FontSize = Form2。ScaleHeight \ 24

其他

Label1。FontSize = Form2。ScaleHeight \ 50

如果…就會結束

末端接頭

私有子標簽1_DblClick()

表單1。顯示

末端接頭

* * * * * * * * * * * * * * * * * * * * * * * *是上面的部分,也可以是* * * * * * * * * * * * * * * * * * * * * * * * * *。

  • 上一篇:5.0前夕戰士專精怎麽加
  • 下一篇:什麽叫壹陽穿二陰?
  • copyright 2024編程學習大全網