Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:09:17+00:00 2026-06-15T08:09:17+00:00

Is it possible to have a custom file type that would open in a

  • 0

Is it possible to have a custom file type that would open in a VB program.

For example: There is a text box with some text and a check box that’s checked… You would save to a custom file type and when you opened the file up again, the check box would be checked and the text box would have the text. It would basically save the state of the program to a custom file type.

E.g. -> .pro, .lll, .hgy, .xyz, .abc

I’m just curious… is this possible and if so, how would I approach this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:09:18+00:00Added an answer on June 15, 2026 at 8:09 am

    You can do what Ichiru states with a BinaryWriter and BinaryReader which I have done with some of my projects before using an in Memory datatable and serializing it.

    Imports System.IO
    
    Public Class Form1
    
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    
            Using bs As New BinaryWriter(File.Open("Mydata.xyz", FileMode.Create))
                bs.Write(TextBox1.Text)
                bs.Write(CheckBox1.Checked)
                bs.Close()
            End Using
        End Sub
    
        Public Sub New()
    
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            If File.Exists("Mydata.xyz") Then
                Using br As New BinaryReader(File.Open("Mydata.xyz", FileMode.Open))
                    Try
                        TextBox1.Text = br.ReadString
                        CheckBox1.Checked = br.ReadBoolean
                    Catch ex As EndOfStreamException
                        'Catch any errors because file is incomplete
                    End Try
                End Using
            End If
        End Sub
    End Class
    

    But .Net has a built in Settings Class that you can use to persist your Data. It would be used like this

    Public Class Form1
    
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            My.MySettings.Default.checkbox1 = CheckBox1.Checked
            My.MySettings.Default.textbox1 = TextBox1.Text
            My.MySettings.Default.Save()
        End Sub
    
        Public Sub New()
    
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
    
            CheckBox1.Checked = My.MySettings.Default.checkbox1
            TextBox1.Text = My.MySettings.Default.textbox1
    
        End Sub
    End Class
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom file type that I'm reading from and writing to within
Is it possible to have custom datatype in powershell? I would like to have
I have noticed that it is possible to define a custom class and then
I have defined a custom user type that works fine when used properties of
Is it possible to have a custom icon displayed for a QAction when it
Is it possible to have scoped macros using custom defined macros through boost wave?
Is it possible to have nested set capabilities in this somewhat custom setup? Consider
Is it possible to log all the transformations in SSIS? I have a custom
Possible Duplicate: mysql custom sort I have an array of IDs: $ids = array(5,
I'm currently working on a plug-in for Eclipse that translates some custom Java code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.