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

  • SEARCH
  • Home
  • 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 8288757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:20:30+00:00 2026-06-08T12:20:30+00:00

Hi me again I’ve come across another problem following my last 2 questions. Buttons

  • 0

Hi me again I’ve come across another problem following my last 2 questions. Buttons to be renamed by the user and Input a button's text into a text box.

What happens is when label4 is admin when you click the button an input box appears asking for the button name and if label4 is anything else then it adds the text of the button to different boxes.

This all works fine the problem I’m having is when i close the program and then re open it all the buttons text has been removed.

So in short what im asking is how t\do I make it save to the button so that if I close the program and re open it the text stays on all the buttons.

The Code I have for the button is.

Dim Button As Button = DirectCast(sender, Button)

If Label4.Text = "Admin" Then
    With DirectCast(sender, Button)
        .Text = InputBox("Button Name", "Button Name", .Text)
    End With
Else
    Me.TransactionBindingSource.AddNew()
    Product_NameTextBox.Text = Button.Text

    Try
        Me.ProductTableAdapter.FillByProductName(Me.Database1DataSet.Product, Product_NameTextBox.Text)
    Catch ex As System.Exception
        System.Windows.Forms.MessageBox.Show(ex.Message)
    End Try

    ProductTextBox.Text = Button.Text
    GroupTextBox.Text = GroupTextBox1.Text
    AmountTextBox.Text = AmountTextBox1.Text
    PriceTextBox.Text = PriceTextBox1.Text
    TimeTextBox.Text = TimeOfDay
    DateTextBox.Text = DateString

    Me.Validate()

    Me.TransactionBindingSource.EndEdit()
    Me.TransactionTableAdapter.Update(Me.Database1DataSet)
    Timer2.Enabled = True
    TransNameLB.Items.Add(Button.Text)
    TransPriceLB.Items.Add(PriceTextBox.Text)

    Dim sum As Double
    For x As Integer = 0 To TransPriceLB.Items.Count - 1
        sum += Val(TransPriceLB.Items.Item(x).ToString)
    Next

    TextBox1.Text = sum.ToString
    QTYDrinksTB.Text = TransNameLB.Items.Count
End If

Thanking you in advance for any help provided

Craig

  • 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-08T12:20:31+00:00Added an answer on June 8, 2026 at 12:20 pm

    In addition to what Mark Hall said (excellent answer!), VB can do it all automagically for you. You have to set up a binding to the application setting.

    1. Go to the properties tab for your button
    2. Expand out the (ApplicationSettings) property
    3. Click in the Text area. A dropdown will appear, choose New
    4. In the Dialog that pops up, give it a name and make sure the scope
      is User

    Now, the app will automatically remember the text you’ve set, and reload it on app startup

    enter image description here

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

Sidebar

Related Questions

Again, to continue with my mysql noob questions :) I want the following to
again with another problem. public function __construct() { $_GET = $this->clean($_GET); $_POST = $this->clean($_POST);
Again in problem Actually I have following jsp code in which I have few
Again, I was creating buttons dynamically based on this post and now I need
Again a SED question from me :) So, same as last time, I'm wrestling
Hello again everyone, This time I have a problem with Intent & Extras. here's
Again expecting your helps. Facing a small might be stupid problem. I am creating
Again pulling my hair out due to some Flex/AS3 weirdness. The following code does
again me: following array; $myArray = array('FOO', 'BAR', 'HELLO'); i need: $myArray['FOO']['BAR']['HELLO'] = 0;
Again I have problem with checking whether DataReader object has data or not? Dim

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.