CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Sep 2011
    Posts
    5

    Red face Need Help ASAP.... plz plz plz plz help me out

    i got mini project i need help asap there question as fallows


    design a form to create a mini game to color a picture created using shape control, use the timer to set the time duration to color the picture?

    plz plz plzz replay me this form design program plzz i need it asap plzz...

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Need Help ASAP.... plz plz plz plz help me out

    Seems like homework....

    Show us what code you have got, then, we take it from there

  3. #3
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Need Help ASAP.... plz plz plz plz help me out

    On how to use the timer you could look at the Bare Basics of the Timer Article here on CG..
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  4. #4
    Join Date
    Sep 2011
    Posts
    5

    Re: Need Help ASAP.... plz plz plz plz help me out

    they just show ur practical
    in which they use MDI form and ... there children

    i done that with 2 clock but teacher telling me make it wild 1 clock ..... can u tell me plzzz

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Need Help ASAP.... plz plz plz plz help me out

    You'll have to post the code, along with any problems. We won't WRITE it for you, but we can HELP YOU if there is a problem.
    Code:
    ' Use CODE TAGS like this
    '         So WE can read your code
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Sep 2011
    Posts
    5

    Re: Need Help ASAP.... plz plz plz plz help me out

    I this much but i geting error in

    lable1.Caption = Format$(Now, "ss") line which came in yellow color can u help me plzz


    Code:
    Dim a As Integer
    
    Private Sub Command1_Click()
    Timer1.Enabled = True
    
    
    End Sub
    
    Private Sub Command2_Click()
    Timer1.Enabled = False
    End Sub
    
    Private Sub Form_Load()
    Timer1.Enabled = False
    
    End Sub
    
    Private Sub Label1_Click()
    
    End Sub
    
    Private Sub Timer1_Timer()
    lable1.Caption = Format$(Now, "ss")
    a = Format$(Now, "ss")
    If (a Mod 2 = 0) Then
    Shape1.BackColor = vbRed
    Shape2.BackColor = vbBlue
    Else
    Shape1.BackColor = vbBlue
    Shape2.BackColor = vbRed
    End If
    
    End Sub

  7. #7
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need Help ASAP.... plz plz plz plz help me out

    lable1.Caption = Format$(Now, "ss")
    It would work much better if you spelled it correctly.
    Always use [code][/code] tags when posting code.

  8. #8
    Join Date
    Sep 2011
    Posts
    5

    Re: Need Help ASAP.... plz plz plz plz help me out

    it's just Blue and red ...... but i am want to switch them in rainbow color how to do that ?? can u tell me plzz... means which thing need to add in this coding

    Code:
    Code:
    Dim a As Integer
    
    Private Sub Command1_Click()
    Timer1.Enabled = True
    End Sub
    
    Private Sub Command2_Click()
    Timer1.Enabled = False
    End Sub
    
    Private Sub Form_Load()
    Timer1.Enabled = False
    End Sub
    
    Private Sub Timer1_Timer()
    Label1.Caption = Format$(Now, "ss")
    a = Format$(Now, "ss")
    If (a Mod 2 = 0) Then
    Shape1.BackColor = vbRed
    Shape2.BackColor = vbBlue
    Else
    Shape1.BackColor = vbBlue
    Shape2.BackColor = vbRed
    End If
    End Sub

  9. #9
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need Help ASAP.... plz plz plz plz help me out

    You would need to add more colors and change your code a bit where the mod() is used.

    example:
    Code:
    x=a mod(5)
    select case x
       Case 0
       Case 1
       Case 2
       Case 3
       Case 4
     End Select
    Put your colors under the proper case and you can get 5 different sets with the example above. Of course you can play with the values to make it more or less.
    Always use [code][/code] tags when posting code.

  10. #10
    Join Date
    Sep 2011
    Posts
    5

    Re: Need Help ASAP.... plz plz plz plz help me out

    hmmm i try but i didnt got... can u post that case along with coding .....

  11. #11
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need Help ASAP.... plz plz plz plz help me out

    No I am not coding it for you. Put your code to change colors in between the case statements. If you do not understand case statements then look it up and do a little reading on the subject so you can understand them better.
    Always use [code][/code] tags when posting code.

  12. #12
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Need Help ASAP.... plz plz plz plz help me out

    or Press F8 repeatedly, and the program will STEP one line at a time thru the code. It will go to the case statement that you use.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured