Page 2 of 2 FirstFirst 12
Results 41 to 71 of 71

Thread: Visual Basic 1 code?

  1. #41
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    What I have for lines 710 to 890
    Code:
    Private Sub cmdDraw_Click()
    Dim I As Single
    Dim J As Single
    Dim X1 As Single
    Dim X2 As Single
    Dim Y1 As Single
    Dim Y2 As Single
    Dim lngC As Long
    Dim C As Long
    pic.ScaleMode = 3
    pic.Width = 12000
    pic.Height = 4700
    For I = 0 To 100
        lngC = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
        pic.Line (320, 90)-(310, 99), lngC
        pic.Line (310, 99)-(300, 100), lngC
        pic.Line (300, 100)-(310, 101), lngC
        pic.Line (310, 101)-(320, 110), lngC
        pic.Line (320, 110)-(322, 101), lngC
        pic.Line (322, 101)-(340, 100), lngC
        pic.Line (340, 100)-(322, 99), lngC
        pic.Line (322, 99)-(320, 90), lngC
    Next I
    For I = 101 To 309
        J = I / 3.3
        pic.Line (319 - I, 99 - J)-(320 + I, 100 + J), , B
    Next I
    For I = 0 To 100
        lngC = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
        pic.Line (320, 90)-(310, 99), lngC
        pic.Line (310, 99)-(300, 100), lngC
        pic.Line (300, 100)-(310, 101), lngC
        pic.Line (310, 101)-(320, 110), lngC
        pic.Line (320, 110)-(322, 101), lngC
        pic.Line (322, 101)-(340, 100), lngC
        pic.Line (340, 100)-(322, 99), lngC
        pic.Line (322, 99)-(320, 90), lngC
    Next I
    '
    ' All variables defined as Single except 'C' which is Long
    '
    For J = 1 To 100
        I = 3.2 * J
        'C = Rnd * 16 + 1
        C = RGB(CLng(255 * Rnd), CLng(255 * Rnd), CLng(255 * Rnd))
        X1 = (320 - I) + Rnd * I
        X2 = Rnd * I + 319
        Y1 = (100 - J) + Rnd * J
        Y2 = Rnd * J + 99
        pic.PSet (X1, Y1), C
        pic.PSet (X2, Y2), C
        pic.PSet (X1, Y2), C
        pic.PSet (X2, Y1), C
    Next J
    End Sub
    
    Private Sub Form_Load()
    Randomize
    End Sub
    I suspect there should be some sort of 'delay' or 'refresh' as I suspect the inner 'box' should flash or something. The outer 'I' loops look redundant unless the processor this was running on was 'really' slow (which by today's standards it probably was)

  2. #42
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Visual Basic 1 code?

    Didn't someone post a picture of all the code?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #43

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    Yes, but I as-well as the one posting the picture removed it so that other people in the contest wouldn't find it. But we won't mind PM'ing it to anyone who asks.

    I don't know any of visual basic, and my "quest" is to find the original code as it is shown.

  4. #44
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    If you'd like to PM me the code I'd be grateful (my eyes are nearly 62 years old so it's a struggle looking at the Video!)

  5. #45

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    I'v been looking a bit at QBasic and "fixing" my code a bit. The only thing I'm not sure is that the video has "nummering" on each line. But I haven't really seen that that is used in qBasic? Also can you use the ":"-"command" in Qbasic to act as a next line?
    Also, PSET is used at the end of a line command. For example:
    Code:
     LINE(319-J,99-I)-(320+J,100+I),PSET,C,D
    Does someone know if that makes sense in QBasic, and what it would do?

  6. #46
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Visual Basic 1 code?

    Quote Originally Posted by stefan bauwens View Post
    Does someone know if that makes sense in QBasic, and what it would do?
    Well QuickBasic can't compile it:-
    Name:  PSET.png
Views: 424
Size:  45.4 KB
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  7. #47
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Visual Basic 1 code?

    Because its not QBasic, thats my point! Nobody listens to JR

    [EDIT]
    Told you it was an AppleIIc. Its gotta be AppleIIc BASIC. Just compare the 2 images:




    The AppleIIc was the very first computer I ever used since I was 2 years old. I didnt start programming in it until I got older. Although the Amiga 500 was the first computer I ever coded on using Amiga BASIC. Unless of course it was one of the first IBM home computers called Sigcis cause it looks a lot like these which are the same computer shot at different angles:



  8. #48
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    Quote Originally Posted by Jacob Roman View Post
    Its AppleIIc BASIC
    Not with a 'LINE' statement of the format we're looking at. (I can't see a 'LINE' statement in the AppleIIc Basic Language)

  9. #49
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Visual Basic 1 code?

    Well forget Apple cause that IBM Sigcis looks a hell of a lot like the DBZ image. The only difference is that the computer is mirrored, so the black area where the floppy drives are swapped with the actual computer.

  10. #50
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    I've had a look at all the (easily searchable for) Basic Languages on the Internet and can't find a LINE statement like the one being used in the code.
    The most common is:

    LINE (Position1 - Position2),[Colour], [Box/Box Fill]

    there are also a couple I've seen that look like

    LINE (Position1 - Position2),[Colour],[Box/BoxFill],[Style]

    where 'Style' is a value indicating the type of line to be drawn (eg &HCCCC = B'1100110011001100' which would be a 'dotted line')

    Nowhere have I seen 'PSET' defined other than 'set the value of a Pixel' i.e. PSET(n, Colour)

    It looks as if the 'LINE' statement we're looking at is something like

    LINE (Position1 - Position2), ? ,Colour, ?? ,[???]

    where:

    '?' might be 'switch the pixels in the Line on' (PSET) or 'switch the pixels in the Line off' (PUNSET, perhaps),
    '??' Draw a Box
    '???' Haven't a clue (perhaps if there's a 'D' it Deletes whatever was there beofre drawing the line)

    The Comments like 'Flash' implies (to me) that perhaps something should be 'flashing' on the screen. This would perhaps require drawing something, undrawing it and then redrawing it which might explain some of the outer loops that don't appear to be doing anything except 'wasting time'.

    I also haven't come upon a native 'CONNECT' statement in any of the Basics I've looked at, so whatever language is being used, I suspect it has the ability to create named User Defined Functions. (I also suspect that 'RND16' is a User Defined Function)

    Making some assumptions I've come up with this in VB6 from the code so far seen (thanks for those who PMd me what they had)
    Code:
    Private Sub cmdDraw_Click()
    Dim I As Single
    Dim J As Single
    Dim X1 As Single
    Dim X2 As Single
    Dim Y1 As Single
    Dim Y2 As Single
    Dim Z As Integer
    Dim lngC As Long
    Dim C As Long
    pic.ScaleMode = 3
    pic.Width = 12000
    pic.Height = 4700
    For Z = 1 To 5
        For I = 0 To 50
            J = I + 2
            pic.Line (319 - J, 99 - I)-(320 + J, 100 + I), , B
        Next I
    Next Z
    For SS = 1 To 1000 Step 10
        For I = 0 To 310 Step SS
            J = I / 3.3
            pic.Line (319 - J, 99 - I)-(320 + J, 100 + I), , B
        Next I
    Next SS
    For I = 0 To 100
        J = I / 3.3
        pic.Line (319 - J, 99 - I)-(320 + J, 100 + I), , B
    Next I
        
    For I = 0 To 100
        lngC = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
        pic.Line (320, 90)-(318, 99), lngC
        pic.Line (318, 99)-(300, 100), lngC
        pic.Line (300, 100)-(318, 101), lngC
        pic.Line (318, 101)-(320, 110), lngC
        pic.Line (320, 110)-(322, 101), lngC
        pic.Line (322, 101)-(340, 100), lngC
        pic.Line (340, 100)-(322, 99), lngC
        pic.Line (322, 99)-(320, 90), lngC
    Next I
    For I = 101 To 309
        J = I / 3.3
        pic.Line (319 - I, 99 - J)-(320 + I, 100 + J), , B
    Next I
    For I = 0 To 100
        lngC = RGB(255 * Rnd, 255 * Rnd, 255 * Rnd)
        pic.Line (320, 90)-(318, 99), lngC
        pic.Line (318, 99)-(300, 100), lngC
        pic.Line (300, 100)-(318, 101), lngC
        pic.Line (318, 101)-(320, 110), lngC
        pic.Line (320, 110)-(322, 101), lngC
        pic.Line (322, 101)-(340, 100), lngC
        pic.Line (340, 100)-(322, 99), lngC
        pic.Line (322, 99)-(320, 90), lngC
    Next I
    For J = 1 To 100
        I = 3.2 * J
        'C = Rnd * 16 + 1
        C = RGB(CLng(255 * Rnd), CLng(255 * Rnd), CLng(255 * Rnd))
        X1 = (320 - I) + Rnd * I
        X2 = Rnd * I + 319
        Y1 = (100 - J) + Rnd * J
        Y2 = Rnd * J + 99
        pic.PSet (X1, Y1), C
        pic.PSet (X2, Y2), C
        pic.PSet (X1, Y2), C
        pic.PSet (X2, Y1), C
    Next J
    End Sub
    
    Private Sub Form_Load()
    Randomize
    End Sub
    Using a bit (or perhaps a lot) of imagination you might be looking at a 'gun sight' with the 'compressed 'star' shape' being in the centre of vision (i.e. the 'sight'), looking at a cluster of 'Stars'. So perhaps this is some sort of 'shoot them up in the Universe' game.

    I can't get my head round some of the loops. In particular the 'SS' loop with the value of 'SS' being the Step for the following 'I' loop. Once 'SS' gets to '311' the 'I' loop wont execute.

  11. #51
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Visual Basic 1 code?

    @Doogle,

    What is the output you get when you run the code? I end up with a black rectangle and the picture has been enlarged.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  12. #52
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Visual Basic 1 code?

    Just for information --> http://en.wikipedia.org/wiki/QuickBASIC
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  13. #53
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Visual Basic 1 code?

    Thread moved to the General Developer Forum.

  14. #54
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    I wonder whether this Thread would be better suited to the 'Other Basic' Forum. There may be some members there that recognise the 'strain'

  15. #55

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    Thanks for the efforts, people.

    Also, I think it should be RND*6 instead of RND16 .
    Doogle, I'll PM you my updated code.

    EDIT: What about GW-Basic? It seems to have the nummering, and is very similar to QBasic apparently.
    @Doogle: If you look here( http://hwiegman.home.xs4all.nl/gw-man/index.html ) at the LINE command could it be this we are looking for?
    Last edited by stefan bauwens; May 25th, 2013 at 03:51 PM.

  16. #56
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Visual Basic 1 code?

    Referring to post #51,

    I added

    vb Code:
    1. Dim SS As Single

    as well as a picture box called "pic".
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  17. #57

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    I've been looking still a bit further, and I came across Color Computer(Color Basic).
    And apparently it uses LINE like: LINE(X1,Y1)-(X2,Y2),PSET

    Does anyone know more about this language?

    Thanks

    EDIT: Wait, it isn't that. I'm pretty sure I found the real thing. I could PM those interested but I won't announce it openly so that other people of the contest don't see it.
    Last edited by stefan bauwens; May 27th, 2013 at 07:44 AM.

  18. #58
    New Member
    Join Date
    May 2013
    Posts
    11

    Re: Visual Basic 1 code?

    aww, thats not fair stefan..

  19. #59

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    It's very fair, since we both got a glance at each others codes. Also, I found it out alone so you can too.

  20. #60
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Visual Basic 1 code?

    As an interested bystander I'd like to see the original (just to see if it's convertable to VB)

  21. #61
    New Member
    Join Date
    May 2013
    Posts
    11

    Re: Visual Basic 1 code?

    Stefan it's totally fine . i will do the research myself, it only seems i can't finish the contest i'm going on internet-less vacation
    good luck stefan to win one of the prices, as far as i know there are not so much people trying to figure it out.

    and Doogle and the others thanks for the help (sorry Doogle, damn auto correct..)
    Last edited by Floris497; May 28th, 2013 at 03:34 AM.

  22. #62

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    Aw, that's too bad. :/
    You should e-mail what you have already since the contest doesn't require you to finish.

    Also, it's Doogle. :P

  23. #63

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    Hi, it's me again. I just want to tell you guys that I won!
    The results have been announced today, and I was the best.
    Here is the article, including the correct answers: http://tiplanet.org/forum/viewtopic....143942#p143942
    It's in french though, but Google Translate is good enough.

    Thanks all for the amazing help!

  24. #64
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Visual Basic 1 code?

    CONGRATS!!!! xD
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  25. #65
    New Member
    Join Date
    May 2013
    Posts
    11

    Re: Visual Basic 1 code?

    thats nice, i did'n got time to send mine, but i wish you luck with your calc, which one did you choose?
    and i didn't port my code, so i had to do a lot of work..

  26. #66

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    16

    Re: Visual Basic 1 code?

    Thanks guys. I chose for the TI-84 Plus Colour SE.

  27. #67
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Visual Basic 1 code?

    Did we ever solve which basic was used?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  28. #68
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Visual Basic 1 code?

    It was F-Basic
    ...F stands for Fujitsu
    ...it's a japanese flavor of MS Basic used to develop games
    Last edited by jggtz; Jun 18th, 2013 at 10:41 PM.
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  29. #69
    New Member
    Join Date
    May 2013
    Posts
    11

    Re: Visual Basic 1 code?

    ah cool, that was kind of obvious now i read it.

  30. #70
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Visual Basic 1 code?

    Quote Originally Posted by Nightwalker83 View Post
    @Niya,

    That looks like a joust (or whatever its called) used in the sport of the same name.
    Quote Originally Posted by stefan bauwens View Post
    It's a star stretched out.
    LOL... It looks like a fighter jet to me ... or ... ballerina(if you change Niya's code a bit)...
    Code:
    Private Sub Command1_Click()
        Picture1.AutoRedraw = True
        Picture1.ScaleMode = 3
        Picture1.Width = 6000
        Picture1.Height = 3000
        Picture1.Circle (295, 100), 3
        Picture1.Line (305, 100)-(305, 90)
        Picture1.Line (305, 90)-(300, 85)
        Picture1.Line (320, 90)-(310, 99)
        Picture1.Line (310, 99)-(300, 100)
        Picture1.Line (300, 100)-(310, 101)
        Picture1.Line (310, 101)-(320, 110)
        Picture1.Line (320, 110)-(322, 101)
        Picture1.Line (322, 101)-(340, 100)
        Picture1.Line (340, 100)-(322, 99)
        Picture1.Line (322, 99)-(320, 90)
        Picture1.Line (305, 110)-(305, 100)
        Picture1.Line (305, 110)-(300, 115)
    End Sub
    Name:  ballerina.jpg
Views: 204
Size:  1.6 KB

  31. #71
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Visual Basic 1 code?

    Quote Originally Posted by RhinoBull View Post
    LOL... It looks like a fighter jet to me ... or ... ballerina(if you change Niya's code a bit)...
    That seems like a good idea for a forum game, start with the code for a basic image such as the one Niya posted then see what you can create just by modifying the code a bit.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width