From C to VB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?S3VsYmVy?=

    From C to VB

    Hello.

    Do you know how to convert this code to VB.NET?

    Thank you.

    Obtenga información sobre cómo agregar un marcador de posición a un TextBox a través de los ejemplos de código incluidos en XAML, C#y Visual Basic.

  • rowe_newsgroups

    #2
    Re: From C to VB

    On Aug 7, 2:31 pm, Kulber <Kul...@discuss ions.microsoft. comwrote:
    Hello.
    >
    Do you know how to convert this code to VB.NET?
    >
    Thank you.
    >
    http://msdn.microsoft.com/es-es/library/bb613590.aspx
    It's not that complicated of code, take your time and read through it
    and you should be able to figure it out.

    Thanks,

    Seth Rowe [MVP]

    Comment

    • Gillard

      #3
      Re: From C to VB

      Imports System
      Imports System.Windows
      Imports System.Windows. Input
      Imports System.Windows. Controls
      Imports System.Windows. Media
      Imports System.Windows. Media.Imaging

      Namespace SDKSample
      Partial Public Class TextBoxBackgrou ndExample
      Inherits Page

      Private Sub OnTextBoxTextCh anged(ByVal sender As Object, ByVal e As
      TextChangedEven tArgs)

      If myTextBox.Text = "" Then
      ' Create an ImageBrush.
      Dim textImageBrush As New ImageBrush()
      textImageBrush. ImageSource = New BitmapImage(New
      Uri("TextBoxBac kground.gif", UriKind.Relativ e))
      textImageBrush. AlignmentX = AlignmentX.Left
      textImageBrush. Stretch = Stretch.None
      ' Use the brush to paint the button's background.
      myTextBox.Backg round = textImageBrush

      Else

      myTextBox.Backg round = Nothing
      End If

      End Sub

      End Class

      End Namespace

      "Kulber" <Kulber@discuss ions.microsoft. comwrote in message
      news:43FFF48C-3CF9-4A6F-A92F-5A701FBA84A5@mi crosoft.com...
      Hello.
      >
      Do you know how to convert this code to VB.NET?
      >
      Thank you.
      >
      http://msdn.microsoft.com/es-es/library/bb613590.aspx

      Comment

      • =?Utf-8?B?S3VsYmVy?=

        #4
        Re: From C to VB

        Thank you very much, I will prove it and will tell you if it works.

        Now I have to verify how there is inserted the code of the example that it
        puts " <Page ... ".

        "Gillard" wrote:
        Imports System
        Imports System.Windows
        Imports System.Windows. Input
        Imports System.Windows. Controls
        Imports System.Windows. Media
        Imports System.Windows. Media.Imaging
        >
        Namespace SDKSample
        Partial Public Class TextBoxBackgrou ndExample
        Inherits Page
        >
        Private Sub OnTextBoxTextCh anged(ByVal sender As Object, ByVal e As
        TextChangedEven tArgs)
        >
        If myTextBox.Text = "" Then
        ' Create an ImageBrush.
        Dim textImageBrush As New ImageBrush()
        textImageBrush. ImageSource = New BitmapImage(New
        Uri("TextBoxBac kground.gif", UriKind.Relativ e))
        textImageBrush. AlignmentX = AlignmentX.Left
        textImageBrush. Stretch = Stretch.None
        ' Use the brush to paint the button's background.
        myTextBox.Backg round = textImageBrush
        >
        Else
        >
        myTextBox.Backg round = Nothing
        End If
        >
        End Sub
        >
        End Class
        >
        End Namespace
        >
        "Kulber" <Kulber@discuss ions.microsoft. comwrote in message
        news:43FFF48C-3CF9-4A6F-A92F-5A701FBA84A5@mi crosoft.com...
        Hello.

        Do you know how to convert this code to VB.NET?

        Thank you.

        http://msdn.microsoft.com/es-es/library/bb613590.aspx
        >
        >

        Comment

        Working...