![]() |
|
[.NET] fill messagebox using combobox vb.net - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] fill messagebox using combobox vb.net (/showthread.php?tid=5574054) |
fill messagebox using combobox vb.net - adenfr - Mar 13, 2017 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 !!!! * - Owl - Mar 13, 2017 Set as data source from: ![]() Cast back to whatever type when showing message box. * - adenfr - Mar 13, 2017 (Mar 13, 2017 12:12 PM)Orka Wrote: Set as data source from: i have duplicates item in cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon)) and is not showing all the icons * - Owl - Mar 13, 2017 (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. * - adenfr - Mar 13, 2017 (Mar 13, 2017 01:31 PM)Orka 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 * - Owl - Mar 13, 2017 (Mar 13, 2017 01:36 PM)adenfr Wrote: i have duplicates item in cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon)) Working ok for me:
* - adenfr - Mar 13, 2017 (Mar 13, 2017 02:09 PM)Orka Wrote: Working ok for me: yes this is worked fine but i means MessageBoxIcon .. i have duplicate it item cmbtyap.DataSource = [Enum].GetValues(GetType(MessageBoxIcon)) |