home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2735
Discussions: 188,384, Posts: 2,243,507, Members: 232,615
Old November 20th, 2002, 08:54 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Sep 2002
Location: Shirley, New York
Posts: 256
Send a message via AIM to Paluccie
Should be A simple for all your VB People out there

Ok I have 2 picture boxes... One contains a list from a file.. the other when the run box is click has to take from a Text Box the item and search for it in the file and print it out in the other picture box..

Ex.
Picture Box #1 will contain the items searched
Picture Box #2 contains items from file.

Txt box = coffee

Picture box 1 - Displays Coffee $4.95

If any one knows how i can do this... please get back to me ASAP.. my project is due 2-morrow.. Thank you

to download the project
www.pjcassociates.com/assignment5.zip

THANK YOU!!!!!

Paluccie is offline   Reply With Quote
Old November 20th, 2002, 10:25 PM     #2 (permalink)
Member
 
Join Date: Sep 2002
Location: Shirley, New York
Posts: 256
Send a message via AIM to Paluccie
Ok maybe this may help some more.... The directions from my professor says

This part has two part to it, and uses two picture boxes. Construct and run a program that lets user find the price of something in stock. The items in stock are contained in a file created using NotePad. The user enters an item in the textbox, for which a price is wanted, then clicks the "Find Price" button. If the item is found (i.e., is in the file, it outputs to the picturebox the item and its price. If the item is not in the file, program outputs the item requested and "Not in stock". As a tool, the contents of the file can be viewed by clicking the button "Show File Contents".

Ok I don't know if that helps.. but if it does great.. Thanks Again for the help... I'm really puzzled.

Paluccie is offline   Reply With Quote
Old November 20th, 2002, 11:30 PM     #3 (permalink)
Member
 
Join Date: Sep 2002
Location: Shirley, New York
Posts: 256
Send a message via AIM to Paluccie
I guess i'm gonna be a loner on this one If someone knows how to do this, please help i'm in a bind... Alright.. I'm going back to trying this again.

Paluccie is offline   Reply With Quote
Old November 21st, 2002, 03:04 AM     #4 (permalink)
Member
 
Join Date: Sep 2002
Location: Shirley, New York
Posts: 256
Send a message via AIM to Paluccie
ok Maybe i should have made the subject a challenge for VB users. hehehe
Paluccie is offline   Reply With Quote
Old November 28th, 2002, 05:48 PM     #5 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,019
Code:
Private Sub cmdguess_Click()
    Dim Secret As Integer, Guessed As Integer, Count As Integer
    PicGuess.Cls
    ' you have an infinite loop of hell in here with this input box!
    Secret = Val(InputBox("Enter Number to be Guessed", "Secret Number"))
    Count = 0
    Do While Secret <> Guessed
    Guessed = Val(InputBox("Enter Your Guess", "Guess"))
        If Secret = Guessed Then
            PicGuess.Print "Done, it took you"; Count + 1; "tries, to guess"; Secret;
        ElseIf Secret > Guessed Then
            Count = Count + 1
            PicGuess.Print Count; Tab(10); Guessed; Tab(20); "Larger"
        ElseIf Secret < Guessed Then
            Count = Count + 1
            PicGuess.Print Count; Tab(10); Guessed; Tab(20); "Smaller"
        Else
            PicGuess.Print ""
        End If
    Loop
        
End Sub


Private Sub cmdprice_Click()
    Dim Items As String, Cost As String
     ' Loop through the file, and check if the "Items" = the value in the text box  ' Use UCase to make both sides upper case so the text is   ' insensitive to what case is input
        Open "D:\Temp\items.txt" For Input As #1
        Do Until EOF(1)
            Input #1, Items, Cost
            If UCase(Items) = UCase(txtitems.Text) Then
              PicPrice.Print Items, Cost
            End If
        Loop
     ' Close the file at the end or you'll get an error   ' that the file is already open everytime you hit the button
        Close #1

End Sub

Private Sub cmdshow_Click()
    Dim Items As String, Cost As String
     ' clear the picture box to reset it everytime   ' or it will simply scroll off the bottom and not be viewable
    PicFile.Cls
        Open "D:\Temp\items.txt" For Input As #1
        Do Until EOF(1)
            Input #1, Items, Cost
            PicFile.Print Items, Cost
        Loop
        Close #1
End Sub
We generally don't like to help solve a persons homework, but I'm guessing this was due awhile ago

I made comments in red.

It drives me INSANE that teachers are using a STUPID picture box to view text
POOOOOOOOOOOOOOR habit to get into as its NOT meant to view text!!!
arghhhhh
idiots lol
(I'm meaning that towards the people who write this stuff, not you the student... actually there was another person I helped with vb when she was taking classes and they used picture boxes as well )

Last edited by vass0922 : November 28th, 2002 at 05:51 PM.
vass0922 is offline   Reply With Quote
Old November 28th, 2002, 08:06 PM     #6 (permalink)
Member
 
Join Date: Sep 2002
Location: Shirley, New York
Posts: 256
Send a message via AIM to Paluccie
Thank you appreciate your help with this... my instructor does not know how to explain things... I had to go out and buy a different Visual Basic book just to help me with this class. Thanks again for the help.
Paluccie is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (2896)
CPU wont boot (5)
3-days in and no threads about Gaza (160)
The United States Debt (20)
I think I just killed my computer w.. (24)
hp compaq nc6000 problems (139)
Upgrading RAM (5)
Folderchat Weekday thread (442)
Antec 300 bulk purchase? (11)
Recent Discussions
HP notebook reinstall Vista NO .. (5)
Building a gaming computer advi.. (4)
hp compaq nc6000 problems (139)
Folderchat Weekday thread (442)
CPU wont boot (5)
Creative T-3000 Subwoofer (3)
ACPI controller halt on boot (2)
Worth the upgrade?? (15)
ADVICE (0)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 10:18 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28