Click here to Skip to main content
15,913,487 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: Calling a C# exe with argument from vb code. Pin
mark_me16-Jun-09 17:27
mark_me16-Jun-09 17:27 
AnswerRe: Calling a C# exe with argument from vb code. Pin
Luc Pattyn16-Jun-09 14:22
sitebuilderLuc Pattyn16-Jun-09 14:22 
GeneralRe: Calling a C# exe with argument from vb code. Pin
mark_me16-Jun-09 17:31
mark_me16-Jun-09 17:31 
GeneralRe: Calling a C# exe with argument from vb code. Pin
The Man from U.N.C.L.E.16-Jun-09 22:45
The Man from U.N.C.L.E.16-Jun-09 22:45 
GeneralRe: Calling a C# exe with argument from vb code. Pin
Jon_Boy17-Jun-09 6:58
Jon_Boy17-Jun-09 6:58 
QuestionMouse Location Pin
No-e16-Jun-09 10:23
No-e16-Jun-09 10:23 
AnswerRe: Mouse Location Pin
Henry Minute16-Jun-09 10:52
Henry Minute16-Jun-09 10:52 
GeneralRe: Mouse Location Pin
No-e17-Jun-09 2:03
No-e17-Jun-09 2:03 
QuestionWhat is the .Net equiv to this VB6 format statement Pin
Jon_Boy16-Jun-09 7:40
Jon_Boy16-Jun-09 7:40 
AnswerRe: What is the .Net equiv to this VB6 format statement Pin
The Man from U.N.C.L.E.16-Jun-09 7:42
The Man from U.N.C.L.E.16-Jun-09 7:42 
GeneralRe: What is the .Net equiv to this VB6 format statement Pin
Jon_Boy16-Jun-09 7:58
Jon_Boy16-Jun-09 7:58 
GeneralRe: What is the .Net equiv to this VB6 format statement Pin
The Man from U.N.C.L.E.16-Jun-09 8:04
The Man from U.N.C.L.E.16-Jun-09 8:04 
GeneralRe: What is the .Net equiv to this VB6 format statement Pin
Jon_Boy16-Jun-09 8:42
Jon_Boy16-Jun-09 8:42 
GeneralRe: What is the .Net equiv to this VB6 format statement Pin
Henry Minute16-Jun-09 8:50
Henry Minute16-Jun-09 8:50 
GeneralRe: What is the .Net equiv to this VB6 format statement Pin
Jon_Boy16-Jun-09 9:01
Jon_Boy16-Jun-09 9:01 
AnswerRe: What is the .Net equiv to this VB6 format statement Pin
The Man from U.N.C.L.E.16-Jun-09 22:40
The Man from U.N.C.L.E.16-Jun-09 22:40 
I have a much better solution, having slept on it. Use a System.ComponentModel.MaskedTextProvider. To make it easier wrap it up in a Class. e.g.

Public Class MaskFormater

    Private Sub New()
    End Sub

    Public Shared Function Format(ByVal input As String, ByVal mask As String) As String
        Dim maskProvider As New System.ComponentModel.MaskedTextProvider(mask)
        maskProvider.Add(input)
        Return maskProvider.ToDisplayString()
    End Function

End Class


This can then be used as follows:

'To get a @@-@@@@-@@
Dim h As String = "23snfg33"
Dim result As String = MaskFormater.Format(h, "aa-aaaa-aa")


For a list of available masking elements see the mask documentation on MSDN[^]">

If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk

GeneralRe: What is the .Net equiv to this VB6 format statement [modified] Pin
Jon_Boy17-Jun-09 6:05
Jon_Boy17-Jun-09 6:05 
QuestionForm Loading in VB .net [modified] Pin
No-e16-Jun-09 4:59
No-e16-Jun-09 4:59 
AnswerRe: Form Loading in VB .net [modified] Pin
dan!sh 16-Jun-09 5:34
professional dan!sh 16-Jun-09 5:34 
GeneralRe: Form Loading in VB .net Pin
Colin Angus Mackay16-Jun-09 5:43
Colin Angus Mackay16-Jun-09 5:43 
GeneralRe: Form Loading in VB .net Pin
dan!sh 16-Jun-09 5:50
professional dan!sh 16-Jun-09 5:50 
GeneralRe: Form Loading in VB .net Pin
No-e16-Jun-09 6:08
No-e16-Jun-09 6:08 
AnswerRe: Form Loading in VB .net Pin
Henry Minute16-Jun-09 6:41
Henry Minute16-Jun-09 6:41 
GeneralRe: Form Loading in VB .net Pin
No-e16-Jun-09 7:01
No-e16-Jun-09 7:01 
GeneralRe: Form Loading in VB .net Pin
Henry Minute16-Jun-09 7:06
Henry Minute16-Jun-09 7:06 

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.