填空题
把窗体的KeyPreview属性设置为True,并编写如下两个事件过程: Private Sub For_KeyDown(KeyCode As Integer,Shift As Integer) Print KeyCode End Sub Private Sub Fora_KeyPress(Key Ascii AS Integer) Print Key Ascii。 End Sub 程序运行后,如果按下A键,则在窗体上输出的数值为
【12】
和
【13】
。
【参考答案】
[12] 65
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
标准模块和窗体模块的功能是计算和打印两个复数之和,在横线上填上适当内容。标准模块Type compre As Singleim As SingleEnd TypePublic c As comp窗体模块Private Sub Command1_Click( )Dim a As comp,b As compa.re=InputBox(“输入a的实部”)a.im=InputBox(“输入a的虚部”)b.re=tnputBox(“输入b的实部”)b.im=lnputBox(“输入b的虚部”)【6】 Print“c=”; c.re;“+”;c.im; i End Sub Private Sub s( 【7】 )C.re=r1.re+r2.rec.im=r1.im+r2.imEnd Sub
点击查看答案&解析
填空题
把一个磁盘文件的内容读到内存并在文本框中显示出来,然后把该文本框中的内容存人另一个磁盘文件,请填空完成程序。在窗体上建立一个文本框,在属性窗口中把该文本框的Muhiline属性设置为True,然后编写如下的事件过程: Private Sub Form_Click( )Open d: test smtext1.txt For lnput As#1Text1.Fontsize=14 Text1.FontName=“幼圆”Do While Not EOF(1)【8】 whole$=whole $ aspect $+Chr$(13)+Chr $(10)LoopText1.Text= 【9】 。CloseOpen d: test smtext2.txt For Output As#1Print #1 【10】 Close End Sub
点击查看答案&解析
相关试题
建立随机文件F1.DAT,存放职工姓名和编号...