( ! ) Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in D:\www\up\CSharp\control01.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000353064{main}( )...\control01.php:0

( ! ) Warning: include(http://pub.houheaven.com/Nav02/Nav_deep2.htm): failed to open stream: no suitable wrapper could be found in D:\www\up\CSharp\control01.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000353064{main}( )...\control01.php:0

( ! ) Warning: include(): Failed opening 'http://pub.houheaven.com/Nav02/Nav_deep2.htm' for inclusion (include_path='.;C:\php\pear') in D:\www\up\CSharp\control01.php on line 20
Call Stack
#TimeMemoryFunctionLocation
10.0000353064{main}( )...\control01.php:0

第一步 ImageList控件

首先,准备好合适的选项卡图标图片,格式只能是 bmp、jpg、gif、png、ico。

其次,为窗体添加ImageList控件,点击属性面板中的Images属性并把图片导入,调整好图片之间的顺序,如果想让选项卡图标显示的时候大一些,那么就需要在ImageSize属性中设置图片大小。

第二步 TabControl控件

首先,向窗体添加一个TabControl控件,并调整其位置、大小等。

其次,选中TabControl控件,在属性面板中找到ImageList属性,在值的下拉列表中选择刚刚添加的ImageList控件。

最后,在窗体的onload事件中添加初始化代码,例如,为选项卡一添加第一个图标,tabPage1.ImageIndex=0; 为选项卡添加第三个图标,tabPage1.ImageIndex=2;(图片索引值从 0 开始),F5调试程序后可以看到结果。

显示框架
显示框架
显示框架
显示框架