注册 登录
Small Basic中文站-快乐编程 返回首页

鱼二六的个人空间 http://www.smallbasic.cn/?12 [收藏] [复制] [分享] [RSS]

日志

SmallBasic扩展库的开发

热度 1已有 1426 次阅读2010-6-16 19:14 |个人分类:技术交流|

Built in LibrariesMicrosoft Small Basic comes with a default library that allows users to build really simple and fun programs and games. The default library contains the following objects, that are useful in creating these fun programs and games.

  1. GraphicsWindow
  2. TextWindow
  3. Turtle
  4. Flickr
download movies However, if the users want to do something other than what's offered by the default library, they can use Small Basic extensions.

Where to find extensionsExtensions are available here :http://smallbasic.com/smallbasic.com/wiki/Downloads.ashx

How to write Small Basic ExtensionsThe Small Basic compiler is designed to allow external libraries to be plugged in that enable it to be extended in interesting ways. These libraries can be built using any .Net based language and compiled to a .Net assembly. There are a few rules that the Small Basic compiler expects for a type to be identified as a Small Basic “object.” movie 2010 online

  1. The Type should be declared static
  2. The Type should be adorned with SmallBasicTypeAttribute
  3. Properties should be of type Microsoft.SmallBasic.Library.Primitive
  4. All the input and output parameters for Methods should be of type Microsoft.SmallBasic.Library.Primitive
  5. All events should be of type Microsoft.SmallBasic.Library.SmallBasicCallback

Once these conditions are met, you can compile your assembly and put it in a folder named “lib” in the Small Basic’s install location. For example, if Small Basic was installed on your “c:” drive and your library was called “myextensions”, you’d have to put myextensions.dll inside “c:\program files\microsoft\small basic\lib” folder.

Optionally, you can enable XML documentation in your build and copy over the Doc Xml file along with the library. This will automatically enable the help text inside Intellisense and the context help pane.

路过

鸡蛋

鲜花

握手

雷人

全部作者的其他最新日志

发表评论 评论 (1 个评论)

回复 53576733 2015-7-19 12:12
朋友,你的库文件,一直下载不了,如果方便请发给我一份可好?谢谢!zjran@163.com

facelist

您需要登录后才可以评论 登录 | 注册

QQ|手机版|Small Basic中文站-快乐编程 ( 闽ICP备09051788号 |

GMT+8, 2019-3-21 20:19 , Processed in 0.141222 second(s), 8 queries , Gzip On, File On.

Powered by Discuz! X3.3

返回顶部