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. how to make a xml shared in different Forms?

how to make a xml shared in different Forms?

Scheduled Pinned Locked Moved Visual Basic
xmltutorialquestion
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.
  • S Offline
    S Offline
    sanyexian
    wrote on last edited by
    #1

    Hi,everyone! I want that a XML file be open when Form1 had been load, before my application was killed, this XML should stays open and different Form could call it . I tryed use "Public Shared xml as new XmlDocument () ", but in Form2's control event, when I input "xml.", it didn't show the list of properties and methods. It seemed like "Public Shared" disabled? What should I do? Please give me some suggestions! Thank you very much!

    G 1 Reply Last reply
    0
    • S sanyexian

      Hi,everyone! I want that a XML file be open when Form1 had been load, before my application was killed, this XML should stays open and different Form could call it . I tryed use "Public Shared xml as new XmlDocument () ", but in Form2's control event, when I input "xml.", it didn't show the list of properties and methods. It seemed like "Public Shared" disabled? What should I do? Please give me some suggestions! Thank you very much!

      G Offline
      G Offline
      Gregory Gadow
      wrote on last edited by
      #2

      Because xml is not specific to Form1, it really should be put in a code module and not in the form. You will not need to use the Shared keywork in that case. I expect that will fix your problem.

      S 1 Reply Last reply
      0
      • G Gregory Gadow

        Because xml is not specific to Form1, it really should be put in a code module and not in the form. You will not need to use the Shared keywork in that case. I expect that will fix your problem.

        S Offline
        S Offline
        sanyexian
        wrote on last edited by
        #3

        Hi,Gregory! Thanks for your suggestion, my problem has been solved!Thank you very much! :)

        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