Community
Public Property Let Filter(ByVal vData As String) ' Filters that the user can select in drowpdown combo ' Usage: Friendlyname1|*.ex1|Freindlyname2|*.ex2 etc. ' Default: "All Files (*.*)|*.*" Dim pipepos As String Do While InStr(vData, "|") > 0 pipepos = InStr(vData, "|") If pipepos > 0 Then vData = Left$(vData, pipepos - 1) & vbNullChar & Right$(vData, Len(vData) - pipepos) End If Loop If Right$(vData, 2) <> vbNullChar & vbNullChar Then vData = vData & vbNullChar If Right$(vData, 2) <> vbNullChar & vbNullChar Then vData = vData & vbNullChar mvarFilter = vData End Property Public Property Get Filter() As String Dim nullpos As String Dim tempfilter As String tempfilter = mvarFilter Do While InStr(tempfilter, vbNullChar) > 0 nullpos = InStr(tempfilter, vbNullChar) If nullpos > 0 Then tempfilter = Left$(tempfilter, nullpos - 1) & vbNullChar & Right$(tempfilter, Len(tempfilter) - nullpos) End If Loop If Right$(tempfilter, 1) = "|" Then tempfilter = Left$(tempfilter, Len(tempfilter) - 1) If Right$(tempfilter, 1) = "|" Then tempfilter = Left$(tempfilter, Len(tempfilter) - 1) Filter = tempfilter End Property
can someone help me convert this from vba to vb.net?
i figured out the simple ones like from:
Public Property Let FileTitle(ByVal vData As String) ' The name of the file without path mvarFileTitle = vData End Property Public Property Get FileTitle() As String FileTitle = mvarFileTitle End Property to this: Public Property FileTitle As String ' The name of the file without path Get Return mvarFileTitle End Get Set(ByVal value As String) mvarFileTitle = value End Set End Property
thanks.