There are predefined API’s for each type of network which is given in the product manual of the 802.15.4 modules.
Refer the following link which generates API packets, http://ftp1.digi.com/support/utilities/digi_apiframes2.htm
I’m not sure how to do in Visual Basics.