Click here to Skip to main content
15,891,184 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVb 6.0 youtube video downloader Pin
Nassimch23-Jan-13 8:24
Nassimch23-Jan-13 8:24 
AnswerRe: Vb 6.0 youtube video downloader Pin
Dave Kreskowiak23-Jan-13 11:17
mveDave Kreskowiak23-Jan-13 11:17 
QuestionHow to convert vb.net application to work online Pin
napolewn22-Jan-13 0:54
napolewn22-Jan-13 0:54 
AnswerRe: How to convert vb.net application to work online Pin
David Mujica22-Jan-13 3:03
David Mujica22-Jan-13 3:03 
QuestionHow to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev20-Jan-13 3:06
QuickBooksDev20-Jan-13 3:06 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen21-Jan-13 3:31
professionalEddy Vluggen21-Jan-13 3:31 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 5:28
QuickBooksDev21-Jan-13 5:28 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen21-Jan-13 5:43
professionalEddy Vluggen21-Jan-13 5:43 
QuickBooksDev wrote:
Modify what call.
"InitializeComponents". Don't modify it's contents.

QuickBooksDev wrote:
What is a Virtual or abstract method.
Aw, sorry for using C#-terminology; it's called "Overridable" in VB.NET.

QuickBooksDev wrote:
We have several programs with multiple forms that we need to do this on.

Can you please give concrete examples?
Take an empty form, and modify it like below;
VB.NET
Public Class BaseForm
    Sub New()
        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        InitializeVB6Handlers()
    End Sub

    Public Overridable Sub InitializeVB6Handlers()
        System.Windows.Forms.MessageBox.Show("Boo!")
    End Sub
End Class
Next, change your existing form to Inherit from the BaseForm like below;
VB.NET
Public Class Form1 : Inherits BaseForm
End Class
This would give you a method that's called when the form is constructed (just like InitializeComponents), and give you the option to override it's implementation for a specific form;
VB.NET
Public Class Form1 : Inherits BaseForm
    Public Overrides Sub InitializeVB6Handlers()
        'MyBase.InitializeVB6Handlers()
        System.Windows.Forms.MessageBox.Show("No Boo today")
    End Sub
End Class

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 6:49
QuickBooksDev21-Jan-13 6:49 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev22-Jan-13 0:21
QuickBooksDev22-Jan-13 0:21 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Eddy Vluggen22-Jan-13 2:21
professionalEddy Vluggen22-Jan-13 2:21 
AnswerRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
Mike Meinz21-Jan-13 8:16
Mike Meinz21-Jan-13 8:16 
GeneralRe: How to Extend the InitializeComponents to my code in VB2008/2010 Pin
QuickBooksDev21-Jan-13 9:38
QuickBooksDev21-Jan-13 9:38 
QuestionMS Graph in Access 2007 VBA Application Pin
satcomengineer19-Jan-13 7:48
satcomengineer19-Jan-13 7:48 
AnswerRe: MS Graph in Access 2007 VBA Application Pin
Eddy Vluggen20-Jan-13 2:38
professionalEddy Vluggen20-Jan-13 2:38 
Questionvb6.0 Pin
Barun sengupta18-Jan-13 21:39
Barun sengupta18-Jan-13 21:39 
AnswerRe: vb6.0 Pin
Eddy Vluggen20-Jan-13 2:36
professionalEddy Vluggen20-Jan-13 2:36 
QuestionDecoding USBSTOR Registry Entry in VB Pin
SantLou4017-Jan-13 16:06
SantLou4017-Jan-13 16:06 
AnswerRe: Decoding USBSTOR Registry Entry in VB Pin
ChandraRam17-Jan-13 20:03
ChandraRam17-Jan-13 20:03 
AnswerRe: Decoding USBSTOR Registry Entry in VB Pin
Alan N18-Jan-13 1:21
Alan N18-Jan-13 1:21 
GeneralRe: Decoding USBSTOR Registry Entry in VB Pin
SantLou4018-Jan-13 1:47
SantLou4018-Jan-13 1:47 
GeneralRe: Decoding USBSTOR Registry Entry in VB Pin
Alan N18-Jan-13 4:05
Alan N18-Jan-13 4:05 
JokeRe: Decoding USBSTOR Registry Entry in VB Pin
Jeffnogueira22-Jan-13 4:31
Jeffnogueira22-Jan-13 4:31 
QuestionVB.NET ReportViewer too many Page Breaks rendered Pin
SantLou4017-Jan-13 3:39
SantLou4017-Jan-13 3:39 
AnswerRe: VB.NET ReportViewer too many Page Breaks rendered Pin
ChandraRam17-Jan-13 20:04
ChandraRam17-Jan-13 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.