Click here to Skip to main content
16,021,687 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VS broke project Pin
MikeCO1025-Apr-23 3:08
MikeCO1025-Apr-23 3:08 
QuestionWatermark in Crystal report does not show Pin
Benniit17-Apr-23 16:34
Benniit17-Apr-23 16:34 
AnswerRe: Watermark in Crystal report does not show Pin
Eddy Vluggen17-Apr-23 23:20
professionalEddy Vluggen17-Apr-23 23:20 
QuestionCan ChatGPT be used to document VBA Code Pin
YSLGuru5-Apr-23 6:17
YSLGuru5-Apr-23 6:17 
AnswerRe: Can ChatGPT be used to document VBA Code Pin
jschell5-Apr-23 6:20
jschell5-Apr-23 6:20 
GeneralRe: Can ChatGPT be used to document VBA Code Pin
YSLGuru5-Apr-23 6:22
YSLGuru5-Apr-23 6:22 
AnswerRe: Can ChatGPT be used to document VBA Code Pin
Richard MacCutchan5-Apr-23 6:25
mveRichard MacCutchan5-Apr-23 6:25 
GeneralRe: Can ChatGPT be used to document VBA Code Pin
YSLGuru5-Apr-23 6:35
YSLGuru5-Apr-23 6:35 
GeneralRe: Can ChatGPT be used to document VBA Code Pin
Richard MacCutchan5-Apr-23 6:41
mveRichard MacCutchan5-Apr-23 6:41 
GeneralRe: Can ChatGPT be used to document VBA Code Pin
YSLGuru5-Apr-23 8:31
YSLGuru5-Apr-23 8:31 
AnswerRe: Can ChatGPT be used to document VBA Code Pin
YSLGuru5-Apr-23 6:37
YSLGuru5-Apr-23 6:37 
Questionvb.net - how do I add a row in a datagridview to an existing object? Pin
Member 130653743-Apr-23 21:54
Member 130653743-Apr-23 21:54 
AnswerRe: vb.net - how do I add a row in a datagridview to an existing object? Pin
Richard MacCutchan3-Apr-23 22:36
mveRichard MacCutchan3-Apr-23 22:36 
QuestionProperties on Custom Control Pin
robert1131-Mar-23 20:29
robert1131-Mar-23 20:29 
AnswerRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 0:05
mveRalf Meier1-Apr-23 0:05 
AnswerRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 0:13
mveRalf Meier1-Apr-23 0:13 
if you like to have it like the (for example) Location-Property then you have to create a seperate class which has all your custom Properties in it and this class will be one Property of your Control.
Here is an example for you ... I hope you will not have circumstances with my german descriptions ... Wink | ;)

<Category("Anzeige"), Description("Definition des Einheiten-Textes")>
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
ReadOnly Property Einheit As SpalteEinheitDefinition
    Get
        Return my_Unit
    End Get
End Property
WithEvents my_Unit As New SpalteEinheitDefinition With {.Text = "mm"}

Private Sub Einheit_Changed() Handles my_Unit.Changed

    ResizeElements()
    'Me.Invalidate()
End Sub


<TypeConverter(GetType(ExpandableObjectConverter))>
Public Class SpalteEinheitDefinition

    <Description("auszugebender Text")>
     <Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design", GetType(System.Drawing.Design.UITypeEditor))>
    Property Text As String
        Get
            Return my_Text
        End Get
        Set(ByVal value As String)
            my_Text = value
            OnValueChanged()
        End Set
    End Property
    Private my_Text As String = ""

    <Description("Bestimmt die Ausrichtung des Textes im Control")>
    <DefaultValue(GetType(HorizontalAlignment), "Center")>
    Property TextAlign As HorizontalAlignment
        Get
            Return my_TextAlign
        End Get
        Set(ByVal value As HorizontalAlignment)
            If my_TextAlign <> value Then
                my_TextAlign = value
                OnValueChanged()
            End If
        End Set
    End Property
    Private my_TextAlign As HorizontalAlignment = HorizontalAlignment.Center

    <Description("gibt die Seiten-Abstände im Inneren des Controls an")>
    <DefaultValue(GetType(Padding), "2,0,2,0")>
    Property Padding As Padding
        Get
            Return my_Padding
        End Get
        Set(ByVal value As Padding)
            my_Padding = value
            OnValueChanged()
        End Set
    End Property
    Private my_Padding As New Padding(2, 0, 2, 0)


    Private Sub OnValueChanged()
        RaiseEvent Changed()
    End Sub

    Public Event Changed()


    'Sub New()
    'OnValueChanged()
    'End Sub


    Overrides Function toString() As String
        Return "<" & Text & ">"
    End Function

End Class


modified 1-Apr-23 6:23am.

GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 9:33
robert111-Apr-23 9:33 
AnswerRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 10:16
mveRalf Meier1-Apr-23 10:16 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 12:05
robert111-Apr-23 12:05 
GeneralRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 22:46
mveRalf Meier1-Apr-23 22:46 
AnswerRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 23:29
mveRalf Meier1-Apr-23 23:29 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 2:15
robert112-Apr-23 2:15 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 2:20
mveRalf Meier2-Apr-23 2:20 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 2:23
mveRalf Meier2-Apr-23 2:23 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 2:32
robert112-Apr-23 2:32 

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.