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 6836147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:19:15+00:00 2026-05-26T23:19:15+00:00

We have an in house button control, and quite frankly it sucks. I’d like

  • 0

We have an in house button control, and quite frankly it sucks. I’d like to replace it but I don’t want to go onto every form in our project and delete/add a new control. It seems to me that if I design a new button that has all the same properties as the old one then I ought to be able to give it the same name as the old one and just replace all the reference lines in the vbp files to point to the new control.

Has anyone tried this (better yet have you heard of a tool that will do it for you) and if so what ‘gotchas’ should I be on the look out for?

Thanks!

  • 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-05-26T23:19:15+00:00Added an answer on May 26, 2026 at 11:19 pm

    The *.vbp files are one place you’ll need to change. There are also references to the used control libraries in the files containing GUIs — that’s form (*.frm), control (*.ctl), and property page (*.pag) files. These files are in a plain text format and you can see the references at the top. They look like this:

    Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
    

    Those refs will need to be added or updated in all relevant files if the new control is a compiled OCX. If it’s in the same project I don’t think it needs any reference there, and if it’s in a different project in the same project group I’m not sure. Save a test form with the new control to see.

    Note that you don’t have to keep the same control class name. Inside the *.frm/ctl/pag files, instances of individual controls on them are represented by a simple format like this:

    Begin VB.CommandButton Command2 
       Caption         =   "Cancel"
       Height          =   375
       Left            =   2460
       TabIndex        =   1
       Top             =   2400
       Width           =   1455
    End
    

    The syntax of the first line there is “Begin LibraryOrProjectName.ClassName NameOfThisInstance”. So, provided the offending control’s name is distinctive it should be easy to search & replace references to it both in the BASIC source and in the GUI layouts. You might want a plain text editor that can perform search and replace across multiple files (Notepad++ is one).

    Some control properties are stored like this:

       Picture         =   "frmMain.frx":292F
    

    These correspond to the *.frx, *.ctx, and *.pgx files, which contain binary data for the values of certain control properties. I don’t think these files should need altering or cause any problems. They don’t appear to contain control names.

    Use a full compile (Ctrl+F5) to be sure no problems linger in parts of the source afterward.

    Never tried it. Good luck.

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

Sidebar

Related Questions

I have an In-house windows form app that I would like to use Spell
i have a string 9 bedrooms in that house, but it could be anything
I want to create a table representing data I have, but I want each
I have a php web form, when user selects a radio button, I want
I have a button I got out of a random item around the house
I have this simple drawing of a house, and I want to adapt the
I have a searchable database of the House and Senate and I just want
I have directive which is site header with back button and I want on
I have house with apartments (belongs_to house). The summary shows the house with the
We have an in house winform application that is used by about 20 users

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.