以另一种形式获取列表框的选定项目 [英] get the selected item of listbox in another form

查看:71
本文介绍了以另一种形式获取列表框的选定项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从列表框中获取所选项目(从数据库中获取的项目)到另一个表单vb.net?

how to get the selected item from listbox(retrived items from database) to another form in vb.net?

推荐答案

具体方法取决于两种形式之间的关系:一种形式是另一种形式的孩子吗?或者他们都是第三种形式的孩子?

这里有一套提示描述过程:



在两种表格之间转移信息,第1部分:父母对孩子 [ ^ ] br />
在两种表格之间传递信息,第2部分:儿童到家长 [ ^ ]

在两种表格之间传递信息,第3部分:儿童与儿童 [ ^ ]



代码在C#中,但转换为VB应该很容易。
Exactly how you do it depends on the relationship between the two forms: Is one form the child of another? Or are they both children of a third form?
There are a set of tips here which describe the process:

Transferring information between two forms, Part 1: Parent to Child[^]
Transferring information between two forms, Part 2: Child to Parent[^]
Transferring information between two forms, Part 3: Child to Child[^]

The code is in C#, but it should be pretty easy to translate to VB.


这篇关于以另一种形式获取列表框的选定项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆