Recoil's Profile User Rating: -----

Reputation: 26 Craftsman
Group:
Active Members
Active Posts:
345 (0.14 per day)
Joined:
28-June 08
Profile Views:
5,833
Last Active:
User is offline Today, 09:17 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Nintendo
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Recoil has not set their status

Posts I've Made

  1. In Topic: Custom control with a collection

    Posted 10 May 2015

    I'm unable to edit my above post, maybe someone can merge this for me...

    I have determined that this is not possible in VB.NET with what I am trying to accomplish after 4 full days now of wasted time. While there are dozens of examples of doing this in C#, none of them will successfully convert in order to get an idea of how this is actually done.

    I have several options for a workaround:

    First is just recreating my entire control through the designer on my form, using the various controls involved, and shoving them in a flow layout panel. I can get the effect of a custom control by writing the entire thing our by hand and not reusing any of it.

    My second option is to draw each of the objects using GDI+, however, I would be unable to add separate controls to them, and would have to draw each and every one of them as well. I had started working on this and after the first 700 lines just to contain a collection of empty white squares I have decided that the effort is not worth the end result.

    My third, and final option that I am likely to go with, is to just quit trying to code as a hobby. It seems that regardless of how simple I put what I am trying to do, it is just not understood...and this is not just for this problem, but for nearly every problem I have posted. It is obvious that this is not my line of work, and my lack of proper terminology offends people, especially since they do not read my entire problem. Were I to simply ask "What do I need to lookup to do this..." I would be asked for my code, which has not been done because I have no clue how to do something. This is exactly why it has been 3 years since I worked on an application - I am just not smart enough for this.
  2. In Topic: Student Test Scores Form, Please help with arrays!

    Posted 9 May 2015

    I'm not sure how strict your instructor is regarding what students should actually have to do. When I was in school not everyone who was in the programming class was doing very well, so my instructor was fairly lax with her requirements for assignments.

    It appears that you are somewhere in the middle of the book with regards to what all the assignment wants you to do. Previous chapters will have assignments with basic tasks (i.e. check the value in a textbox, how to use a parallel array). These usually build up the the end of the chapter assignment, which uses most of what the chapter is about.

    You should probably put 1 sub to check for ALL the textboxes instead of trying to check the values 1-by-1. Copy and paste is not your friend, as you can see from your original question, because you tend to overlook things.

    Private Sub TextScoreVal_Validating(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles txt1.Validating, txt2.Validating, txt3.Validating ' more textboxes here...
    
            Dim field = DirectCast(sender, TextBox)
    
            If Not IsNumeric(field.Text) Or Val(field.Text) < 0 Or Val(field.Text) > 100 Then
                field.HideSelection = False
                field.SelectAll()
                MessageBox.Show("The value must be a number between 0 & 100.")
                e.Cancel = True
            End If
        End Sub
    
    


    This is actually fairly easy to do and easily found on the internet. Google "vb.net sub to check all text boxes", and the 5th link down brought me to this page because I don't remember how to do all this tedious stuff.

    As far as the remaining requirements you should check against the previous assignments and see if they correlate to what you have. If you try and get stuck on something, just come back and post your code on this thread so it will be easier to follow and you wont have to keep posting new questions on the same assignment :)/>
  3. In Topic: Array data setting to last position data in do while

    Posted 8 May 2015

    Can you post (in code tags) the readerratings.text and exactly what the output is?
  4. In Topic: Student Test Scores Form, Please help with arrays!

    Posted 8 May 2015

    Your problem is here:

    intList1 you are calculating for lblAvg1
    intList2 you are calculating for lblAvg2
    intList2 you are calculating for lblAvg3
    intList2 you are calculating for lblAvg4

    ' First Student Average
    
            intList1.AddRange(New Integer() {CInt(txtS11.Text), CInt(txtS12.Text), CInt(txtS13.Text), CInt(txtS14.Text), CInt(txtS15.Text)})
    
            lblAvg1.Text = intList1.Average.ToString
    
            ' Second Student Average
    
            intList2.AddRange(New Integer() {CInt(txtS21.Text), CInt(txtS22.Text), CInt(txtS23.Text), CInt(txtS24.Text), CInt(txtS25.Text)})
    
            lblAvg2.Text = intList2.Average.ToString
    
            ' Third Student Average
    
            intList2.AddRange(New Integer() {CInt(txtS31.Text), CInt(txtS32.Text), CInt(txtS33.Text), CInt(txtS34.Text), CInt(txtS35.Text)})
    
            lblAvg3.Text = intList3.Average.ToString
    
            ' Fourth Student Average
    
            intList2.AddRange(New Integer() {CInt(txtS41.Text), CInt(txtS42.Text), CInt(txtS43.Text), CInt(txtS44.Text), CInt(txtS45.Text)})
    
            lblAvg4.Text = intList4.Average.ToString
    
    


    If you would correct the intList #'s you will find that this code works fine for calculating averages.
  5. In Topic: Custom control with a collection

    Posted 8 May 2015

    I have worked through this by cramming bits and pieces of what I can find for examples to achieve a reusable control to add stuff to at design time.

    Spoiler


    This is all my code for it. Currently I am able to add a CustomPanel to the control during design time by selecting "Add CustomPanel" through the Tasks list on the control, and it will display in the control, and persist after run time.

    I am also able to add controls to a (Collection) in the properties window, and they persist in the list after run time, but they do not display in the control itself. When I add a panel from the control tasks it does not display in this collection list through the properties window.

    So I apparently have 2 lists that I am saving a collection of CustomPanels to, one that displays in the control, and one that doesn't.

    I am hoping someone familiar with making custom controls can browse through this and provide me with some insight on how to have just 1 collection of CustomPanels that will display in the control, as well as the list in the Properties window at design time.

    Additional notes about this post:
    Spoiler

My Information

Member Title:
D.I.C Regular
Age:
34 years old
Birthday:
August 21, 1980
Gender:
Location:
Tennessee
Interests:
Cake decorating
Martial Arts
RPG games
Years Programming:
3
Programming Languages:
VB.NET

Contact Information

E-mail:
Private
Website URL:
Website URL  http://
Yahoo:
Yahoo  taledus@yahoo.com

Friends

Comments

Recoil has no profile comments yet. Why not say hello?