如何计算从Combobox到Combobox的值 [英] How Do I Calculate Value From Combobox To Combobox
本文介绍了如何计算从Combobox到Combobox的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个组合框,它有一个月到十月。我想计算从第一个组合框到另一个组合框的选定月份
i have two combobox which is having month jan to dec. i want to calculate selected months from first combobox to another combobox
推荐答案
Dim FM As Integer = ComboBox1.SelectedIndex + 1
Dim SM As Integer = ComboBox2.SelectedIndex + 1
Dim Gap As Integer = CInt(Math.Abs(SM - FM))
MsgBox(Gap.ToString)
Dim FM As Integer = ComboBox1.SelectedIndex + 1
Dim SM As Integer = ComboBox2.SelectedIndex + 1
Dim Gap As Integer = CInt(Math.Abs(SM - FM))
MsgBox(Gap.ToString)
这篇关于如何计算从Combobox到Combobox的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文