Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 2nd, 2010, 08:51 AM
Registered User
 
Join Date: Oct 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to secret8701
Default how to write this program

Dim grade As String

Private Sub Compute_Click( )

grade=txtgrade.Text

Select Case grade

Case "A"
result.Caption="High Distinction"

Case "A-"
result.Caption="Distinction"

Case "B"
result.Caption="Credit"

Case "C"
result.Caption="Pass"

Case Else
result.Caption="Fail"

End Select

End Sub


i got this source code.but i don't know what general should i create.can anyone teach me?it is just need to create a command and a text?i try many time,really no idea.
 
Old October 2nd, 2010, 10:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

You need a button call Compute... and a label call result. Anyway if you can't figure that out from this code, you better get a beginner book.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
secret8701 (October 3rd, 2010)
 
Old October 2nd, 2010, 12:16 PM
Registered User
 
Join Date: Oct 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to secret8701
Default

Quote:
Originally Posted by gbianchi View Post
You need a button call Compute... and a label call result. Anyway if you can't figure that out from this code, you better get a beginner book.
hi gbianchi,yeah,i can do it.thanks you .and alos a textbox right?
 
Old October 2nd, 2010, 04:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Yeah named txtgrade
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old October 3rd, 2010, 12:11 AM
Registered User
 
Join Date: Oct 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via MSN to secret8701
Default

gbianchi thanks you.i done it





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write peer to peer file sharing program ethiosoul Visual Studio 2005 1 March 16th, 2008 05:02 PM
program won't write to file CNewbie Visual C++ 1 December 7th, 2004 06:20 PM
How to write program tht will run every day at 9 pallavijyo Pro VB Databases 1 December 3rd, 2004 06:45 PM
Write a program to produce a contents page eapsokha Java GUI 1 September 7th, 2004 11:19 AM
Write a vb program as services vincentc VB How-To 1 September 19th, 2003 08:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.