• Log in or sign up for an account here: https://www.sythe.org/login

Installed vb 2005 - Confused.

Status
Not open for further replies.

Covey

Creator of EliteSwitch

Retired Sectional Moderator
Visual Basic Programmers
Joined
Sep 9, 2005
Sythe Gold
9
Messages
4,510
Age
17
Location
Fuckin' BAM!
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

what the hell does sender and e do?
thought u guys said vb6 and 2005 are basically the same, Its gonna take me ages to learn this from scratch :(

PS whats all this crap that appears in my code?:
Code:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.Button1 = New System.Windows.Forms.Button
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.Button1)
        Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(261, 190)
        Me.GroupBox1.TabIndex = 0
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "GroupBox1"
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(61, 35)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(75, 23)
        Me.Button1.TabIndex = 0
        Me.Button1.Text = "Button1"
        Me.Button1.UseVisualStyleBackColor = True
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(629, 296)
        Me.Controls.Add(Me.GroupBox1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents Button1 As System.Windows.Forms.Button
 
ignore everything form generated. It's basically what the form needs to work properly. No need to modify it in anyway.

And Explanation of Arguments:
Sender - I'm not even sure about the sender myself, lol. I'm pretty sure it's something that identifies what form or what application raised the event.
e - The event arguments. Some events have their own arguments that can be used for programming (very useful, trust me).
 
Sender - is what ever object send you to the function or sub
 
oh btw that is not crap, is part of the form Designer, things that vb6 never wanted you to see but that if you know what you are doing you can do great things with it.

also only if you import a form from an old version you will see this on the same file, if you create a new form in vs2005 the Designer code will be in a separated hidden file as well as form resources
 
i never said it was crap, but i doubt he needs to think about it now, since he's learning the basics.
 
nop you did not, he did :P and true you are 100 right he does need to know this for now to lear the basics, that is why i pointed out the fact that if you create the form on vs2005 directly all that code will be on a hidden file.


i never said it was crap, but i doubt he needs to think about it now, since he's learning the basics.
 
nop you did not, he did :P and true you are 100 right he does need to know this for now to lear the basics, that is why i pointed out the fact that if you create the form on vs2005 directly all that code will be on a hidden file.

i got that code from creating a new form in vb 2005 i didn't import anything i clicked on a few things it froze then that came up =\
 
"e" is usefull sometimes.

In textbox there is "e.keycode" etc.
In webbrowser "e.cancel" etc.
=)
 
i got that code from creating a new form in vb 2005 i didn't import anything i clicked on a few things it froze then that came up =\

there is a button on your toolbar of the solution explorere that displays the this hiden code, this code is on a separate file and is the code that generates the form deign, like speljohan you dont really need to think about this now, just simply click that button agan to hide this


Here i added a demo on how to show and hide files on you solution explorer

http://vs2005demos.bravehost.com/Showallfiles/ShowAllFiles.htm
 
Yer before i can actually start vb 2005 properly i gotta get some more RAM, my comp runs it pretty laggy and it jolts around when resizing forms etc. (I just ordered 1 gig of ram so i should be coding soon ^_^ )
 
Set your computer settings to "change for best performance" and run CCleaner, usually will speed you up some
 
I'm sure Covey would have found this useful a year ago...
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top