Click here to Skip to main content
15,898,134 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Use binnary file instead MS Access Pin
Thomas Krojer20-Jun-11 2:55
Thomas Krojer20-Jun-11 2:55 
Question[VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom15-Jun-11 6:31
The Mighty Atom15-Jun-11 6:31 
AnswerRe: [VB10] Don't allow access to Form properties from Class Pin
Eddy Vluggen15-Jun-11 6:42
professionalEddy Vluggen15-Jun-11 6:42 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom15-Jun-11 7:11
The Mighty Atom15-Jun-11 7:11 
AnswerRe: [VB10] Don't allow access to Form properties from Class Pin
Eddy Vluggen15-Jun-11 8:57
professionalEddy Vluggen15-Jun-11 8:57 
AnswerRe: [VB10] Don't allow access to Form properties from Class Pin
Dave Kreskowiak15-Jun-11 8:13
mveDave Kreskowiak15-Jun-11 8:13 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom15-Jun-11 8:22
The Mighty Atom15-Jun-11 8:22 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
Dave Kreskowiak15-Jun-11 9:37
mveDave Kreskowiak15-Jun-11 9:37 
...sigh...

This would be your custom dialog form:
Friend Class MyDialogForm
    Inherits Form
    .
    .  yada, yada, yada
    .
End Class


Public Class MyDialog
    Implements IDisposable
 
    ' This keeps an instance of your dialog internal to
    ' this class, hiding EVERYTHING about it from the consumer.

    Private _dialogForm As New MyDialogForm
 
    ' Now you just have to give the consumer exactly the things
    ' you want to expose.

    Public Function ShowDialog() As DialogResult
        Return _dialogForm.ShowDialog()
    End Function
 
    ' You can expose any other properties you want.  You can even
    ' use the internal form object as a backing field for your
    ' properties, where appropriate.

    Public Property BackColor As Color
        Get
            Return _dialogForm.BackColor
        End Get
        Set(value as Color)
            _dialogForm.BackColor = Value
        End Set
    End Property

    ' A form shown with ShowDialog has to be Disposed when you're
    ' done with it, so in the Dispose code, just look for the line
    ' that says "TODO: dispose managed state (managed objects)." and
    ' put this line under it:
    _dialogForm.Dispose

End Class


To use the new dialog/wrapper, the consumer only has to create an instance of the wrapper class:
Dim d As New MyDialog
Dim result As DialogResult

result = d.ShowDialog()


GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
Eddy Vluggen15-Jun-11 9:10
professionalEddy Vluggen15-Jun-11 9:10 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
Dave Kreskowiak15-Jun-11 9:39
mveDave Kreskowiak15-Jun-11 9:39 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom15-Jun-11 11:47
The Mighty Atom15-Jun-11 11:47 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
Dave Kreskowiak15-Jun-11 12:22
mveDave Kreskowiak15-Jun-11 12:22 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom16-Jun-11 5:34
The Mighty Atom16-Jun-11 5:34 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
Dave Kreskowiak16-Jun-11 6:17
mveDave Kreskowiak16-Jun-11 6:17 
GeneralRe: [VB10] Don't allow access to Form properties from Class Pin
The Mighty Atom16-Jun-11 6:39
The Mighty Atom16-Jun-11 6:39 
QuestionFormatting a masked Text box Pin
Central_IT15-Jun-11 5:33
Central_IT15-Jun-11 5:33 
AnswerRe: Formatting a masked Text box Pin
Simon_Whale15-Jun-11 5:38
Simon_Whale15-Jun-11 5:38 
QuestionHow to Select item from datagridviewcomboboxcell Pin
Member 796162413-Jun-11 11:16
Member 796162413-Jun-11 11:16 
QuestionSelect item from datagridviewcomboboxcell Pin
Member 796162413-Jun-11 11:08
Member 796162413-Jun-11 11:08 
AnswerRe: Select item from datagridviewcomboboxcell Pin
Dalek Dave13-Jun-11 11:41
professionalDalek Dave13-Jun-11 11:41 
GeneralRe: Select item from datagridviewcomboboxcell Pin
phil.o13-Jun-11 11:46
professionalphil.o13-Jun-11 11:46 
Questioncopy file in vb.net Pin
faravani8-Jun-11 23:06
faravani8-Jun-11 23:06 
AnswerRe: copy file in vb.net PinPopular
Eddy Vluggen9-Jun-11 0:59
professionalEddy Vluggen9-Jun-11 0:59 
GeneralRe: copy file in vb.net Pin
Wayne Gaylard9-Jun-11 1:33
professionalWayne Gaylard9-Jun-11 1:33 
GeneralRe: copy file in vb.net Pin
Smithers-Jones9-Jun-11 3:31
Smithers-Jones9-Jun-11 3:31 

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.