Results 1 to 13 of 13

Thread: Windows Forms

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    Windows Forms

    Does anyone know of a good resource to find syntax for creating Windows Forms in VB.Net? I want to build forms from code, without using VS.Net IDE.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    it is actually very simple

    create a class that inherits the Form obejct

    Code:
    Imports System.Windows.Forms
    
    Public Class myForm1
        Inherits Form
    
    
    End Class
    then declare controls you will use

    Code:
    Imports System.Windows.Forms
    
    Public Class myForm1
        Inherits Form
        
        Private myButton As New Button()
        Pfivate myText As Ne wTextBox()
    
    End Class
    finally build constructor called New and set each controls needed properties(Caption, size, colors, etc.) and add to the forms collection


    Code:
    Imports System.Windows.Forms
    
    Public Class myForm1
        Inherits Form
        
        Private myButton As New Button()
        Private myText As Ne wTextBox()
    
        Public Sub New()
            myButton.Text = "Click Me"
            myButton.Show()
            myText.Show()
            
            Controls.Add(myButton)
            Controls.add(myText)
        End Sub
    End Class
    Basically that is it.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Thanks that helped a lot just to see it. Do you know a reference I could use to see all the properties of each control like myButton.Text?
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    run wincv.exe (comes with framework)

    in the search box type the control name then select it from the list. you will then seed all properties/methods/events for it
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    I searched for wincv.exe but it can't find it?
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    it is part of the .net framework. just type wincv from the Run menu in the Start Menu
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    says can't find file wincv or one of its componenets
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    ??

    look in the program files\microsoft.net\frameworksdk\bin (unless you installed elsewhere)

    wincv.exe is supposed to be there
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    I cn't even find a path like that. The closest I see is C:\WINNT\Microsoft.NET\Framework
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  10. #10
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    hm..guess you just have the regular 21 meg redistrabutable. you need the SDK which has that as well as the command line compilers you need.

    http://msdn.microsoft.com/downloads/...mpositedoc.xml
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  11. #11

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Looks like I don't have the SDK installed, just the framework. I am downloading it now. Thanks for your help
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  12. #12
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    right at the same time..lol

    cool. Well when you isntall that, you should have that wincv.exe and the vbc.exe compiler
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  13. #13

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Thank you soo mush for your help
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

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