A few simple questions. :)

Discussion in 'Programming General' started by WoW Sucks, Nov 1, 2007.

A few simple questions. :)
  1. Unread #41 - Nov 12, 2007 at 11:46 AM
  2. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    @ Covey. This isn't for my assignment, this is just to help me learn. I only asked if you would help me do an assignment. Thanks for the help above :) Sorry that Jazz beat you too it.

    @ Jazz, as i said in the first post, i have to learn VB6 for my college work, and my teacher doesn't know VB, so i thought the best thing to do would be to come here and ask, and you all have kindly helped me, which i would also do for you if you needed anything. I asked for the highscored code because i was interested in how it worked, and to see if i could make a different version, an easier one to understand and it turned out that i couldn't but that's the only thing i havn't used.

    As for the things im making, its just a jumble of ideas which ive done as much as possible on (from help from this thread) which ive either decided not to do any more of because it won't benefit me, or ive gotten stuck and not thought it was worth asking here.

    I ALWAYS try to figure things out for myself and i only ask here if i have no idea at all (or some idea that i need fixing). The first few questions were asked because of my stupidity where i'd forgotten to add essential things to make the program compile such as speach marks.

    I don't want you to think im taking advantage, because im really not. Ill explain what i have to do for my school project if you'd like, to show that most of these questions havn't been asked because of it.

    Once again i appreciate the help but i don't think your answer to question 12 is what i needed. But ill try it anyway :p

    PS: I find this the easiest way for me to learn. :D


    ----------------------------------------------------------------------------

    EDIT: Ok this is an update to question 12:

    Im trying to make a tic tac toe game (well that's the American name) and i this is the code im using (yes its probably extremely nooby but i dnt care :))

    Code:
    Edited to shorten post.
    I need to make an if statement that looks to see if images\0.jpg or images\1.jpg has been loaded or not. Because i need to make it so, if you get 3 X's or 3 O's in a row, then it shows a message box.

    To start with i was going to use something like:

    Code:
     
    
    if picture1.picture = "images\0.jpg" and picture2.picture = "images\0.jpg" and  picture3.picture = "images\0.jpg" then
    
         msgbox "You have won"
    end if
    
    I was going to do that for each combination, which would be long winded, but the easiest way for me.

    :)
     
  3. Unread #42 - Nov 12, 2007 at 12:22 PM
  4. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    A few simple questions. :)

    Code:
    Private Sub Picture9_Click()
        If Option1.Value = True Then
            Picture9.Picture = LoadPicture("images\0.jpg")
            Line(9) = 0
            Picture9.Enabled = False
            Call player2
            Exit Sub
        End If
        
        If Option2.Value = True Then
            Picture9.Picture = LoadPicture("images\1.jpg")
            Line(9) = 1
            Picture9.Enabled = False
            Call player1
        End If
    End Sub
     
  5. Unread #43 - Nov 12, 2007 at 12:22 PM
  6. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    A few simple questions. :)

    How about just having a variable store that information. When you load the picture just set a value into that variable.

    Either have it as boolean where true would represent "x" and false "o" or vice versa. Or have it as a string or integer value and save values in it that would let you know whether your picture box loaded the "x" or the "o".

    EDIT: Ahhhhh Covey beat me by mere seconds and he posted source code. You win this round...:rolleyes:
     
  7. Unread #44 - Nov 12, 2007 at 2:07 PM
  8. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    Thanks Nullware + Covey. I used covey's idea and it worked :D

    <3
     
  9. Unread #45 - Nov 12, 2007 at 4:35 PM
  10. bojanglesman
    Joined:
    Nov 4, 2007
    Posts:
    32
    Referrals:
    0
    Sythe Gold:
    0

    bojanglesman Member

    A few simple questions. :)

    i said his moms dick fails just end this shit.

    -~=-~=~-~=-~=~ENDED-~=-~=~-~=-~=~(post not closed,this argument is)
     
  11. Unread #46 - Nov 12, 2007 at 5:44 PM
  12. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    A few simple questions. :)

    Ok the problem you are have with your tic tac toe is the following:

    You put
    Code:
    If box(1) And box(2) And box(3) = 2 Then
    When it should be
    Code:
    If box(1)=2 And box(2)=2 And box(3) = 2 Then
     
  13. Unread #47 - Nov 12, 2007 at 11:51 PM
  14. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    A few simple questions. :)

    Everyone > You.
    Noone likes you, please leave.
     
  15. Unread #48 - Nov 13, 2007 at 12:16 AM
  16. halojunkie
    Joined:
    Dec 17, 2005
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0

    halojunkie Active Member

    A few simple questions. :)

    Just put
    Code:
    exit sub
    after each choice
     
  17. Unread #49 - Nov 13, 2007 at 12:36 AM
  18. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    A few simple questions. :)

    Refer to:

    Apart from that, the following code will work, there is no need to exit the subroutine. (Bad coding practice)


    WøW §u¢ks: I have no problem helping you since you're not a 1 poster leecher asking for a whole project, just curious.

    Keep the questions coming (Make them a bit harder too)
     
  19. Unread #50 - Nov 13, 2007 at 3:18 AM
  20. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    haha thanks alot halojunkie and Jazz :)

    Ill test it when i get home from school. And maybe add more questions.
     
  21. Unread #51 - Nov 13, 2007 at 12:17 PM
  22. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    New question added.

    Its working better now. :)
     
  23. Unread #52 - Nov 13, 2007 at 12:31 PM
  24. Ti-Tronic
    Joined:
    Nov 2, 2007
    Posts:
    142
    Referrals:
    0
    Sythe Gold:
    0

    Ti-Tronic Active Member
    Banned

    A few simple questions. :)

    Nice, i'd help but it all seems to be covered.
     
  25. Unread #53 - Nov 13, 2007 at 1:29 PM
  26. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    A few simple questions. :)

    i dont know how to clear a picture box but to exit the program totally use "end"
     
  27. Unread #54 - Nov 13, 2007 at 1:30 PM
  28. 0wnedwithgaxe
    Joined:
    Jul 16, 2006
    Posts:
    919
    Referrals:
    0
    Sythe Gold:
    0

    0wnedwithgaxe Apprentice

    A few simple questions. :)

    Q16.
    Maybe use
    Worked for me.
    And maybe use the "End" command instead of the UnLoad Me.

    Sorry if it didin't help, I'm a beginner as well :)

    Edit://Ahh Covey got ahead of me -.-
     
  29. Unread #55 - Nov 13, 2007 at 1:36 PM
  30. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    Thanks, OWG and covey they worked. :D

    Now i have another problem =/
     
  31. Unread #56 - Nov 13, 2007 at 2:35 PM
  32. halojunkie
    Joined:
    Dec 17, 2005
    Posts:
    232
    Referrals:
    0
    Sythe Gold:
    0

    halojunkie Active Member

    A few simple questions. :)

    The only way I can think of to do that would be.
    Code:
    Shell App.Path & "/exename.exe
    
    End
    
    I'm on my phone so let me know if that gives you any errors.
     
  33. Unread #57 - Nov 13, 2007 at 2:55 PM
  34. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    hmmm it sort of works, but not exactly well.

    Ill wait until someone else posts. Thanks anyway :)
     
  35. Unread #58 - Nov 13, 2007 at 3:40 PM
  36. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    A few simple questions. :)

    If you need to start the whole program again to be able to start a new game it sounds like your program is not very ideally designed anyway and I would probably recommend some re-coding and re-analyzing. You should be able to start a new game with a command button or something that way clicking "OK" in your message box could just call that command button sub or whatever your new game trigger is.
     
  37. Unread #59 - Nov 13, 2007 at 3:48 PM
  38. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    A few simple questions. :)

    It's not very well coded, i know that. Its the only way i know how to do it though, so i don't really have any choice.

    Using a command button would be exactly the same as using a messagebox result, and it would give the same error.

    I might give up on this and start something new... Time to think of something else :)
     
  39. Unread #60 - Nov 13, 2007 at 5:18 PM
  40. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    A few simple questions. :)

    I'd ask you to post source....
     
< echo in C | Need tutor on Programming >

Users viewing this thread
1 guest


 
 
Adblock breaks this site