ImageVerifierCode 换一换
格式:DOC , 页数:16 ,大小:23.11KB ,
资源ID:2788406      下载积分:20 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.docduoduo.com/d-2788406.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(vb程序设计上机题目(VB programming topics).doc)为本站会员(dzzj200808)主动上传,道客多多仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知道客多多(发送邮件至docduoduo@163.com或直接QQ联系客服),我们立即给予删除!

vb程序设计上机题目(VB programming topics).doc

1、vb程序设计上机题目(VB programming topics)Forty-five1. basic operations (2 items, each item of 15 points, a total of 30 points)Note: the following “candidates folder“ are%USER%*Please according to the following questions of the design requirements of Visual Basic applications (including the interface and cod

2、e).(1) draw 1 image frames named Image1 on the form named Form1, which is titled “picture“The height is 2500 and the width is 2000. Please set the appropriate attribute through the attribute window and load it into the examinee directoryPicture file pic1.jpg, and make the picture adapt to the size o

3、f the image box (as shown).Be careful:Storage must be stored in the examinee folder, the project file named sjt1.vbp, the form file nameFor sjt1.frm.*(2) on the form named Form1, draw 1 text boxes named Text1, whose initial content is empty; and then the text box is emptyDraw 2 radio buttons, the na

4、mes are Option1, Option2, the titles are “participation“ and “no“Take the title of “Option1“ on the left of the radio button, as shown in the picture. When the program is running,Enter some text in Text1 (e.g., “match“) and click the Option1, then put the title on itEnter the front of the text (for

5、example, “participate in the contest“) and click the Option2, and then put the title on the lineEnter the back of the text (for example, “not participating in the competition“). Please write the appropriate event process to complete the aboveFunction.Be careful:When you save, save the file to the ex

6、aminee folder, the form file is called sjt2.frm, engineering documentThe piece is called sjt2.vbp. No variables are required in the program, and only one can be written in each eventSentence。analyse and comment onFirst a.:Create a form Form1, and set the Caption property of the form Form1 through th

7、e property window as “picture“. Click the Image control from the toolbox icon, then drag in the form of an image frame by Image1, the properties window set its Height property to 2500, the Width property is 2000, the Stretch property is True, and the Picture attribute add the candidates folder under

8、 the picture file pic1.jpg.Save the file as required and complete the question.Second a.:Create a new form Form1, click the TextBox control icon in the toolbox, and then drag out a text box Text1 on the form, through the window set its Text attribute is empty. Click the OptionButton control from the

9、 toolbox icon, then drag in the form of two radio buttons, Option1, Option2, the properties window set its Caption property is “in“, “out“, and the Alignment property of the Option1 radio button is set to 1-Right Justify.Open the code window and add the following codePrivate Sub Option1_Click ()Text

10、1.Text = Option1.Caption if Command2, call event Command2_Click, the process to label Label1 as the argument to the call the general process of ShowName, after the ShowName, in the form of the Label2 tag display “click the label control“.Open the code window, the modified code is as follows:Private

11、Sub Command1_Click ()Call ShowName (Command1)End SubPrivate Sub Label1_Click ()Call ShowName (Label1)End SubPrivate Sub ShowName (C As Control)If TypeOf C Is CommandButton ThenLabel2.Caption = “click“ and when the “object“ for the control of Left and Top respectively to control the left and top side

12、 and the left side of a form and the top edge of the relative distance.Problem solving method:The course of events for the Interval attribute Form_Load timer control set = 500; event Command1_Click to start the timer control Timer1; Command2_Click event process to stop the timer control Timer1; mobi

13、le Timer1_Timer is used to control the image of the course of events. Every time a timer event is executed, the picture moves from left to right 200, and the slider of the scrollbar moves along, that is to say, the picture and the scroll stick keep moving synchronously. The If statement to determine

14、 the right boundary, left boundary is completely out of form if it is greater than the form, left boundary width, namely If Picture1.LeftForm1.Width Then, the picture back to form the left edge of the picture, the left distance form the distance from the left border is 0.Open the code window, the mo

15、dified code is as follows:Private Sub Command2_Click ()Timer1.Enabled = FalseEnd SubPrivate Sub Form_Load ()Timer1.Interval = 500End SubPrivate Sub Timer1_Timer ()Picture1.Left = Picture1.Left + 200If Picture1.Left Form1.Width ThenPicture1.Left = 0End IfHScroll1.Value = Picture1.LeftEnd SubSave the

16、file as required to complete the question.3. comprehensive application (1 items, 30)Note: the following “candidates folder“ are%USER%Draw 1 text boxes on the form, called Text1 (display multiple lines), and then draw three command buttonsThe names of the buttons are Command1, Command2 and Command3,

17、respectively. The titles are “readings“ and “system“Save“ and “save“, as shown in the figure. The programs function is: click the “reading“ button, then the candidatesAll the English characters recorded in the in5.txt file are put into Text1 (multi line display)“Button“, find and count the English l

18、etters I, J, K, l, m, n (not case size) each outThe number of times; click the “save“ button, the letter I to n the number of occurrences of statistical results in turn to candidatesThe sequential file out5.txt in the directory.* attention:Storage must be stored in the examinee folder, the project f

19、ile named sjt5.vbp, the form file nameFor sjt5.frm.analyse and comment onThis paper mainly examines the operation of files and the processing of strings.1, Open statementThe Open statement is used to open or create a file:The name of the Open for access Access operating mode lock As # file number Le

20、n= record lengthParameter description:“Access mode“ refers to the input and output mode of the file, and can be one of the following operations:Output specifies the sequential output modeInput specifies the sequential input mode2, Input$function:Format: Input$(n, # document)The Input$function return

21、s a string of n characters read from the specified file. That is, it can read the specified number of characters from the data file.3, LOF functionThe LOF function returns the number of bytes allocated to the file (i.e. the length of the file).4, Print # statementUsed to write data to sequential fil

22、es. Grammar as:Print # document, Spc (n) |Tab (n) expression list; |. “The Spc (n) function is used to add n blanks at the current output position, and the Tab (n) function is used to write data in the n position.A semicolon indicates that the data that is subsequently written will be written at the

23、 end of the current data; the comma indicates a line break after the current data is written.5, Close statementUsed to close an open file. Grammar as:Close # file No.Open the code window, the “reading“, “Statistics“, “save“ button code is as follows:Option Base 1Dim a (6) As IntegerPrivate Sub Command1_Click ()Open App.Path Next IClose #1End SubSave the file as required to complete the question.

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报