用VB编程在窗体显示.需要设计个人简历、家庭等按扭来选择显示内容.可以调整字体、颜色、大小等内容,
用VB编程在窗体显示.需要设计个人简历、家庭等按扭来选择显示内容.可以调整字体、颜色、大小等内容,要做好的,直接发给我的那种,拜托...
用VB编程在窗体显示.需要设计个人简历、家庭等按扭来选择显示内容.可以调整字体、颜色、大小等内容,要做好的,直接发给我的那种,拜托
展开
1个回答
推荐于2016-11-13
展开全部
'窗体中添加3个commandbutton,一个对话框控件
Dim str1 As String, str2 As String, str3 As String
Private Sub Command1_Click()
str1 = str2
Cls
Print str1
End Sub
Private Sub Command2_Click()
str1 = str3
Cls
Print str1
End Sub
Private Sub Command3_Click()
CommonDialog1.Flags = cdlCFBoth Or cdlCFEffects
CommonDialog1.FontName = "宋体"
CommonDialog1.ShowFont
Form1.FontName = CommonDialog1.FontName
Form1.FontBold = CommonDialog1.FontBold
Form1.FontItalic = CommonDialog1.FontItalic
Form1.ForeColor = CommonDialog1.Color
Form1.FontSize = CommonDialog1.FontSize
Cls
Print str1
End Sub
Private Sub Form_Load()
Command1.Caption = "个人简历"
Command2.Caption = "家庭情况"
Command3.Caption = "字体"
str2 = "个人简历:" & vbCrLf & _
"姓名:XXX" & vbCrLf & _
"性别:男" & vbCrLf & _
"年龄:23" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:小学" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:初中学" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:高中" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:大学" & vbCrLf
str3 = "家庭情况:" & vbCrLf & _
"家庭成员:XXX" & vbCrLf
End Sub
Dim str1 As String, str2 As String, str3 As String
Private Sub Command1_Click()
str1 = str2
Cls
Print str1
End Sub
Private Sub Command2_Click()
str1 = str3
Cls
Print str1
End Sub
Private Sub Command3_Click()
CommonDialog1.Flags = cdlCFBoth Or cdlCFEffects
CommonDialog1.FontName = "宋体"
CommonDialog1.ShowFont
Form1.FontName = CommonDialog1.FontName
Form1.FontBold = CommonDialog1.FontBold
Form1.FontItalic = CommonDialog1.FontItalic
Form1.ForeColor = CommonDialog1.Color
Form1.FontSize = CommonDialog1.FontSize
Cls
Print str1
End Sub
Private Sub Form_Load()
Command1.Caption = "个人简历"
Command2.Caption = "家庭情况"
Command3.Caption = "字体"
str2 = "个人简历:" & vbCrLf & _
"姓名:XXX" & vbCrLf & _
"性别:男" & vbCrLf & _
"年龄:23" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:小学" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:初中学" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:高中" & vbCrLf & _
"xxxx年xx月至xxxx年xx月:大学" & vbCrLf
str3 = "家庭情况:" & vbCrLf & _
"家庭成员:XXX" & vbCrLf
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询