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. save

save

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

    When you open a font dialog box in vb.net a change the font, how do you save the changes that was made to the font. Could someone send me some sample code on how to save changes in vb.net?

    C 1 Reply Last reply
    0
    • J jds1207

      When you open a font dialog box in vb.net a change the font, how do you save the changes that was made to the font. Could someone send me some sample code on how to save changes in vb.net?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Save changes how/where ? Do you mean just keep the details of the font for next time ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      J 1 Reply Last reply
      0
      • C Christian Graus

        Save changes how/where ? Do you mean just keep the details of the font for next time ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        J Offline
        J Offline
        jds1207
        wrote on last edited by
        #3

        Yes, just keep the details of the font for next time.

        M T 2 Replies Last reply
        0
        • J jds1207

          Yes, just keep the details of the font for next time.

          M Offline
          M Offline
          M Hall
          wrote on last edited by
          #4

          That used to be the propertybag object in VB6 it didn't get carried over to .Net. I've used a XML file in the past to save and recall the information I needed. Hope that helps :)

          1 Reply Last reply
          0
          • J jds1207

            Yes, just keep the details of the font for next time.

            T Offline
            T Offline
            The ANZAC
            wrote on last edited by
            #5

            In your application properties, go to settings. Here you can add properties that can be change and saved at runtime. Click the first item that says newsetting etc. and type "SaveFont" when prompted. Then in the type you can select system.drawing.font or something along those lines. Then in your code: If fontdialog.showdialog = OK then my.settings.savefont = 'font you selected end if On form load you can then reload the setting: dim myfont as system.drawing.font mycontrol.font = new font(myfont.fontfamily,myfont.size,myfont.style) **Note:**This will not save the font colour only style, size and font family. If you want to save font colour you will have to add another setting. Also note my code might not be 100% accurate but its pretty close.

            Posted by The ANZAC

            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