|
-
Jun 5th, 2004, 05:44 PM
#1
Thread Starter
Junior Member
PseudoCode
Hi guys,
I am new to programming and have never written Pseudocode before and need some help please.
How would you start writing a click event, a private sub and do you end with End Sub? What command words can I include?
Does anybody have some examples to show me?
What would I write for the following?
VB Code:
Private Sub Form_Load
txtdate = Date 'Disabling all text boxes
CboCustomerId.Enabled = False
TxtCustName.Enabled = False
TxtCustAddress.Enabled = False
TxtCustTelephone.Enabled = False
TxtCustHire.Enabled = False
CboVideoId.Enabled = False
TxtVideoTitle.Enabled = False
TxtVideoCopyNo.Enabled = False
TxtvideoStatus.Enabled = False
TxtHireDate.Enabled = False
TxtReturnDate.Enabled = False
TxtCharges.Enabled = False
End Sub
VB Code:
Private Sub cmdpreviouspage_Click()
frmmanagementoptions.Show 'Showing Management Options Form
Unload frmhiresbookingsreturns 'Close Hires Bookings Returns Form
End Sub
Thanks very much for any replies!
-
Jun 5th, 2004, 06:24 PM
#2
An example would be to draw a command button on a form then rename the button to some name, commonly starting with cmd for a command button i.e cmdStart, in the properties at the bottom right of the IDE. Then double click the button which will produce the code,
VB Code:
Private sub cmdStart_click()
End sub
And you add you actual code within this.
-
Jun 5th, 2004, 06:33 PM
#3
Thread Starter
Junior Member
Sorry Jmacp,
I probably wasnt clear enough. I have the code for the program. I need to know how to write it in plain english.
I need to write down every procedure in the program in pseudocode. Just dont really know how to start it. The examples above are actually from the program I need to write in pseudocode.
Thanks for your reply tho
-
Jun 5th, 2004, 06:44 PM
#4
Lively Member
To do that you could just be like
When cmdStart is clicked (event here eg. Open frmSecond)
Just say what everything does like that
-
Jun 5th, 2004, 06:47 PM
#5
Lively Member
For the code you put above you could do
When the form is loaded disable all text boxes
When cmdPreviousPage is clicked Show Management Options Form and Hide the Hires Bookings Returns Form
-
Jun 6th, 2004, 02:05 PM
#6
Frenzied Member
Don't get me wrong, but if you write code, you must know what it does. So commenting shouldn't be that hard of a task, would it?
-
Jun 6th, 2004, 02:34 PM
#7
The picture isn't missing
Shouldn't pseudocode be written BEFORE you start typing in the code so you can plan it?
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 6th, 2004, 06:25 PM
#8
Don't take this the wrong way, but my guess is that this is your homework/project and your trying reverse engineer someone elses code.
Bruce.
-
Jun 7th, 2004, 02:29 PM
#9
Thread Starter
Junior Member
Well.............. yes, it is a project
and............... no, its my code, ALL mine.
I am attending college nights classes and we had to write the program. I partly blame myself for not planning it properly, but I also blame the tutor for not making us do the documentation first because it would have made it alot easier and she would have known that.
All I wanted was for somebody to post some examples, just so I could see what it actually looked like and to see what command words I could use.
Anyway, I have done it now so no need to post..............
P.S. dont take that the wrong way.
-
Jun 7th, 2004, 03:36 PM
#10
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
|