问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

求VB代码随便做一个什么,在安卓上运行的,代码哪里要回车换行希望说一下是随便做什么

发布网友 发布时间:2022-04-23 18:31

我来回答

4个回答

热心网友 时间:2023-10-13 01:30

REM Specify the menus.

Dim menuitems(0)
array(menuitems,"Zero","One","Two")
for i = 0 to arraylen(menuitems()) - 1
addmenuitem(menuitems(i))
next

REM An array for general use
Dim data(0)

REM Scale controls to screen size. The script assumes 320 x 480
rem Note that fonts are scaled according to density by Android

d = getlayoutvalues
strsplit(data, d, ",")
d = data(0) / 320

REM let the activity window paint empty to look like somethings happened immediately
rem otherwise you carry on seeing the IDE window

calldoevents

REM Add the views

addbutton("btn1", 5*d, 5*d, 65*d, 65*d, "")
settext("btn1", "Get")

addtogglebutton("tgl1", 250*d, 5*d, 65*d, 65*d, "")
settexton("tgl1", "Yes")
settextoff("tgl1", "No")

addlabel("lbl1", 80*d, 5*d, 130*d, 30*d, "")
settext("lbl1", "<- press both ->")
settextsize("lbl1", 18)

addcheckbox("chk1", 5*d, 80*d, 170*d,40*d, "")
settext("chk1", "Check(!) this out")

addradiobutton("rad1", 180*d, 80*d, 65*d, 40*d, "")
settext("rad1", "On")

addradiobutton("rad2", 250*d, 80*d, 65*d, 40*d, "")
settext("rad2", "Off")

addedittext("edt1", 5*d, 135*d, 205*d, 55*d, "")
settext("edt1", "Some text" & crlf & "some more" & crlf & "even more" & crlf & "and more")

createtypeface("serif", 1)
settypeface("edt1")
settextsize("edt1", 24)

addlabel("lbl2", 220*d, 135*d, 100*d, 30*d, "")
settext("lbl2", "Scroll the text")

addimage("img1", 5*d, 205*d, 305*d, 200*d, "")

addpanel("pnl1", 5*d, 80*d, 305*d, 300*d, "")
setcolor("pnl1", 10*d, csilver)
addbutton("btn2", 5*d, 5*d, 65*d, 65*d, "pnl1")
settext("btn2", "Hide")
setvisible("pnl1", false)

Dim data(3)
data(0) = cred
data(1) = cgreen
data(2) = cblue
setactivitybackground("TL_BR", 10*d, "data")
setbackground("lbl1", "RIGHT_LEFT", 10*d, "data")
settextcolor("lbl1", cyellow)

REM TabHost

addtabhost("tbh1", 75*d, 5*d, 200*d, 250*d, "pnl1")
setcolor("tbh1", 5*d, cred)

addtab("One", "tab1", "tbh1")
setcolor("tab1", 10*d, cblack)
addspinner("spin1", 10*d, 10*d, 150*d, 40*d, "tab1")
setprompt("spin1", "A Spinner")
array(data, "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
addall("spin1", "data")
addlistview("lvw1", 10*d, 55*d, 150*d, 100*d, "tab1")
setcolor("lvw1", 5*d, cblue)
setscrollcolor("lvw1", cblue)
addall("lvw1", "data")

addtab("Two", "tab2", "tbh1")
setcolor("tab2", 10*d, cgray)
addseekbar("skb1", 10*d, 20*d, 150*d, 35*d, "tab2")
addbutton("tbtn1", 50*d, 80*d, 65*d, 65*d, "tab2")
settext("tbtn1", "Reset")
setvalue("skb1", getmax("skb1")/2)

addtab("Three", "tab3", "tbh1")
setcolor("tab3", 10*d, cwhite)
addscrollview("svw1", 10*d, 10*d, 160*d, 150*d, "tab3")
setcolor("svw1", 10*d, cgreen)
getpanel("svw1", "s*l")
setheight("s*l", 300*d)
addbutton("tbtn2", 40*d, 80*d, 85*d, 65*d, "s*l")
settext("tbtn2", "Bottom")
addlabel("tlbl2", 50*d, 280*d, 1000*d, 30*d, "s*l")
settext("tlbl2", "ScrollView")

REM Graphics

canvasinit("img1")
drawcolor(cYellow)

col = argb(128, 255, 0, 0)
drawcircle(35*d, 35*d, 35*d, col, true, 2*d)

col = argb(128, 0, 255, 0)
drawline(35*d, 35*d, 35*d, 135*d, col, 4*d)

for i = 0 to 80*d
drawpoint(i, 100*d, cblue)
next

rem the points array can have a rank of 1 or 2
dim points(4,2)
points(0,0) = 40*d
points(0,1) = 40*d
points(1,0) = 80*d
points(1,1) = 80*d
points(2,0) = 40*d
points(2,1) = 160*d
points(3,0) = 40*d
points(3,1) = 40*d
drawpath("points", cpurple, false, 3)

rem the points array can have a rank of 1 or 2
dim rect(4)
rect(0) = 135*d
rect(1) = 15*d
rect(2) = 200*d
rect(3) = 135*d

drawrect("rect", cbrown, false, 4*d)
drawrectrotated("rect", cgold, false, 4*d, 45)

drawtext("Some text", 155*d, 100*d, 20, cblack, "RIGHT")
drawtextrotated("Some text", 155*d, 100*d, 20, cblack, "RIGHT", 180)

canvasinit("pnl1")
drawtext("Some text", 155*d, 280*d, 20, cblack, "RIGHT")
drawtextrotated("Some text", 155*d, 280*d, 20, cblack, "RIGHT", 180)

REM File operations

txt = filereadstring(filedirrootexternal & "/BasicIDE", "IdeTest.src")
msgbox(txt, "My script!" & " " & getfirsttime)

filewritelist(filedirrootexternal, "test.txt", "rect")
txt = filereadstring(filedirrootexternal, "test.txt")
msgbox(txt, "Test file")

filereadlist(filedirrootexternal, "test.txt", "temp")
msgbox(temp(0), "Test file")

inputdate("Enter a date", "Date Dialog", now, "OK", "Cancel", "")
showtoast("Date = " & Date(getinput), false)
inputtime("Enter a time", "Time Dialog", now, true, "OK", "Cancel", "")
showtoast("Time = " & Time(getinput), false)

REM device layout values

w = windowwidth
h = windowheight
showtoast("Window size is " & w & " x " & h, false)
showtoast("Layout values are " & getlayoutvalues, false)

REM End of inital program block

REM Event Subs

Sub button_click(who)
select who
case "btn1"
res = inputbox("Enter text", "InputBox", "OK", "Cancel", "")
ip = getinput
msgbox(ip, "You entered")
array(data, "Zero", "One", "Two", "Three", "Four", "Five")
res = inputlistbox("data", "Choose an item", 0)
if res < 0 then
res = "Nothing"
else
res = data(res)
end if
msgbox(res, "You chose")
res = inputmultilistbox("data", "Choose one or more items")
msgbox(res, "You chose")
case "btn2"
setvisible("pnl1", false)
setchecked("tgl1", false)
case "tbtn1"
a = getmax("skb1")
setvalue("skb1", a/2)
case "tbtn2"
fullscroll("svw1", true)
end select
End Sub

Sub check_change(who, checked)
progressshow(who & " checked is " & checked)
for i = 0 to 2000
calldoevents
next
progresshide
End Sub

Sub edit_change(who, old, new)
showtoast(who & " " & asc(strat(new, strlength(new) - 1)), false)
End Sub

Sub listview_itemclick(who, pos, value)
showtoast(who & " " & value, false)
end sub

Sub radio_change(who, checked)
showtoast(who & " " & checked, false)
End Sub

Sub seekbar_valuechanged(who, value, userchanged)
End Sub

Sub spinner_itemclick(who, pos, value)
showtoast(who & " " & value, false)
end sub

Sub tabhost_tabchanged(who)
End Sub

Sub toggle_change(who, checked)
setvisible("pnl1", checked)
End Sub

Sub menu_click(which)
showtoast(which, false)
end sub

热心网友 时间:2023-10-13 01:31

google 开发的用VB能搞定?Andriod是用Java写的。MyEclipse升级Andriod工具包就可以开发Andriod应用程序。Andriod用SQLite数据库

热心网友 时间:2023-10-13 01:31

VB代码要是能在安卓上跑,那应该叫NB。

热心网友 时间:2023-10-13 01:32

VB目前还不能制作安卓程序吧?安卓要用专用的系统,还要用c语言的
如果能的话就好了
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
色彩中蓝色、红色、黄色除了加白色以外还有什么办法提高明度 色彩不敢调亮怎么办? 色彩如何提亮 男朋友惹我生气了 事后一点悔意也没 都在气头上 我不小心打男朋友了 他... 解签:为人处事莫亏心,暗室之中有灵应,一时得意反成失,半点悔改胜似金... 我手机之前一段时间由于欠费停机了 前几天我充了50元进去怎么还是... 撕名牌可以用哪些超能力技能? 为什么5孔插座带开关,安装好之后,灯有电,插座不通电? 怎么把照片内存变小 图片内存变小的方法 百度地图导航如何连接车蓝牙 百度地图导航连接车蓝牙方法 帮忙看下java代码哪里出问题了 define tag cannot set a null value报错,不知错在哪里 大家指教! 这段JAVA代码哪里错了? 你好,我的Android开发天气预报代码运行的时候老是报错,图片如下: 哈利波特里斯内普住在什么地方 android开发中 在类似QQ好友列表中如何实现第二级列表上的spinner的选择。 有谁用过the best spinner的,一款比较好的伪原创软件? 推荐一个200元左右的指尖陀螺。还有就是指尖陀螺都有什么品牌,外国的正品去哪里买。最好大神讲解以下 哪里可以买到便宜的指尖陀螺? flying spinner在哪买 养乌龟好还是老鳖好 make+a+spinner用什么特殊疑问词? android spinner 下拉列表 甲鱼跟乌龟哪个营养价值高? 实现一个spinner需要完成哪几个步骤 吃乌龟和王八哪个有营养 spinner烟弹哪里买 乌龟跟甲鱼放井里面哪个比较容易存活? 乌龟和甲鱼的营养价值哪个更高心? 湖里面放生是甲鱼好养还是乌龟好养? 请问哪能下载到海豚的声音 海水豚有哪32个品种? datataskwithurl与datawithcontentsofurl区别在哪 键盘打字总是打错 怎么办 对错符号怎么打出来(急),谢谢 键盘输入错误怎么办 金黄色LOGO墙配什么颜色的字合适? 新媒体分为哪几个方面? 红色的logo下面配什么颜色的字? 如何进行logo色彩搭配以及logo设计 新媒体主要包括哪些? 白底logo墙配什么颜色的字 黄色的logo标搭配什么颜色的字 白墙 新媒体的定义有哪些类别? 网页背景颜色为绿色,设计logo什么颜色好?文字用什么颜色? logo黑色的字体配什么颜色的背景 新媒体的主要分类 新媒体可以做哪些内容形式? 新媒体传播特征有哪些 韩版女装店,logo哪个字体颜色好点