Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Vb help

  • 24-03-2003 3:40pm
    #1
    Registered Users, Registered Users 2 Posts: 4,276 ✭✭✭


    Ok just curious if this is possible, if so how do I go by doing it ?

    I've started my sw project and every time I start a new form I gotta set all the bg settings for lbl's etc.

    Is there anyway I can change it so that by default my labels use a certain font and bg, my text fields use another font and bg and so on ?

    Thanks:)


Comments

  • Registered Users, Registered Users 2 Posts: 629 ✭✭✭str8_away


    I don't know if what you are asking is possible.
    But you can type out the setting and cut and paste in the Form_load.

    Private Sub Form_Load()
    Text1.BackColor = "XXXXXXX"
    Text1.Font = "xxxxxxxx"
    End Sub


  • Closed Accounts Posts: 42 BOP


    dump all your controls on the form as normal, then highlight them all by drawing a square around them(if you know what I mean). then get up hte property page and change the property you want and it will effect all the highlighted controls.


  • Registered Users, Registered Users 2 Posts: 629 ✭✭✭str8_away


    That is good idea Bop.
    You can select and unselect one or more item by left click while holding Ctrl key.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Code reuse. Build up a library of code that you would want to reuse again and again. When you want to reuse your code, you can import it into your project (and ‘Save As’ a copy should you want to customise it).

    Ultimately developing your form controls as custom OCX’s is probably the best option, but doing the above is probably sufficient until you get to that level of proficiency in VB.


  • Registered Users, Registered Users 2 Posts: 1,423 ✭✭✭Merrion


    By default VB controls use the system default font, background colour etc. This means that when you install your application on someone's system it will have a look that they chose and are familiar with - you should consider leaving this as is if you want to write "professional" types of programs, IMO.


  • Advertisement
Advertisement