CameronOk's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
New Members
Active Posts:
14 (0.02 per day)
Joined:
26-August 12
Profile Views:
321
Last Active:
User is offline Apr 24 2013 12:38 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Who Cares
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Toyota
Dream Kudos:
0
Icon   CameronOk has not set their status

Posts I've Made

  1. In Topic: VB sequential file problem

    Posted 31 Aug 2012

    I ran into this same problem.

    File / http://stackoverflow...substring-error


    Sent from my Htcclay's SuperCM7 G2 using Tapatalk 2
  2. In Topic: Trying to create a New Form from a List(of Form)

    Posted 29 Aug 2012

    Bear with me on this, Im not fully versed in this language yet...
    I think it goes something like this though.

    I had list of Variable objects

    FormA = Variable Object

    Dim FormA As New Form1
    Dim FormB As New Form2
    Dim FormC As New Form3
    
    


    I used the constructor "New" to assign a type(Form1 in this case) to that Variable Object.

    So, FormA (the Object) as New (the Type)

    The problem was when I went through the list and found one of these Objects was disposed I could figure out how to construct a new one of the same type.

    Sure I could put...
    FormA = New Form 
    
    


    but that would have created just a new form and not the Type of form I needed (Form1 in this case)

    So this with the code above I can now cycle through the list and get the type of the disposed object which is the (Form1) and then I create a new form and cast its type to the type of the original Object.

    Pretty cool stuff.
  3. In Topic: Trying to create a New Form from a List(of Form)

    Posted 28 Aug 2012

    For any of those who were interested in this thread. This is what I was trying to do...

    Private Sub displayForm(ByVal aForm As Form)
    
        Dim indexOfCab As Integer = Cabinet.IndexOf(aForm)
        If indexOfCab <> -1 Then
    
            If aForm.IsDisposed Then
                aForm = CreateForm(aForm.GetType())
                Cabinet(indexOfCab) = aForm
            End If
    
            aForm.Show()
        End If
    
    End Sub
    
    Private Shared Function CreateForm(formType As Type) As Form
        Return CType(Activator.CreateInstance(formType), Form)
    End Function
    
    
    
  4. In Topic: Trying to create a New Form from a List(of Form)

    Posted 27 Aug 2012

    Thank you Modi, Adam and Lucky. I really appreciate the time you took to help.

    -Force be with you.
  5. In Topic: Trying to create a New Form from a List(of Form)

    Posted 27 Aug 2012

    This is exactly what I implemented this morning. I actually did more like this though.

    Create an Enum WizardForms...

    WizardForms Enum 
    
    Form1 = 1 
    Form2 = 2 
    Form3 = 3 
    ....
    End Enum 
    


    I created Tracks for the wizard to follow
    Dim Track1 as WizardPath = {1, 2, 6, 8} 
    Dim Track2 as WizardPath2 = {3, 6, 8}
    Dim Track3 as wizardPath3 = {1, 3, 6, 8} 
    
    

    Packed that into a list
    Dim WizList as List(of WizardForms) 
    
    For i as integer = 0 to Wizpath.length - 1
    WizList.Add(Wizpath(i))  
    next i 
    


    Then an enumerator...

    Dim Enumerator as IEnumerator = WizList.GetEnumerator() 
    
    

    Then the select Case

    Case 0 
    Form1.ShowDialog() 
    Select Case 
    "OK"
    Enumerator.MoveNext
    "Cancel"
    Enumerator.Current -= 1 
    "Abort" 
    Enumerator.Current = -1 
    end select 
    



    The program works... I know how to code around it. I just wanted to know if there is a way to create a new form for the index of the list. I see now though that this is clearly something not worth the trouble. Thank you for your help. I am retiring this concept for now.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Texas
Interests:
Hacking, Linux, Android, Visual Basic, Assembly, Networking, Arduino, General Electronics, Math
Programming Languages:
Android, Visual Basic.Net, Assembly, Processing, HTML, Bash Scripting.

Contact Information

E-mail:
Private

Friends

CameronOk hasn't added any friends yet.

Comments

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