vb怎麼樣把陣列列印到frame控制元件裡

2022-08-26 03:22:28 字數 1725 閱讀 7072

1樓:綿陽**

option explicit

option base 1

dim a(6) as integer, b(6) as integer

private sub command1_click()

dim n as integer, i as integer

label1.caption = ""

label2.caption = ""

randomize

n = int(rnd * 6) + 1

for i = 1 to n

a(i) = int(rnd * 100) + 1

next i

for i = 1 to n

if i = n then

label1.caption = label1.caption & a(i)

exit for

end if

label1.caption = label1.caption & a(i) & ", "

next i

n = int(rnd * 6) + 1

for i = 1 to n

b(i) = int(rnd * 100) + 1

next i

for i = 1 to n

if i = n then

label2.caption = label2.caption & b(i)

exit for

end if

label2.caption = label2.caption & b(i) & ", "

next i

end sub

private sub command2_click()

label3.caption = label1.caption & ", "& label2.caption

end sub

private sub form_load()

dim i as integer

randomize

for i = 1 to 6

a(i) = int(rnd * 100) + 1

b(i) = int(rnd * 100) + 1

next i

for i = 1 to 6

if i = 6 then

label1.caption = label1.caption & a(i)

label2.caption = label2.caption & b(i)

exit for

end if

label1.caption = label1.caption & a(i) & ", "

label2.caption = label2.caption & b(i) & ", "

next i

end sub

2樓:聽不清啊

在frame控制元件中加入一個label控制元件就可以了。

private sub form_click()dim a(20) as integer

for i = 1 to 6

a(i) = int(100 * rnd)next i

label1.caption = a(1)for i = 2 to 6

label1.caption = label1.caption & ", " & a(i)

next i

end sub

怎麼把兩張A4紙的內容列印到一張A4紙上

排版,把兩頁的內容縮小字型,減小行距等設定後調到1頁上.我知道你的意思 你是想把兩頁的內容列印到一頁紙上是嗎?也就是縮放到一頁紙上。以節省用紙。可以在頁面設定裡 選擇對摺拼頁 要麼正反列印 要用印表機的縮放功能 怎麼才能把一張圖紙列印在兩張a4紙上 點 選單 檔案 列印,然後在印表機選項裡面找到 每...

uv印表機可以列印皮革嗎?列印效果怎麼樣

uv印表機是可以印刷在皮革上面的,印刷效果也是很好的。使用日本精工原裝全鋼工業級1024gs 508gs噴頭,精度 速度 耐用性和穩定性都勘稱世界一流!壽命長的特點,色域擴充套件到8色,色彩還原無可挑剔,噴頭校準更為簡易,帶來優化的列印效能和速度。在皮革上列印是沒有問題的,列印出來的效果和電腦上顯示...

UV印表機列印成本怎麼樣,uv印表機列印成本是多少

uv印表機的成本主要是指墨水的成本,一般彩墨成本在3 5元 平方,白墨成本略高些6 10元 平方。其他的如果做浮雕效果,要堆積白墨,成本會更高些。uv印表機列印成本5 10塊錢的 1 普通彩印5 6塊 2 加一層浮雕多1塊 3 加一層光油多2塊 4 加一些前處理多1塊 當然這些都只是原材料的成本計算...