Discussion Locked

How to standardise interface in VB?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
May i know how do people usually standardise the GUI in VB application? different programmer tends to draw the controls based on their own preference, which end up no consistency in the company product. for eg, i want to have all the textboxes background color as yellow, instead of doing it one by one or writing it in the documentation, what else can i do? another eg, i want all the textboxes_KeyDown event to call a SendKeys "{tab}".

4 replies

by whyong

Inside your form keydown event:
Dim Control
For Each Control In Form1.Controls
If TypeOf Control Is TextBox Then
sendkeys "{tab}"
Next Control

same technique applied to change the background color of the textbox if you wish. any questions please email me. happy coding

by whyong

you don't need to do the loop for the sendkey "{tab}" function, just check if you current control is a textbox then sendkey.

Sorry!! :)

This discussion is closed to new replies.