Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

fill messagebox using combobox vb.net

hello there
im going to create messagebox genaratore and all is correct just i went to show test message using 2 textbox and 4 combobox and each combobox is contain of all proprietes of messagebox
so in my buttons i create this code but still not working

MessageBox.Show(txtstring.Text, txttitil.Text, cmbbutton.SelectedItem, cmbtyap.SelectedItem, cmbbutdefullt.SelectedItem, cmblayout.SelectedItem)

any help
it say i need to convert the selected items from integer to string !!!!
Set as data source from:
[Image: JBPmPuK.png]

Cast back to whatever type when showing message box.
(Mar 13, 2017 12:12 PM)Owl Wrote:  Set as data source from:
[Image: JBPmPuK.png]

Cast back to whatever type when showing message box.

i have duplicates item in cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon))
and is not showing all the icons
(Mar 13, 2017 12:35 PM)adenfr Wrote:  i don't understand you can you explain !!! im using vb.net

Set combobox data source to line above, cast selected item back to whatever type when calling messagebox.
(Mar 13, 2017 01:31 PM)Owl Wrote:  Set combobox data source to line above, cast selected item back to whatever type when calling messagebox.

i have duplicates item in cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon))
and is not showing all the icons
(Mar 13, 2017 01:36 PM)adenfr Wrote:  i have duplicates item in cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon))
and is not showing all the icons

Working ok for me:
[Image: byujPRO.png]
(Mar 13, 2017 02:09 PM)Owl Wrote:  Working ok for me:
[Image: byujPRO.png]

yes this is worked fine

but i means MessageBoxIcon .. i have duplicate it item
cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon))


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by blackcoder00Jan 30, 2021 10:24 PM 9 258 Jan 30, 2021 10:24 PM
Last Post: saltycracker
[Python] by uzolSep 4, 2020 10:06 PM 4 207 Sep 4, 2020 10:06 PM
Last Post: uzol
[Shell] by bat9hackMar 2, 2019 12:39 PM 1 248 Mar 2, 2019 12:39 PM
Last Post: hamid1615