Hello guys,
I am having problems with adding items on the ListView in the other form. Maybe I didn't explain it well, but I attached an example, so please help me to solve that problem.
Thank you,
Nebo
Printable View
Hello guys,
I am having problems with adding items on the ListView in the other form. Maybe I didn't explain it well, but I attached an example, so please help me to solve that problem.
Thank you,
Nebo
Nebo_vb,
You may have more chance of assistance if you re-post the attachement as a winzip file, being a common zip utility.
Bruce.
I have WinRAR :D
First, add a module to the solution.
VB Code:
Module Module1 Public f1 As New Form1 Sub Main() Application.Run(f1) End Sub End Module
Form 1:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim forma2 As New Form2 forma2.Show() End Sub
Form 2:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ime As String ime = TextBox1.Text f1.ListView1.Items.Add(ime) Me.Close() End Sub
Bruce Fox, thanks for the advice! I attached the .zip file too.
mendhak, can you pleas modify my code and attach it. Or tell me where the solution is? :p
Quote:
Originally Posted by Nebo_vb
No, I've explained it perfectly. When I said "add a module to the solution", I meant, go into Solution Explorer and add a Module to your project.
Ok, I've added a module but it still doesn't work. :ehh:
Show your code.
What should I show? The code is like you told me, I guess... I attached it.
Ah yes... I'm sorry. I forgot to tell you this.
Click on the Project menu, click on WebApplication1 Properties.
Change the Startup Object to Sub Main.
And I replied late too, because I had forgotten to press Submit.
Whatever happened to psychic clicks? :afrog:
Ahh... Works now! Thanks guys! :thumb:
Quote:
Originally Posted by kulrom
Are you bosnian?
And what if I have more than just 2 forms like in the attachment ? :)
Alo, ja san iz Hrvatske. A ti ?
I'm from Croatia.
download the attachment I attached. It is the same thing, you just add items to form2. So, you start in Form1, ListView is in Form2 and you add items from Form3. Check it out and make it work please :)
E hvala ti! :)
Ja san iz Splita.
Aj molin te ako mozes, napisi kako da svakom dodanom itemu stavi neki image is image lista. Image list sam vec ubacio i stavio slike u njega.
Thanks dude! It really helped! :)
da, mogu se izrazit kako ocu. onako na engleski neznam pola izraza pa neznam kako ljudima objasnit sta me muci.
Napravi ti to u starome projektu, jer ionako samo experimentiran, nista posebno.
I stavija san te na ICQ listu (tvoj AOL screen name) ali ne prijavljuje nikad da si online.
Hickory Dickory Dock. The mouse ran up the clock!
Ma ok je, uspija san rijesit problem.
Nego, zasto te ne vidim na ICQ listi da si online?
p.s.
Aj ako mos rijesi onaj drugi problem u mom topicu "Adding attachments..."
nemojte koristiti ICQ! ICQ hoce da pojede vase bebe i siluje pse!