Mini Project help (just started Programming I)-VBForums
Results 1 to 25 of 25

Thread: Mini Project help (just started Programming I)

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Mini Project help (just started Programming I)

    I want to create a small application, that will help teach myself when to press what key in a certain instance in a game.....
    This is also so that I can learn a thing or two on how to create such an application.

    What I want is an application where after it starts, a random color of the 4 colors: Purple, Red, Brown and Blue appears in a picture box.
    In order to advance to the next random color of those 4 colors, I need to:

    if purple - Hold shift + mouse button 5
    if Red - Hold Ctrl + mouse button 5
    if Brown - hold shift + mouse button 4
    if blue - hold Ctrl + mouse button 4

    I need help understanding how to do this, and my class is taking FOREVER to progress from 1 lesson to the next..... anyways, if you have a solution, please write out the code, and what each block does....
    Thank You in Advance!

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    96,600

    Re: Mini Project help (just started Programming I)

    If you want to do something random then, in almost all cases, that involves using an instance of the Random class to generate a random number and then using that number in an application-specific way. In your case, you'd put the four Color values into an array and then use the random number as an index into that array to select a random Color. You can then assign that to the BackColor of a control to display it.

    You can then handle the MouseClick event of that control and test whether the correct key and mouse button combination was used. You'd probably start with a Select Case with four cases for the four possible random numbers generated previously, i.e. you'd have assigned the number generated to a variable and you can test that.

    The e.Button property in the event handler should tell you what button was pressed. I would assume that MouseButtons.XButton1 is your button 4 and MouseButtons.XButton2 is your mouse button 5.

    You can test the Control.Modifiers property to see which modifier keys are currently depressed. You'll be looking for Keys.Control or Keys.Shift.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Member
    Join Date
    Jul 2017
    Location
    Exeter, UK
    Posts
    45

    Re: MMO Combo Trainer - help needed!

    As you are just starting out, I suggest you add a picturebox and a button to a form, declare an integer variable called 'picColour'. Then in the button click event, check the value of 'picColour' and set the backcolour of the picturebox to one of the 4 colours e.g. 0 = Purple, 1 = Red etc. etc. Then increment picColour by 1, if it exceeds 3, reset it to 0.

    When that all works, review JMC's response to your original post to implement the mouse functions.

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    3,835

    Re: MMO Combo Trainer - help needed!

    You already asked this question in a different thread. I'm sorry if you didn't like JMC's answer but it was quite informative. The reason your class is going "super slow" is it wants you to be able to understand what JMC is saying. If you want to move more quickly, figure out what parts of his explanation you don't understand and ask questions about it.

    If what you REALLY want is for someone to write the application for you and post the code, you'll have to be more patient, and you might have to wait forever. That is "teaching you how to write it" the same way "going to McDonald's" would be "teaching you to cook".

    We aren't McDonald's. We can teach you how to toast a bun. We can teach you how to grill a patty. We can teach you how to squirt ketchup. If you come to us with a toasted bun and a grilled patty, but you say you can't quite figure out how to open the ketchup packet, we'll gladly help. Or if you ask us to show you how to do the bun. Or if you ask how to grill the patty.

    But if you say "teach me to make an entire hamburger" we respond, "Those cost $0.99."
    Nothing I post is production-ready. It is provided as-is, use it at your own risk.

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    30,841

    Re: Mini Project help (just started Programming I)

    Threads merged, as they really are the same question. One question per topic, please, otherwise answers get out of context.
    My usual boring signature: Nothing

  6. #6

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    I didn't mean to create 2 threads, I had just created this account, and after posting it I couldn't find it lol
    anyways, thanks for merging them helped me a LOT!

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Let me just focus for now on getting color randomize part done correctly.....

    Ok, I see that you want to use a button as clicker, instead of mouse, and that's okay for now... As long as I can go back to it later on and change that....
    Now this Is what I have done:

    Okay, I added comments to what I have done/what I understand of each line of code. Please guide me further!
    again, Thanks

    Name:  Capture.jpg
Views: 81
Size:  12.1 KB
    Name:  Capture1.jpg
Views: 81
Size:  14.2 KB

    dang! that really isn't legible..... here is what I did: ('| referenced my comments)

    'Modified 10/06/2017
    Code:
    Public Class Form1
        Dim Purple, red, Brown, Blue As String
    
        Private Sub colorButton_Click(sender As Object, e As EventArgs) Handles colorButton.Click
            Purple = Int(Rnd() * 255) '|
            red = Int(Rnd() * 255)    '| Apparently what I am supposed to do, but I some clarification on what specifically this is doing (is it even giving me purple, red, blue and
            Brown = Int(Rnd() * 255)  '| Brown as the color options?
            Blue = Int(Rnd() * 255)   '|
    
            Color.Purple = Int(1) '|
            Color.Red = Int(2)    '| My attempt at assigning a value to the colors I selected
            Color.Brown = Int(3)  '|
            Color.Blue = Int(4)   '|
    
    
            comboSelector.BackColor = Color.FromArgb(1, 2, 3, 4) '| I tried to use the integer value I assigned up there
    
            comboSelector.BackColor = Color.FromArgb(Purple, red, Brown, Blue) '| is this taking the values from the dimension string I created / from the integer value?
        End Sub
    
        Private Sub exitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click
            Close()
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
        End Sub
    End Class
    Last edited by Shaggy Hiker; Oct 6th, 2017 at 04:10 PM. Reason: Added CODE tags.

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: MMO Combo Trainer - help needed!

    Quote Originally Posted by Sitten Spynne View Post
    You already asked this question in a different thread. I'm sorry if you didn't like JMC's answer but it was quite informative. The reason your class is going "super slow" is it wants you to be able to understand what JMC is saying. If you want to move more quickly, figure out what parts of his explanation you don't understand and ask questions about it.

    If what you REALLY want is for someone to write the application for you and post the code, you'll have to be more patient, and you might have to wait forever. That is "teaching you how to write it" the same way "going to McDonald's" would be "teaching you to cook".

    We aren't McDonald's. We can teach you how to toast a bun. We can teach you how to grill a patty. We can teach you how to squirt ketchup. If you come to us with a toasted bun and a grilled patty, but you say you can't quite figure out how to open the ketchup packet, we'll gladly help. Or if you ask us to show you how to do the bun. Or if you ask how to grill the patty.

    But if you say "teach me to make an entire hamburger" we respond, "Those cost $0.99."
    I didn't mean to create 2 threads, I had just created this account, and after posting it I couldn't find it lol
    anyways, thanks for merging them helped me a LOT!

  9. #9
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,666

    Re: Mini Project help (just started Programming I)

    Wow... ok... let's take this a bit slower and go over your code line by line and understand what you're doing. Right now you're throwing wads of code at a wall and seeing if any stick, but you're just making a big jumbled mess. Also, use CODE tags to enclose your code-blocks.

    Ok, your first line:
    Code:
    Dim Purple, red, Brown, Blue As String
    This makes 4 variables. They are all Strings. Their names are "Purple", "red", "Brown" and "Blue" but they contain no data. The names of variables are just that, names. They have no meaning except to help remind you, the programmer what they should contain. If you wanted to assign them actual text, you'd need to do something like:
    Code:
    Dim purple As String = "Purple"
    Dim red As String = "Red"
    Dim brown As String = "Brown"
    Dim blue As String = "Blue"
    I don't think you even want to do this because there's no point to it, so for now, let's just delete that line out.

    As Jim mentioned, you need to make an Array. You probably want something like this:
    Code:
    Dim colors(3) As String
    color(0) = "Purple"
    color(1) = "Red"
    color(2) = "Brown"
    color(3) = "Blue"
    This makes an array called "color" and it has 4 "cells" in it, numbered 0 through 3 (all arrays start at 0).
    The first line tell it how big to make it (3)
    The next 4 lines assign a word of text to each "cell" in the array.

    Next, you need to make a random number maker:
    Code:
    Dim rand As New Random
    This makes a random number generator called "rand". You can use it to generate random numbers.... for example if you want a random number between 0 and 3, you just use "rand.Next(4)".
    So if I make another variable that is an integer:
    Code:
    Dim i As Integer
    I can assign it a random number:
    Code:
    i = rand.Next(4)
    ...and then, I can use that to pick one of the colors in the "colors" array:
    Code:
    MessageBox.Show(color(i))
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    30,841

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Mikestriken View Post
    I didn't mean to create 2 threads, I had just created this account, and after posting it I couldn't find it lol
    anyways, thanks for merging them helped me a LOT!
    There can be some oddities when you have less than something like 5 posts. However, you can use the Search tool to search on user name and find the thread pretty well. The search tool is a bit fiddly on some searches, so there are folks who prefer to use Google to search this site, but as long as you are searching on user name, the search tool will be the best approach.

    And, since I guess it's along the theme of my post: You have now seen how horrible screenshots look on the site. Things get distorted to the point that they are pretty nearly worthless in most cases. Posting code, as you have done, is certainly better. However, you can improve the appearance by pressing the # button and pasting the code between the resulting [CODE][/CODE] tags. Alternatively, you can paste the code, then highlight it and press the # button. Some folks prefer the VB button, as it does some coloring, as well, but it also adds line numbers, which can make copying difficult.
    Last edited by Shaggy Hiker; Oct 6th, 2017 at 04:13 PM.
    My usual boring signature: Nothing

  11. #11

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Jenner View Post
    Code:
    Dim colors(3) As String
    color(0) = "Purple"
    color(1) = "Red"
    color(2) = "Brown"
    color(3) = "Blue"
    shouldn't it be placed like this?
    Code:
    Dim colors(3) As String
    color(0) = color.Purple
    color(1) = color.Red
    color(2) = color.Brown
    color(3) = color.Blue

    anyways, so what I have revised from your explanation was the following:
    Code:
    'Modified 10/06/2017
    
    Public Class Form1
        Dim colors(3) As String
        color(0) = "Purple"
        color(1) = "Red"
        color(2) = "Brown"
        color(3) = "Blue"
    
        Dim rnd As New Random
    
        Private Sub colorButton_Click(sender As Object, e As EventArgs) Handles colorButton.Click
            comboSelector.BackColor = Color.FromArgb(rnd.Next(4))
        End Sub
    
        Private Sub exitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click
            Close()
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
        End Sub
    End Class
    The error I am currently getting is that in:
    Code:
        Dim colors(3) As String
        color(0) = "Purple"
        color(1) = "Red"
        color(2) = "Brown"
        color(3) = "Blue"
    color needs a "Declaration"

  12. #12
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,923

    Re: Mini Project help (just started Programming I)

    Well, you named the array "colors", so you can't refer to it as "color".

    Also, instead of being of type "String", since you want to store colors, it should be of type Color.
    Code:
    Dim colors(3) As Color
    colors(0) = color.Purple
    colors(1) = color.Red
    colors(2) = color.Brown
    colors(3) = color.Blue

  13. #13
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    96,600

    Re: Mini Project help (just started Programming I)

    In post #2 I said to put Color values into an array, not String values, so passel has the right of it there. Notice that I always (try to) use to actual names of types and members so Color with an upper-case "C" was no accident. You can also tell I wasn't just referring to colours in general because, as an Australian, I'll always put a "u" in "colour" whereas the Color type in .NET uses American spelling.

    I also said that you should use the random number that you generate as an index into that array to get a random Color value to assign to a BackColor property. Is that what you're doing here:
    vb.net Code:
    1. comboSelector.BackColor = Color.FromArgb(rnd.Next(4))
    I often tell people to write down the steps they need to perform first, then write code to implement those steps. That way, they always have something to refer back to to see whether their code is doping what it should. I've provided a first draft of the steps to perform and you have written code without referring back to those steps to see whether that code does what the steps say.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  14. #14

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    So then wait, do I place this:
    Code:
    comboSelector.BackColor = color.FromArgb(rnd.Next(4))
    in a directory (feel free to correct me, as to what the correct terminology here is) other than colorButton?

    I am also still getting the Declaration expected error for this now:
    Code:
        Dim colors(3) As Color
        colors(0) = color.Purple
        colors(1) = color.Red
        colors(2) = color.Brown
        colors(3) = color.Blue

  15. #15
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    96,600

    Re: Mini Project help (just started Programming I)

    We shouldn't really have to explain the basics of VB programming here. If you're asking a specific question then it should be sufficient for us to say that you need to create an array with four Color values in it. If you don't know how to create an array then you should research that.

    The code that you copied and pasted is fine as it is inside a method. If you want to declare the array variable outside of any method though, which you only really need to do if you need to access it in multiple methods, then go ahead and declare it outside of any method but, as the error message suggests, you can't put code that isn't part of a declaration there. The initialisation part of the code still needs to be inside a method, or else you need to find another way to initialise the array that can be part of the declaration. If you're only using the array in one method though, i.e. where you generate a random number and get the corresponding Color, then you may as well just declare and create the array in that method.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  16. #16
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,923

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Mikestriken View Post
    ...
    I need help understanding how to do this, and my class is taking FOREVER to progress from 1 lesson to the next..... ...
    Perhaps there is a reason the class is taking "FOREVER" to progress because they're trying to instill the basics of programming first and build up to writing a program using that basic knowledge as your toolbox.

    If the class seems to be slow progressing from one lesson to another, then perhaps you can accelerate your pace in learning those lessons but you can't skip them and jump to get to a point that you think may be interesting. If the lessons in your class are not structured in such a way that you can work through them on your own, then there are plenty of other tutorials online and you can start at the beginning of one or more of them and work through them.

    Generally, I'm mostly self taught in the area of software programming, but I've always tried to find multiple sources of tutorials about the subject I was trying to learn, and generally work through them in parallel, so I have a number of different views, and possibly approaches, to how things work. Often, there is some misinformation out there, and bad practices, so looking for multiple inputs rather than relying on only one voice helps weed those things out and strengthen you knowledge of the subject by seeing the same concept explained in several different ways . If one way of explaining a concept is a bit fuzzy, another person explaining the same subject from a slightly different perspective or with different wording or examples may make it click.

    Again, I would recommend working through some tutorials about VB.net programming and hopefully you will learn to enjoy the process of programming, not just the end result of your effort.

  17. #17

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Ahhh, I now understand thanks to how you worded my problem:
    I know i should focus on listening to my class, and I am doing that, but what's the harm in trying some stuff that is currently out of my league. Even if the program fails, at least I will gain some knowledge from my attempt!
    anyways, I will fix the error now that I know the problem.

  18. #18
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    30,841

    Re: Mini Project help (just started Programming I)

    Actually, I totally encourage you to try things that are currently out of your league. I've never taken a class in programming, and learned before the internet existed, so there weren't any tutorials. In fact, just a few months ago I threw out perhaps $1500 worth of programming books. I threw them away because they were so terribly out of date that they couldn't be of any use to anybody. I kept anything that was still correct, and some classics, such as Petzold's book on Windows Programming....largely out of date though it may be.

    The point is that lots of us learned by jumping in, and plenty of us encourage it. However, there are some things that are too basic to bother asking about. For example, pretty much every topic covered in this tutorial shouldn't be asked about:

    http://www.homeandlearn.co.uk/NET/vbNet.html

    The reason why it shouldn't be asked is a bit odd, but if you think about it, it kind of makes sense. The reason is that it is easy to write a beginner tutorial that takes you through things like syntax and some basic functionality. The reason these are fairly easy is because the set of things that need to be covered is pretty narrow. If you look at the topics in that tutorial, you can see that it's not HUGE. There are LOADS of books on beginning programming, and a goodly number of tutorials, as well. What you will not find is a book about intermediate programming, because once you get beyond the beginning topics, the number of topics EXPLODES. The basics of TCP is similar to, but not the same as, the basics for UDP, not very similar at all to the basics of serial port coding, and not even vaguely similar to the basics of database programming.

    So, once you get beyond the beginning tutorial, you will get into the specific things you need for a specific program, and the number of possible such things is not just HUGE, but slowly, steadily, growing. That's where this forum comes in. Those things that can be covered in a beginner tutorial or beginner book, are things you can do on your own, and which you WANT to do on your own. Don't wait for the class if you have any desire to pursue things. For some time, you'll want a tutorial (the one I linked to is pretty well regarded) on hand as a quick reference, even when you know what's in there. I keep a link to a RegEx tutorial, because I never remember the syntax for RegEx (a mini-language for parsing strings), and you'll be wanting to do the same thing.

    With that tutorial in hand, you already have the next piece: A project of some interest. And we can help with the rest.
    My usual boring signature: Nothing

  19. #19
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,923

    Re: Mini Project help (just started Programming I)

    <edit>Note this was typed as Shaggy responded so is echoing some of his thoughts<edit>

    Quote Originally Posted by Mikestriken View Post
    I want to create a small application, ... please write out the code, and what each block does....
    Not sure if you're familiar with the term Oxymoron, but the above two phrases are in that vein.
    When we see statements like that it isn't an open secret that we are not paid volunteers and chances are awful good that we think such request are from a poster that has a clearly misunderstood impression of what this forum is about. Some may think it seriously funny others that it is pretty ugly. My unbiased opinion is expanding or accelerating your learning experience is a fine goal, but it should probably follow a path that builds in a logical manner. Random learning is hard to gauge where the holes in your knowledge may be. Which is why working through tutorials at whatever pace you care to I think is a better approach. You can check off what you know as you go. You'll want the basics of any language (variable scope, types, operators, methods, conditional constructs, branching and looping constructs, etc.) first, and then branch off into areas of interest (i.e games, graphics, data bases, internet interaction, etc) with that common base of knowledge to support your efforts.
    Last edited by passel; Oct 7th, 2017 at 06:48 PM.

  20. #20

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Shaggy Hiker View Post
    Actually, I totally encourage you to try things that are currently out of your league. I've never taken a class in programming, and learned before the internet existed, so there weren't any tutorials. In fact, just a few months ago I threw out perhaps $1500 worth of programming books. I threw them away because they were so terribly out of date that they couldn't be of any use to anybody. I kept anything that was still correct, and some classics, such as Petzold's book on Windows Programming....largely out of date though it may be.

    The point is that lots of us learned by jumping in, and plenty of us encourage it. However, there are some things that are too basic to bother asking about. For example, pretty much every topic covered in this tutorial shouldn't be asked about:

    http://www.homeandlearn.co.uk/NET/vbNet.html

    The reason why it shouldn't be asked is a bit odd, but if you think about it, it kind of makes sense. The reason is that it is easy to write a beginner tutorial that takes you through things like syntax and some basic functionality. The reason these are fairly easy is because the set of things that need to be covered is pretty narrow. If you look at the topics in that tutorial, you can see that it's not HUGE. There are LOADS of books on beginning programming, and a goodly number of tutorials, as well. What you will not find is a book about intermediate programming, because once you get beyond the beginning topics, the number of topics EXPLODES. The basics of TCP is similar to, but not the same as, the basics for UDP, not very similar at all to the basics of serial port coding, and not even vaguely similar to the basics of database programming.

    So, once you get beyond the beginning tutorial, you will get into the specific things you need for a specific program, and the number of possible such things is not just HUGE, but slowly, steadily, growing. That's where this forum comes in. Those things that can be covered in a beginner tutorial or beginner book, are things you can do on your own, and which you WANT to do on your own. Don't wait for the class if you have any desire to pursue things. For some time, you'll want a tutorial (the one I linked to is pretty well regarded) on hand as a quick reference, even when you know what's in there. I keep a link to a RegEx tutorial, because I never remember the syntax for RegEx (a mini-language for parsing strings), and you'll be wanting to do the same thing.

    With that tutorial in hand, you already have the next piece: A project of some interest. And we can help with the rest.
    Thanks for the link, I will put my tiny project on hold until I have given at least most of it a complete look through, and I will keep what you have said in mind.



    Quote Originally Posted by passel View Post
    Not sure if you're familiar with the term Oxymoron
    lol

  21. #21
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    3,835

    Re: Mini Project help (just started Programming I)

    Keep in mind there are many different depths of "out of my league". I like to use math as the analogy.

    If you're in an arithmetic class and you're already bored with the basic operators, you can peek at algebra. It's "out of your league" since you haven't been taught yet, but if you know how the four basic operators work you know everything required to advance to algebra so there's no good reason to sit still.

    That is not true for trigonometry. If you are studying mathematics and decide to skip algebra to go straight to trigonometry, you will be completely lost. You are not prepared for trig because it requires a firm grasp of algebraic identities and manipulation of polynomials. This is "out of your league" to a high enough degree you should wait.

    That is why we like for you to show us your best attempt. Code. Not screenshots. We don't want to start talking about trigonometry and find out you haven't finished algebra. So we need to see how far you can get to see what you do know. That helps us waste the least time. I can't tell you how disappointing and frustrating it feels to post 20,000 words of tutorial only to be met with "Ha ha, I'm not that advanced a programmer, I'll just not do this project".

    If JMC's #2 doesn't make sense to you and you can't figure out what the code he's looking at means, then it's the "too out of your league" kind of answer. He did a great job answering the question, based on the wager that you were further along in your studies than it turns out is true. That's why everyone else was cautious: we made one bad assumption about your prerequisites and didn't want to make another.

    The errors you kept encountering are very indicative of "I haven't quite fully grasped the syntax yet". Please be assured I don't mean "you're stupid", even really smart people start here. It takes a long time to get used to the VB syntax, and after more than 10 years there's still some things that confuse me. But you can't make programs past a certain size until you know what it means when you get a "declaration expected" error and have a rough idea how to fix it.

    So definitely go at the tutorial. Since it's self-paced, you can go as slow or fast as you want. Once you're done, you'll know a little more, and might be able to have more success at your project!
    Nothing I post is production-ready. It is provided as-is, use it at your own risk.

  22. #22

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Sitten Spynne View Post
    Keep in mind there are many different depths of "out of my league". I like to use math as the analogy.

    If you're in an arithmetic class and you're already bored with the basic operators, you can peek at algebra. It's "out of your league" since you haven't been taught yet, but if you know how the four basic operators work you know everything required to advance to algebra so there's no good reason to sit still.

    That is not true for trigonometry. If you are studying mathematics and decide to skip algebra to go straight to trigonometry, you will be completely lost. You are not prepared for trig because it requires a firm grasp of algebraic identities and manipulation of polynomials. This is "out of your league" to a high enough degree you should wait.

    That is why we like for you to show us your best attempt. Code. Not screenshots. We don't want to start talking about trigonometry and find out you haven't finished algebra. So we need to see how far you can get to see what you do know. That helps us waste the least time. I can't tell you how disappointing and frustrating it feels to post 20,000 words of tutorial only to be met with "Ha ha, I'm not that advanced a programmer, I'll just not do this project".

    If JMC's #2 doesn't make sense to you and you can't figure out what the code he's looking at means, then it's the "too out of your league" kind of answer. He did a great job answering the question, based on the wager that you were further along in your studies than it turns out is true. That's why everyone else was cautious: we made one bad assumption about your prerequisites and didn't want to make another.

    The errors you kept encountering are very indicative of "I haven't quite fully grasped the syntax yet". Please be assured I don't mean "you're stupid", even really smart people start here. It takes a long time to get used to the VB syntax, and after more than 10 years there's still some things that confuse me. But you can't make programs past a certain size until you know what it means when you get a "declaration expected" error and have a rough idea how to fix it.

    So definitely go at the tutorial. Since it's self-paced, you can go as slow or fast as you want. Once you're done, you'll know a little more, and might be able to have more success at your project!
    Yeah, I did figure out what that meant, after the wording he used, but the problem w/ the program now is that, when pressing the button, nothing happens...

    Anyways, it doesn't matter for now atleast, as I plan to finish that site first, then come back here to figure out what I did wrong.

  23. #23
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    96,600

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Mikestriken View Post
    when pressing the button, nothing happens...
    Something happens. At the very least, the Click event is raised. If you have created a handler for that Click event then that handler will be executed too. Maybe you don't see what you expect to happen in the UI, but that doesn't mean that code isn't being executed and doing something. That's why you need to use the debugger. Place a breakpoint (F9) on the first line of the event handler and then step through the code to see what actually does happen. If you can't work out what's wrong simply by reading the code, which would be the majority of occasions, then the next step is almost always to debug it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  24. #24
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    3,923

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by Mikestriken View Post
    Thanks for the link, I will put my tiny project on hold until I have given at least most of it a complete look through, and I will keep what you have said in mind.
    ...
    I applaud that decision. But if you're in a hurry, I think I would work through section one rather quickly, then two through four at a reasonable pace so you're understanding what is covered, probably skip section five (menus and dialogs) for now, make sure you learn section six (debugging) well, and then section seven on arrays, then return and either debug your existing code or rewrite and debug it with the knowledge learned from those sections. After this program is finished, return to covering the rest of the tutorial, including the skip section five.

  25. #25

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    10

    Re: Mini Project help (just started Programming I)

    Quote Originally Posted by passel View Post
    I applaud that decision. But if you're in a hurry, I think I would work through section one rather quickly, then two through four at a reasonable pace so you're understanding what is covered, probably skip section five (menus and dialogs) for now, make sure you learn section six (debugging) well, and then section seven on arrays, then return and either debug your existing code or rewrite and debug it with the knowledge learned from those sections. After this program is finished, return to covering the rest of the tutorial, including the skip section five.
    You have no idea, how excited I got while I was reading your post lol

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.