In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The editor will share with you how to use VB language to make a simple questionnaire. I hope you will get something after reading this article. Let's discuss it together.
I. case requirements
We need to make a simple questionnaire with the following requirements:
The 1.form1 form is the startup form, initializing the title to the questionnaire through the form initialization time.
two。 Make the form interface.
3. Click the upload button and the entered name will be output from the form2 form. Outputs the text of other selected controls to a form2 form.
The interface is as follows:
Interface 1
Interface 2
II. Knowledge requirements
The problem that may be encountered here is the transfer of data between different forms.
So, how to change the title of form2 in form1?
Form2.caption=, "here's what to change."
The use of symbols that need to be supplemented:
The function of the & symbol: to concatenate data of string type
; symbol: it is also a connection string and concatenates the print output of the next line
Question: how to center the form?
1. Select the form form
two。 Find StartUpPosition property in Properties Select 2-screen Center
Check box checkbox
Set text: caption property
Set whether to check: value property
The value of the value attribute: 0 means not selected, 1 indicates selected, and 2 indicates forced selection
Check box optionbutton
Set text: caption property
Determine whether the: value attribute is selected
The value of the value attribute: true: selected, false: unchecked
This section of knowledge form1 forms source code:
Private Sub Command1_Click () Form2.Show
Form2.Caption = Text2.Text & "the questionnaire"
Form2.Print "name:" & Text2.Text
'Dream
If Check1.Value = 1 Then Form2.Print "Dream:" & Check1.CaptionEnd If
If Check2.Value = 1 Then Form2.Print "Dream:" & Check2.CaptionEnd If
If Check3.Value = 1 Then Form2.Print "Dream:" & Text1.TextEnd If
Gender If Option1.Value = True Then Form2.Print "gender:" & Option1.Caption End If
If Option2.Value = True Then Form2.Print "gender:" & Option2.Caption End If
End Sub
Private Sub Form_Load () 'author: Liu Jinyu' initializes the form1 form title Form1.Caption = "questionnaire"
End Sub
After reading this article, I believe you have a certain understanding of "how to use VB language to make a simple questionnaire". If you want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.