What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Argh Visual Basic

Pages: (3): « First [ 1 ] 2 3 » Last »
Argh Visual Basic
Author: Message:
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. Argh Visual Basic
I'm stuck again.  I'm attempting to make something which displays timetables 1-12 .

So it would display like this

1 * 1 = 1    2 *1 = 1
1 * 2 =2     2 *2 = 2
1 * 3 =3     2 *3 = 6

Any sugguestions I've really had enough everything i try just breaks.

Its the second thing I'm struggling with :'(
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-03-2005 07:02 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Argh Visual Basic
The question/problem is to vague though. I could post the code to generate those tables, but it highly depends on exactly how you want to display them and where you want to display them...

In essence it will just be some simple nested FOR...NEXT loops.


It would be better if you attach your code, so it can be fixed in the way you need it.

This post was edited on 03-03-2005 at 07:37 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-03-2005 07:35 PM
Profile PM Find Quote Report
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. RE: Argh Visual Basic
K Cookie well I'll try and make some sense of it myself to make it sort of work before i even post it

[edit]  This is actually way harder than I thought , basically all I need to do is have all the times tables print to a form.  on the click of a command button.  I'm reading up on something called tabs at the moment I don't know if this is the way to go but it seems to look hopeful


This post was edited on 03-03-2005 at 07:44 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-03-2005 07:40 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Argh Visual Basic
In essence it would be something like:

code:
For TimesTable = 1 to 10
   For Number = 1 to 10
      Debug.Print Number & " x " & TimesTable & " = " & (Number * TimesTable)
   Next Number
Next TimesTable

;)
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-03-2005 07:44 PM
Profile PM Find Quote Report
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. RE: Argh Visual Basic
Well that worked :D

I'm sort of trying to teach myself Vb too fast I think and I keep falling over.

[edit]  Got it to print to a form now :D  Just need to tidy them into rows Any ideas [/edit]

code:
Private Sub cmdcalc_Click()


    Dim Timestable As Integer
    Dim Number As Integer

    For Timestable = 1 To 12
        For Number = 1 To 12
            frmTables.Print Number & " x " & Timestable & " = "; (Number * Timestable)
        Next Number
    Next Timestable
   
   
End Sub

Never ever did one think he would use that bbcode

This post was edited on 03-03-2005 at 07:57 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-03-2005 07:47 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Argh Visual Basic
to make it go into rows just add a vbcrlf like
code:
Private Sub cmdcalc_Click()


    Dim Timestable As Integer
    Dim Number As Integer

    For Timestable = 1 To 12
        For Number = 1 To 12
            frmTables.Print Number & " x " & Timestable & " = "; (Number * Timestable) & vbcrlf
        Next Number
    Next Timestable
   
   
End Sub
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
03-03-2005 08:09 PM
Profile E-Mail PM Web Find Quote Report
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. RE: Argh Visual Basic
That just spaced them out :S 

Thanks for the input its starting to look better :D

Right I think its got to be the tab command some how pushed into this :S

I'm getting there slowly

This post was edited on 03-03-2005 at 08:40 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-03-2005 08:19 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Argh Visual Basic
ah yea, i see what u mean, i just tested the code,  so u want each time table set in a new column? 
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
03-03-2005 08:41 PM
Profile E-Mail PM Web Find Quote Report
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. RE: Argh Visual Basic
quote:
Originally posted by Dempsey
ah yea, i see what u mean, i just tested the code,  so u want each time table set in a new column?


Yup :D

I've been coding for nearly 7 hours now on and off.  Its harder than it looks I dunno how major coders do it
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-03-2005 08:46 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Argh Visual Basic
once you get into it  its not too bad.  But about the columns, printing it onto the form i cant think of a way to put it in columns, not saying it cant be done, i just cant think how atm
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
03-03-2005 08:51 PM
Profile E-Mail PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On