Creating a Favoriter [SOLVED] - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9) +----- Thread: Creating a Favoriter [SOLVED] (/showthread.php?tid=288) Pages:
1
2
|
Creating a Favoriter [SOLVED] - yjy1110 - 01-19-2011 I need help with coding with the link below. <!-- m --><a class="postlink" href="http://alltertainment.xtreemhost.com/Capture2%20copy.jpg">http://alltertainment.xtreemhost.com/Ca ... 20copy.jpg</a><!-- m --> Re: Creating a Favoriter - brandonio21 - 01-19-2011 It seems that the link is broken, < Ooops... It seems you have arrived here because of one of the below reasons: > * Forbidden * Access to a private or password protected folder was attempted Re: Creating a Favoriter - yjy1110 - 01-19-2011 <!-- s:? --><img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused" /><!-- s:? --> I wonder why that didn't work. Try this: http://picasaweb.google.com/112595932115941796941/Pictures#5563888180939570242 Re: Creating a Favoriter - brandonio21 - 01-19-2011 Alright heres what your gonna wanna do. first off Code: Public listbox as new listbox Code: listbox1.items.add(text_title.text) I hope this somewhat helped! Re: Creating a Favoriter - yjy1110 - 01-20-2011 <!-- s:? --><img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused" /><!-- s:? --> For Step 2, 3 and 4 worked, but step 1 didn't work. The coding that has the [ ] has an error in VB Express. Code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Not just that, I think you didn't tell me how to do the edit type... (I think you just copy the code and say replace in the coding) Thank you and good luck! (P.S. Ill upload it onto the Programs Topic <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> ) Re: Creating a Favoriter - brandonio21 - 01-20-2011 For Code: Form1.ListBox1.Items.Add([text_title].text) You dont need the brackets. Text_title is simply a name of a textbox, and so is text_url Re: Creating a Favoriter - yjy1110 - 01-20-2011 Now, I am 99% complete <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> . Just one more thing. How do I save the Items of the listbox to an ini (without the SaveFileDialog)? Re: Creating a Favoriter - brandonio21 - 01-20-2011 This code should work for ya. Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") Ooooooooooooooops................................ - yjy1110 - 01-21-2011 <!-- shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt="hock:" title="Shocked" /><!-- shock: --> Whoops... (99.5% done) - This is the last request!!!!!!!! THE VERY LAST! <!-- s --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="" title="Arrow" /><!-- s --> <!-- s --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="" title="Arrow" /><!-- s --> How to load up the items into the listbox? (when form1 is loaded). THE VERY LAST REQUEST!!!!!!!!!!!!! Thank you very much for helping me, though! My grandmoter wants me to make it and I needed some help so.......... Re: Creating a Favoriter - brandonio21 - 01-21-2011 Alright this will load it from the .ini Code: Dim reader as new system.io.streamreader(my.application.info.directorypath + "/settings.ini") TROUBLESHOOTING!!!!!! - yjy1110 - 01-21-2011 When I load every time, The list has an extra blank item in the list. Anything to fix that <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Also, Thank you VERY much for helping me make this. If you have been frusturated about me, I am sorry for that <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> I will put this in the "Share your programs" topic and check the "About..." link too! <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Re: Creating a Favoriter - brandonio21 - 01-22-2011 Haha no problem at all. This forum is for helping people, not getting mad at them <!-- s --><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!-- s --> When the form loads you can do this Code: listbox1.items.remove("") Re: TROUBLESHOOTING!!! - yjy1110 - 01-22-2011 Code: ListBox1.Items.Remove("") Code: ListBox.Items.Remove("") I tried checking the ini file and it seems to be having a "Enter" character. (Because I copied the character and when I pasted it, it just did a new line) How do I do ("") part as a enter? I tried and It turned into a error... Re: Creating a Favoriter - brandonio21 - 01-22-2011 Alright, I have found a solution <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s --> Replace this : Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") With this.. Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") Tell me how it goes! <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> Re: Creating a Favoriter - yjy1110 - 01-22-2011 Code: Do Until i = ListBox1.Items.Count - 1 Code: If i < ListBox1.Items.Ubound - 1 Then Code: Next I hope that there is another solution to be thought of... Re: Creating a Favoriter - brandonio21 - 01-22-2011 Alright, So I was totally mixed up with that previous coding. Sorry! Code: Dim writer As New System.IO.StreamWriter(My.Application.Info.DirectoryPath + "/settings.ini") Re: Creating a Favoriter - yjy1110 - 01-23-2011 Now this is a problem. It still doesn't work. What if I change the listbox to a new window of RadioButtons? If I could, can you give me the code? This is really getting me frusturated !! <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> Re: Creating a Favoriter - xolara - 01-23-2011 This is the one brandon came with first Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") but i guess if remove this + vbnewline Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") since its not needed becourse its a listbox once a new item is made it will automaticly do that and i think this is the reason of the blank field Re: Creating a Favoriter - brandonio21 - 01-23-2011 You can't give up on this method! <!-- s --><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!-- s --> (Try this for saving the listbox) Code: Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini") Then when you load the listbox, say (Add this to your code) Code: Listbox1.items.removeat(0) Re: Creating a Favoriter - yjy1110 - 01-23-2011 Code: ListBox.Items.removeat(0) Why do you put in ListBox1 and ListBox? Does ListBox mean like another number?? Also: THANK YOU VERY MUCH! Thanks for helping me, It finally worked! |