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. showing a modal form at a location

showing a modal form at a location

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
3 Posts 3 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
    aransiola
    wrote on last edited by
    #1

    how can i show a modal window form at a cordinates im using vb.net 2005 and im doing something like this dim oForm as new InvoiceForm with oform .showmodal() .left=txtID.left .top=txtid.top+txtid.height end with t.aransiola

    T N 2 Replies Last reply
    0
    • A aransiola

      how can i show a modal window form at a cordinates im using vb.net 2005 and im doing something like this dim oForm as new InvoiceForm with oform .showmodal() .left=txtID.left .top=txtid.top+txtid.height end with t.aransiola

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      I think this might be what you are looking for

      Dim oForm As New InvoiceForm
      With oForm
      .StartPosition = FormStartPosition.Manual
      .Left = txtID.left
      .Top = txtid.top+txtid.height
      .ShowDialog()
      End With

      hope it helps

      If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

      1 Reply Last reply
      0
      • A aransiola

        how can i show a modal window form at a cordinates im using vb.net 2005 and im doing something like this dim oForm as new InvoiceForm with oform .showmodal() .left=txtID.left .top=txtid.top+txtid.height end with t.aransiola

        N Offline
        N Offline
        nlarson11
        wrote on last edited by
        #3

        the problem with your code was order of execution. you need to set the left and top before you show the form because execution stops while the form is shown and continues when the form becomes hidden.

        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