一道VB程序设计题设计可以变化字体字号的文件

2021-01-17 08:20:15 字数 5117 阅读 7706

1楼:覃

添加如下**:

private sub check1_click()

text1.fontunderline = not text1.fontunderline

end sub

private sub check2_click()

text1.fontitalic = not text1.fontitalic

end sub

private sub check3_click()

text1.fontbold = not text1.fontbold

end sub

private sub option1_click()

text1.fontname = "黑体"

end sub

private sub option2_click()

text1.fontname = "楷体_gb2312"

end sub

private sub option3_click()

text1.fontname = "隶书" '我的电脑没有隶书字体,所以调试时出错

end sub

private sub option4_click()

text1.fontsize = 12

end sub

private sub option5_click()

text1.fontsize = 16

end sub

private sub option6_click()

text1.fontsize = 20

end sub

在vb程序设计中如何改变标签label的字体大小的源程序(大小数据自定)

2楼:匿名用户

vb程序设计可通过对标签控件的fontsize属性设置改变显示文本所用字体的大小。

fontsize 属性,返回或设置在控件中或在运行时画图或打印操作中,显示文本所用的字体的大小。

语法object.fontsize [= points]fontsize 属性语法包含下面部分:

部分 描述

object

对象表达式,其值是“应用于”列表中的一个对象。

points

数值表达式,用磅为单位指定所用字体的大小。

**示例:

optionexplicit

dimflagasboolean

privatesubform_click()ifflagthen

label1.fontsize=24

else

label1.fontsize=8

endif

flag=notflag

endsub

privatesubform_load()flag=true

endsub

3楼:匿名用户

label1.font.size=16设置为16号字体

求用vb设计一个关于字体字号的程序?

4楼:匿名用户

添加如下**:

private sub check1_click()

text1.fontunderline = not text1.fontunderline

end sub

private sub check2_click()

text1.fontitalic = not text1.fontitalic

end sub

private sub check3_click()

text1.fontbold = not text1.fontbold

end sub

private sub option1_click()

text1.fontname = "黑体"

end sub

private sub option2_click()

text1.fontname = "楷体_gb2312"

end sub

private sub option3_click()

text1.fontname = "隶书" '我的电脑没有隶书字体,所以调试时出错

end sub

private sub option4_click()

text1.fontsize = 12

end sub

private sub option5_click()

text1.fontsize = 16

end sub

private sub option6_click()

text1.fontsize = 20

end sub

vb编程题——设计一个用于设置字体属性的程序 具体如下

5楼:匿名用户

把以下**用记事本保存为后缀名为.frm的文件中,用vb打开。

******************************====

version 5.00

begin vb.form form1

caption = "form1"

clientheight = 3195

clientleft = 60

clienttop = 345

clientwidth = 4680

linktopic = "form1"

scaleheight = 3195

scalewidth = 4680

startupposition = 3 '窗口缺省

begin vb.***mandbutton ***mand3

caption = "***mand3"

height = 375

left = 1920

tabindex = 4

top = 1920

width = 855

endbegin vb.***mandbutton ***mand2

caption = "***mand2"

height = 375

left = 1920

tabindex = 3

top = 1200

width = 855

endbegin vb.***mandbutton ***mand1

caption = "***mand1"

height = 375

left = 1920

tabindex = 2

top = 480

width = 855

endbegin vb.listbox list2

height = 2400

left = 2880

tabindex = 1

top = 360

width = 1815

endbegin vb.listbox list1

height = 2400

left = 120

tabindex = 0

top = 360

width = 1695

endend

attribute vb_name = "form1"

attribute vb_globalnamespace = false

attribute vb_creatable = false

attribute vb_predeclaredid = true

attribute vb_exposed = false

function isprime(byval n as long) as boolean

dim i as long

for i = 2 to int(n / 2)

if n mod i = 0 then isprime = false: exit function

next

isprime = true

end function

private sub ***mand2_click()

dim i as integer

redim a(0) as integer

for i = 0 to 29

if isprime(list1.list(i)) then

a(ubound(a)) = list1.list(i)

list2.additem a(ubound(a))

redim preserve a(ubound(a) + 1)

end if

next

***mand1.enabled = true

***mand2.enabled = false

end sub

private sub ***mand3_click()

endend sub

private sub form_load()

***mand1.caption = "排序"

***mand2.caption = "筛选"

***mand3.caption = "退出"

***mand1.enabled = false

randomize

dim i as integer

for i = 1 to 30

list1.additem int(rnd * 1900 + 100)

next

end sub

vb程序设计中,改标签框中的字体时只能改吗?有没有简

1楼 匿名用户 你可以先改好一个,然后复制这个标签,然后再粘贴到 表单上,这样 这个标签的样式也自动复制过来了 ,当然他会提示你是否创建这个标签的数组,你可以确定也可以不用数组 2楼 欧联科技 字体可以一起改啊,你可以按住ctrl 键 ,把所有需要修改字体的标签控件全部选择好,然后在右边的属性框里修...

谁可以帮我把自己的名字设计标志,谁可以帮我把自己的名字设计一个标志logo

1楼 匿名用户 把首字母大写,换各种颜色。你就是新的logo。模仿一下谷歌就可以了。 用自己的名字设计一个logo ,怎么设计呢?用ps做的 2楼 幽斯坦丁 一般的字体设计都是用ai或者cdr,ps这款软件对图形编辑方面不是很理想,如果说是非要用ps做字体设计的话,可以考虑往特效字方向发展 例如 金...

求关于创意设计的文章要求以上,求一篇关于创意设计的文章要求3000字以上~~ 20

1楼 匿名用户 创意设计 创意是神秘的。古往今来,学者们对创意的认识不同,所作的定义也各不相同,robertj sternberg认为,创意是生产作品的能力,这些作品既新颖 也就是具有原创性,是不可预期的 ,又恰当 也就是符合用途,适合目标所给予的限制 建筑学者库地奇 johnkurdich 认为 ...