Results 1 to 3 of 3

Thread: Help new at VB in DarkBASIC Professional

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    2

    Help new at VB in DarkBASIC Professional

    I need to make a blue box top left of my screen with
    a number inside the color red. The number inside the box will be the input of the user and the output of the number should be squared the color red. I still also have not figured out yet how to complete the box with the line function.


    I understand I suppose to call the functions then create them. I am still
    not getting the correct results. This is what I have so far. Thank you for your help.

    cls
    Input "Enter a number you want squared: "; number

    cls
    Rem call the color function
    Red()
    Rem call the color function
    Drawbox()

    center text 200,200, str$ (SquareNumber(number))
    end

    function Red()
    color = rgb(0,255,255)
    ink color, 0
    endfunction color

    function Drawbox()
    line 0, 0, 439, 0
    line 0, 279, 0, 0
    line 439, 0, 439, 0
    line 0, 279, 0, 0
    endfunction Drawbox

    function SquareNumber(number)
    number = number * 2
    sleep 2000
    endfunction number

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help new at VB in DarkBASIC Professional

    Sorry, are you asking how to convert this code to VB.NET?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    2

    Re: Help new at VB in DarkBASIC Professional

    Hello,

    I was wondering if someone understands how to help me properly construct a code for what I had in my previous posting. I am trying to write that program; however I need some guidance to put in the proper coding for it.

    The code is written in my previous posting.

    Thanks and any help would be great.

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