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. causesvalidation sticky field

causesvalidation sticky field

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 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.
  • U Offline
    U Offline
    User 694650
    wrote on last edited by
    #1

    i have a textbox control that displays a date field. In the validating event of the control, I am checking that the user has entered a valid date (in the format I specify and check), and if the date is not valid calling e.cancel = true to force valid date entry. My problem is that if the user trys to close the form using the X button, the validating event is still firing. I read somewhere you could check the mouse click to determine where the user clicked (title bar or client area). How would you determine where the user clicked? jmiddleton

    H 1 Reply Last reply
    0
    • U User 694650

      i have a textbox control that displays a date field. In the validating event of the control, I am checking that the user has entered a valid date (in the format I specify and check), and if the date is not valid calling e.cancel = true to force valid date entry. My problem is that if the user trys to close the form using the X button, the validating event is still firing. I read somewhere you could check the mouse click to determine where the user clicked (title bar or client area). How would you determine where the user clicked? jmiddleton

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      vb6 or vb.net ? in vb6 i don't face this problem

      U 1 Reply Last reply
      0
      • H Hesham Amin

        vb6 or vb.net ? in vb6 i don't face this problem

        U Offline
        U Offline
        User 694650
        wrote on last edited by
        #3

        Sorry. I am using vb.net

        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