Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a Favoriter [SOLVED]
#1
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 -->
#2
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
My Blog | My Setup | My Videos | Have a wonderful day.
#3
<!-- 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/112595932115...0939570242
#4
Alright heres what your gonna wanna do. first off
Code:
Public listbox as new listbox
Then, for step 1.
Code:
listbox1.items.add(text_title.text)
listbox.items.add(text_URL.text)

'Step 2/step3
listbox.selectedindex = listbox1.selectedindex
webbrowser.navigate(listbox.selecteditem)


'To delete
listbox.selectedindex = listbox1.selectedindex
listbox.items.remove(listbox.selecteditem)
listbox1.items.remove(listbox1.selecteditem)

I hope this somewhat helped!
My Blog | My Setup | My Videos | Have a wonderful day.
#5
<!-- 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
        Form1.ListBox1.Items.Add([text_title].text)
        Form1.listbox.Items.Add([text_URL].text)
    End Sub

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 <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin --> )
#6
For
Code:
Form1.ListBox1.Items.Add([text_title].text)
        Form1.listbox.Items.Add([text_URL].text)

You dont need the brackets. Text_title is simply a name of a textbox, and so is text_url
My Blog | My Setup | My Videos | Have a wonderful day.
#7
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)?
#8
This code should work for ya.
Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
  for each item in listbox1.items
   writer.write(item + vbNewLine)
  next
writer.close
writer.dispose
My Blog | My Setup | My Videos | Have a wonderful day.
#9
<!-- sConfusedhock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt="Confusedhock:" title="Shocked" /><!-- sConfusedhock: --> Whoops...
(99.5% done) - This is the last request!!!!!!!!
THE VERY LAST!

<!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> <!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> 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..........
#10
Alright this will load it from the .ini
Code:
Dim reader as new system.io.streamreader(my.application.info.directorypath + "/settings.ini")
dim split() as string = reader.readtoend.split(vbnewline)
for each entry in split
listbox1.items.add(entry)
next
reader.close
reader.dispose
Hope this is what you needed!
My Blog | My Setup | My Videos | Have a wonderful day.
#11
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 <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin --> <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->

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: -->
#12
Haha no problem at all. This forum is for helping people, not getting mad at them <!-- sTongue --><img src="{SMILIES_PATH}/icon_razz.gif" alt="Tongue" title="Razz" /><!-- sTongue --> When the form loads you can do this
Code:
listbox1.items.remove("")
listbox.items.remove("")
My Blog | My Setup | My Videos | Have a wonderful day.
#13
Code:
ListBox1.Items.Remove("")
<!-- sConfusedhock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt="Confusedhock:" title="Shocked" /><!-- sConfusedhock: --> This still doesn't work

Code:
ListBox.Items.Remove("")
<!-- sConfusedhock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt="Confusedhock:" title="Shocked" /><!-- sConfusedhock: --> This has an error.

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...
#14
Alright, I have found a solution <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->
Replace this :
Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
  for each item in listbox1.items
   writer.write(item + vbNewLine)
  next
writer.close
writer.dispose

With this..
Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
dim i as integer = 0  
do until i = listbox1.items.count - 1
listbox1.selectedindex = i
if i < listbox1.items.Ubound - 1 then
writer.write(listbox1.selecteditem + vbNewLine)
else
writer.write(listbox1.selecteditem)
end if
i = i + 1
next
writer.close
writer.dispose

Tell me how it goes! <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->
My Blog | My Setup | My Videos | Have a wonderful day.
#15
Code:
Do Until i = ListBox1.Items.Count - 1
<!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> It says that a "Do" solution must end with a ending "Loop". Shall I do that?

Code:
If i < ListBox1.Items.Ubound - 1 Then
<!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> It says that the word "Ubound" is not a member of System.Windows.Forms.Listbox.ObjectCollection

Code:
Next
<!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> It says that it need a matching "For" for this solution.

I hope that there is another solution to be thought of...
#16
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")
        Dim i As Integer = 0
        Do Until i = ListBox1.Items.Count
            ListBox1.SelectedIndex = i
            If i < ListBox1.Items.Count Then
                writer.Write(ListBox1.SelectedItem + vbNewLine)
            Else
                writer.Write(ListBox1.SelectedItem)
            End If
            i = i + 1
        Loop
        writer.Close()
        writer.Dispose()
My Blog | My Setup | My Videos | Have a wonderful day.
#17
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: -->
#18
This is the one brandon came with first

Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
  for each item in listbox1.items
   writer.write(item + vbNewLine)
  next
writer.close
writer.dispose

but i guess if remove this + vbnewline

Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
  for each item in listbox1.items
   writer.write(item)
  next
writer.close
writer.dispose

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
Website: <!-- m --><a class="postlink" href="http://www.PBAProductions.com">http://www.PBAProductions.com</a><!-- m -->
E-Mail: <!-- e --><a href="mailtoTongueatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer
[Image: 2hnx8av.jpg]
#19
You can't give up on this method! <!-- sTongue --><img src="{SMILIES_PATH}/icon_razz.gif" alt="Tongue" title="Razz" /><!-- sTongue -->
(Try this for saving the listbox)
Code:
Dim writer as new system.io.streamwriter(my.application.info.directorypath + "/settings.ini")
  for each item in listbox1.items
   writer.write(vbNewLine + item)
  next
writer.close
writer.dispose

Then when you load the listbox, say (Add this to your code)
Code:
Listbox1.items.removeat(0)
listbox.items.removeat(0)
I'm pretty sure this will work, sorry for all these troubles <!-- s:o --><img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->
My Blog | My Setup | My Videos | Have a wonderful day.
#20
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!


Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] MySQL Update Query - What am I doing wrong? kismetgerald 11 39,820 10-18-2012, 07:16 PM
Last Post: brandonio21
  Help with creating an INSERT statement using MySQL kismetgerald 4 15,777 08-30-2012, 03:03 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)