Sinisterly
[save] Need some help saving listbox without showing save dialog [VB.NET] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [save] Need some help saving listbox without showing save dialog [VB.NET] (/Thread-save-Need-some-help-saving-listbox-without-showing-save-dialog-VB-NET)

Pages: 1 2


[save] Need some help saving listbox without showing save dialog [VB.NET] - FrostByte_mybb_import5923 - 01-19-2011

Thanks for first thing.

EDIT:

how can i save the contains of a listbox without save filedialog poping up???

i know hoe to do the other way


RE: Need some help with something [VB.NET] - 1234hotmaster - 01-19-2011



Removed. coder explained all and i had a mistake... X_X


RE: Need some help with something [VB.NET] - Coder-san - 01-19-2011

Code:
If ListBox1.Items.Contains(TextBox1.Text) = True Then process.start(TextBox1.Text)

I think this is what you are looking for.


RE: Need some help with something [VB.NET] - 1234hotmaster - 01-19-2011

coder's code is better then me. try his mine is Fa1lure X_X


RE: Need some help with something [VB.NET] - FrostByte_mybb_import5923 - 01-19-2011

(01-19-2011, 07:55 PM)Coder-san Wrote:
Code:
If ListBox1.Items.Contains(TextBox1.Text) = True Then process.start(TextBox1.Text)

I think this is what you are looking for.

that doesn't work im afraid don't know why, this problem has been annoying me for ages



RE: Need some help with something [VB.NET] - Coder-san - 01-19-2011

It assumes that you have the word chrome, and other application names added in the Listbox. Now when you enter "chrome" for example, it will look in the ListBox Items and if found it would start the Process.
I believe that is what you wanted.


RE: Need some help with something [VB.NET] - 1234hotmaster - 01-19-2011

! then try
Code:
If Listbox1.items.contains("Chrome") then
process.start("chrome")
elseif listbox1.items.contains("Firefox") then
process.start("firefox")
elseif listbox1.items.contains("Internet Explorer") then
process.start("iexplore")
end if

see if this works... Smile


RE: Need some help with something [VB.NET] - FrostByte_mybb_import5923 - 01-19-2011

(01-19-2011, 08:08 PM)Coder-san Wrote: It assumes that you have the word chrome, and other application names added in the Listbox. Now when you enter "chrome" for example, it will look in the ListBox Items and if found it would start the Process.
I believe that is what you wanted.

yer thats exactly it

looks in the listbox if it has chrome and textbox1 says chrome chrome is started


RE: Need some help with something [VB.NET] - Coder-san - 01-19-2011

(01-19-2011, 08:09 PM)frostbyte Wrote:
(01-19-2011, 08:08 PM)Coder-san Wrote: It assumes that you have the word chrome, and other application names added in the Listbox. Now when you enter "chrome" for example, it will look in the ListBox Items and if found it would start the Process.
I believe that is what you wanted.

yer thats exactly it

looks in the listbox if it has chrome and textbox1 says chrome chrome is started

That's exactly what the line of code does. You would just have to add the names in the ListBox first.


RE: Need some help with something [VB.NET] - FrostByte_mybb_import5923 - 01-19-2011

i seem to this i did it all right but i will give it another go just incase

yer it was my fail thanks so much you have helped me a lot