Apr 1st, 2005, 03:39 AM
#1
Thread Starter
Addicted Member
Adding items to the ListView of the other form[Resolved]
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
Attached Files
Last edited by Nebo_vb; Apr 3rd, 2005 at 04:00 AM .
Apr 1st, 2005, 03:59 AM
#2
Re: Adding items to the ListView of the other form
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.
Apr 1st, 2005, 04:01 AM
#3
Re: Adding items to the ListView of the other form
I have WinRAR
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
Apr 1st, 2005, 04:49 AM
#4
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
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?
Attached Files
Apr 1st, 2005, 04:50 AM
#5
Re: Adding items to the ListView of the other form
Originally Posted by
Nebo_vb
mendhak, can you pleas modify my code and attach it. Or tell me where the solution is?
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.
Apr 1st, 2005, 04:54 AM
#6
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
Ok, I've added a module but it still doesn't work.
Apr 1st, 2005, 05:12 AM
#7
Re: Adding items to the ListView of the other form
Apr 1st, 2005, 07:11 AM
#8
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
What should I show? The code is like you told me, I guess... I attached it.
Attached Files
Apr 1st, 2005, 07:25 AM
#9
Re: Adding items to the ListView of the other form
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.
Apr 1st, 2005, 07:26 AM
#10
Re: Adding items to the ListView of the other form
And I replied late too, because I had forgotten to press Submit.
Whatever happened to psychic clicks?
Apr 1st, 2005, 07:41 AM
#11
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
Ahh... Works now! Thanks guys!
Apr 1st, 2005, 07:52 AM
#12
Re: Adding items to the ListView of the other form
Originally Posted by
kulrom
Don't worry about that ... i already pointed out that credit is your!
btw, Nebo ... you still didn't tell me where are you from?
Odakle si?
Cheers
Are you bosnian?
Apr 1st, 2005, 07:56 AM
#13
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
And what if I have more than just 2 forms like in the attachment ?
Attached Files
Apr 1st, 2005, 07:58 AM
#14
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
Alo, ja san iz Hrvatske. A ti ?
I'm from Croatia.
Apr 1st, 2005, 12:58 PM
#15
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
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
Apr 1st, 2005, 04:21 PM
#16
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
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!
Apr 1st, 2005, 05:42 PM
#17
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form
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.
Apr 3rd, 2005, 12:47 AM
#18
Re: Adding items to the ListView of the other form
Hickory Dickory Dock. The mouse ran up the clock!
Apr 3rd, 2005, 09:37 AM
#19
Thread Starter
Addicted Member
Re: Adding items to the ListView of the other form[Resolved]
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..."
It has been said that something as
small as the flutter of a butterfly's
wing can ultimately cause a typhoon
halfway around the world...
Apr 3rd, 2005, 09:59 AM
#20
Re: Adding items to the ListView of the other form[Resolved]
nemojte koristiti ICQ! ICQ hoce da pojede vase bebe i siluje pse!
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width