Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deeply understand listindex in VB language

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

The editor today takes you to understand how to deeply understand listindex in the VB language. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about "how to understand listindex in VB language".

Listbox control

Listindex action

It can be used to observe that which item is currently selected, the first position is represented by 0, and the second position is represented by 1, similar to an array.

If it is not checked, List1.ListIndex returns-1

Note: List1.ListIndex =-1 triggers a click event

List attribute entry data wrap shortcut key

Ctrl+enter

Summary

1. You must practice on the computer to prove it.

2. Learn to debug the code and break the point.

3. Master the functions of listindex

4. pay attention to the training of logical thinking

Software interface design:

Source code sharing:

Dim f As Boolean'f indicates whether it can be selected, and the default mark is Dim lastindex As LongPrivate Sub Form_Load () List1.FontSize = 20.

End Sub

Private Sub List1_Click ()

If List1.ListIndex = lastindex And List1.ListIndex-1 And f = True Then List1.ListIndex =-1 f = False Else f = TrueEnd If

Lastindex = List1.ListIndex

End Sub

Thank you for your reading. The above is the whole content of "how to understand listindex in VB language". Friends who learn it, hurry up and do it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report