Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Where is the problem

Where is the problem

Scheduled Pinned Locked Moved Visual Basic
help
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amer Rehman 0
    wrote on last edited by
    #1

    Hi I want to display the message in the following event procidure when a message is received by creating a control dynamically e.g. textbox to display the message. But the control is not created. Where is the bug in my code. Private Sub MessageReceivedEventHandler(ByVal data As String) Handles remote.MessageReceived Dim txt As New TextBox txt.Size = New Size(55, 25) txt.Location = New Point(x, y) txt.Name = "strServer" txt.Text = data Controls.Add(txt) End Sub Thanks

    reman

    D 1 Reply Last reply
    0
    • A Amer Rehman 0

      Hi I want to display the message in the following event procidure when a message is received by creating a control dynamically e.g. textbox to display the message. But the control is not created. Where is the bug in my code. Private Sub MessageReceivedEventHandler(ByVal data As String) Handles remote.MessageReceived Dim txt As New TextBox txt.Size = New Size(55, 25) txt.Location = New Point(x, y) txt.Name = "strServer" txt.Text = data Controls.Add(txt) End Sub Thanks

      reman

      D Offline
      D Offline
      DidiKunz
      wrote on last edited by
      #2

      Amer Rehman wrote:

      Dim txt As New TextBox txt.Size = New Size(55, 25) txt.Location = New Point(x, y) txt.Name = "strServer" txt.Text = data Controls.Add(txt)

      Where does x and y in 'txt.Location = New Point(x, y)' comes from? Regards: Didi

      M 1 Reply Last reply
      0
      • D DidiKunz

        Amer Rehman wrote:

        Dim txt As New TextBox txt.Size = New Size(55, 25) txt.Location = New Point(x, y) txt.Name = "strServer" txt.Text = data Controls.Add(txt)

        Where does x and y in 'txt.Location = New Point(x, y)' comes from? Regards: Didi

        M Offline
        M Offline
        Mohammed Al Qaisi
        wrote on last edited by
        #3

        Position in the form

        D 1 Reply Last reply
        0
        • M Mohammed Al Qaisi

          Position in the form

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          It doesn't look like your changing the X and/or Y position, causing each textbox to be positioned directly under the last textbox that was added.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups