VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



New Coding tips for Beginners

by Anitha (5 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 13th October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

New Coding tips for Beginners

Rate New Coding tips for Beginners




'For validity purpose , when u want the user to select
'values but not to enter any value in a combo box
'then set style property to 2 i.e. drop down list
'so that,the user cannot enter values in it

'Also while entering listitems in a combo box during
'design time,put "ctrl + enter" key to enter values one by one.

'(2)New coding tips for beginners

'Visual basic will not allow u to have
'any background images for ur forms.
'To get more colourful background screens,
'First go to Ms-word and create a word document,
'with whatever background texture u wanted,
'put whatever autoshape controls as labels,
'and paste word art as headings.
'Then save it as word document.
'Then in the vb form ,place a OLE control
'and stretch it as big as possible
'It will ask u whether to create a  file or select a file
'now,select the word document u have created.
'Thus, a colourful background can be obtained,and
'u can place controls over that.

'(3)New coding tips for beginners

'In the MDI form, to differentiate between various
'categories,use a separator between them.To get that,
'in the menu editor,put caption as "-" and enter any name.

'(4)New coding tips for beginners

'"Invalid procedure call or argument "
'This error will often occurs.But,one of the main possibily
'is that,u would have given .setfocus property in the
'form load event ,which is not possible.
'Or when a control's visiblity property is set to false
'and if u given .setfocus for that control,this error occurs.
'So,it is always better to use tab indexes to avoid such problems.

'(5)New coding tips for beginners

'When u add more active-x controls to your toolbox
'it really creates a mess and the toolbar is fully filled.
'To have a clear look over what all the controls u have added
'it is always better to create ur own toolbar sepaartely.
'To get that, right click on the toolbar,there is one option
'called "Add Tab" click that, and give a name for ur personal controls
'and then add all active-x controls there.

'(6)New coding tips for beginners

'In all the forms, ur statusbar control can have
'system date & time in one corner
'To keep changing the time every second
'use a timer control as follows.

Private Sub Timer1_Timer()
statusbar1.panels(1).Text = Time
End Sub

'(7)New coding tips for beginners

'If u add more option buttons to ur form,
'u will be allowed to check mark only one.
'But there are many cases where u wanted separate pairs
'as
'(1)female (2) Male
'(1)Married (2)Unmarried etc.
'so in such cases, each pair should be put in separate frames
'So that, one option per frame can be selected by the user.

'(8)New coding tips for beginners

'When we add image lists to a toolbar,the major error we do is
'we miss to set the image property of the toolbar.
'To set that, Right click on the toolbar and go to buttons,
'their image option is there,whose default value
'will be 0 for all the buttons.
'Number that correctly as per the requirements.

'(9)New coding tips for beginners

'when u wanted to add attractive small pictures to ur forms,
'but, not interested in going for a image or picture control.
'then u can easily put a label control and get images by setting
'the label's font to wingdings or webdings.


'Try & send ur comments to [email protected]



Download this snippet    Add to My Saved Code

New Coding tips for Beginners Comments

No comments have been posted about New Coding tips for Beginners. Why not be the first to post a comment about New Coding tips for Beginners.

Post your comment

Subject:
Message:
0/1000 characters