在好例子网,分享、交流、成长!
您当前所在位置:首页C# 开发实例C#语言基础 → 利用TreeView制作目标导航栏

利用TreeView制作目标导航栏

C#语言基础

下载此实例
  • 开发语言:C#
  • 实例大小:0.17M
  • 下载次数:98
  • 浏览次数:1307
  • 发布时间:2015-09-22
  • 实例类别:C#语言基础
  • 发 布 人:竹鱼123
  • 文件格式:.rar
  • 所需积分:1
 相关标签: tree 导航

实例介绍

【实例简介】利用treeview制作导航栏

【实例截图】

【核心代码】

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
namespace TailorGuidanceInterface
{
    partial class Form1
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows 窗体设计器生成的代码
 
        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("公司信息", 1, 2);
            System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("初始化数据", 1, 2);
            System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("管理员设定", 1, 2);
            System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("系统管理", new System.Windows.Forms.TreeNode[] {
            treeNode1,
            treeNode2,
            treeNode3});
            System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("添加科目信息", 1, 2);
            System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("查询科目信息", 1, 2);
            System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("科目信息", 0, 1, new System.Windows.Forms.TreeNode[] {
            treeNode5,
            treeNode6});
            System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("总帐查询", 1, 2);
            System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("按凭证查询", 1, 2);
            System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("按科目查询", 1, 2);
            System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("帐目佘额查询", 1, 2);
            System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("帐目查询", 0, 1, new System.Windows.Forms.TreeNode[] {
            treeNode8,
            treeNode9,
            treeNode10,
            treeNode11});
            System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("凭证录入", 1, 2);
            System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("凭证审核", 1, 2);
            System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("凭证查询", 1, 2);
            System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("凭证结算", 1, 2);
            System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("凭证管理", 0, 1, new System.Windows.Forms.TreeNode[] {
            treeNode13,
            treeNode14,
            treeNode15,
            treeNode16});
            System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("按凭证打印", 1, 2);
            System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("按科目打印", 1, 2);
            System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("报表打印", 0, 1, new System.Windows.Forms.TreeNode[] {
            treeNode18,
            treeNode19});
            System.Windows.Forms.TreeNode treeNode21 = new System.Windows.Forms.TreeNode("资源管理", 2, 1, new System.Windows.Forms.TreeNode[] {
            treeNode4,
            treeNode7,
            treeNode12,
            treeNode17,
            treeNode20});
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.statusStrip1 = new System.Windows.Forms.StatusStrip();
            this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabel4 = new System.Windows.Forms.ToolStripStatusLabel();
            this.凭证录入ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证审核ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证结算ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证总汇ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.凭证修改ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.密码修改ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.管理理员信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.系统管理ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.公司信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.初始化使用时间ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.初始化科目资金ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.报表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.按科目报表ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.按凭证ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.账目佘额ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.按科目查询ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.按凭证查询ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.添加科目ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.科目信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.科目查询ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.总账游览ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.账目查询ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip2 = new System.Windows.Forms.MenuStrip();
            this.treeView1 = new System.Windows.Forms.TreeView();
            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.statusStrip1.SuspendLayout();
            this.menuStrip2.SuspendLayout();
            this.SuspendLayout();
            //
            // statusStrip1
            //
            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripStatusLabel1,
            this.toolStripStatusLabel2,
            this.toolStripStatusLabel3,
            this.toolStripStatusLabel4});
            this.statusStrip1.Location = new System.Drawing.Point(0, 204);
            this.statusStrip1.Name = "statusStrip1";
            this.statusStrip1.Size = new System.Drawing.Size(474, 22);
            this.statusStrip1.TabIndex = 0;
            this.statusStrip1.Text = "statusStrip1";
            //
            // toolStripStatusLabel1
            //
            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            this.toolStripStatusLabel1.Size = new System.Drawing.Size(41, 17);
            this.toolStripStatusLabel1.Text = "状态:";
            //
            // toolStripStatusLabel2
            //
            this.toolStripStatusLabel2.BorderStyle = System.Windows.Forms.Border3DStyle.RaisedOuter;
            this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
            this.toolStripStatusLabel2.Size = new System.Drawing.Size(47, 17);
            this.toolStripStatusLabel2.Text = "       ";
            //
            // toolStripStatusLabel3
            //
            this.toolStripStatusLabel3.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenOuter;
            this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
            this.toolStripStatusLabel3.Size = new System.Drawing.Size(83, 17);
            this.toolStripStatusLabel3.Text = "操作员:Admin";
            //
            // toolStripStatusLabel4
            //
            this.toolStripStatusLabel4.Name = "toolStripStatusLabel4";
            this.toolStripStatusLabel4.Size = new System.Drawing.Size(77, 17);
            this.toolStripStatusLabel4.Text = "  系统时间:";
            //
            // 凭证录入ToolStripMenuItem
            //
            this.凭证录入ToolStripMenuItem.Name = "凭证录入ToolStripMenuItem";
            this.凭证录入ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.凭证录入ToolStripMenuItem.Text = "凭证录入";
            //
            // 凭证管理ToolStripMenuItem
            //
            this.凭证管理ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.凭证录入ToolStripMenuItem,
            this.凭证审核ToolStripMenuItem,
            this.凭证结算ToolStripMenuItem,
            this.凭证总汇ToolStripMenuItem,
            this.凭证ToolStripMenuItem,
            this.凭证修改ToolStripMenuItem1});
            this.凭证管理ToolStripMenuItem.Name = "凭证管理ToolStripMenuItem";
            this.凭证管理ToolStripMenuItem.Size = new System.Drawing.Size(83, 20);
            this.凭证管理ToolStripMenuItem.Text = "凭证管理(&F)";
            //
            // 凭证审核ToolStripMenuItem
            //
            this.凭证审核ToolStripMenuItem.Name = "凭证审核ToolStripMenuItem";
            this.凭证审核ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.凭证审核ToolStripMenuItem.Text = "凭证审核";
            //
            // 凭证结算ToolStripMenuItem
            //
            this.凭证结算ToolStripMenuItem.Name = "凭证结算ToolStripMenuItem";
            this.凭证结算ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.凭证结算ToolStripMenuItem.Text = "凭证结算";
            //
            // 凭证总汇ToolStripMenuItem
            //
            this.凭证总汇ToolStripMenuItem.Name = "凭证总汇ToolStripMenuItem";
            this.凭证总汇ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.凭证总汇ToolStripMenuItem.Text = "凭证总汇";
            //
            // 凭证ToolStripMenuItem
            //
            this.凭证ToolStripMenuItem.Name = "凭证ToolStripMenuItem";
            this.凭证ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.凭证ToolStripMenuItem.Text = "凭证查询";
            //
            // 凭证修改ToolStripMenuItem1
            //
            this.凭证修改ToolStripMenuItem1.Name = "凭证修改ToolStripMenuItem1";
            this.凭证修改ToolStripMenuItem1.Size = new System.Drawing.Size(118, 22);
            this.凭证修改ToolStripMenuItem1.Text = "凭证修改";
            //
            // 密码修改ToolStripMenuItem
            //
            this.密码修改ToolStripMenuItem.Name = "密码修改ToolStripMenuItem";
            this.密码修改ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
            this.密码修改ToolStripMenuItem.Text = "密码修改(&B)";
            //
            // 管理理员信息ToolStripMenuItem
            //
            this.管理理员信息ToolStripMenuItem.Name = "管理理员信息ToolStripMenuItem";
            this.管理理员信息ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
            this.管理理员信息ToolStripMenuItem.Text = "管理员信息(&W)";
            //
            // 系统管理ToolStripMenuItem
            //
            this.系统管理ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.公司信息ToolStripMenuItem,
            this.初始化使用时间ToolStripMenuItem,
            this.初始化科目资金ToolStripMenuItem,
            this.管理理员信息ToolStripMenuItem,
            this.密码修改ToolStripMenuItem});
            this.系统管理ToolStripMenuItem.Name = "系统管理ToolStripMenuItem";
            this.系统管理ToolStripMenuItem.Size = new System.Drawing.Size(83, 20);
            this.系统管理ToolStripMenuItem.Text = "系统管理(&D)";
            //
            // 公司信息ToolStripMenuItem
            //
            this.公司信息ToolStripMenuItem.Name = "公司信息ToolStripMenuItem";
            this.公司信息ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
            this.公司信息ToolStripMenuItem.Text = "公司信息(&L)";
            //
            // 初始化使用时间ToolStripMenuItem
            //
            this.初始化使用时间ToolStripMenuItem.Name = "初始化使用时间ToolStripMenuItem";
            this.初始化使用时间ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
            this.初始化使用时间ToolStripMenuItem.Text = "初始化使用时间(&G)";
            //
            // 初始化科目资金ToolStripMenuItem
            //
            this.初始化科目资金ToolStripMenuItem.Name = "初始化科目资金ToolStripMenuItem";
            this.初始化科目资金ToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
            this.初始化科目资金ToolStripMenuItem.Text = "初始化科目资金(&F)";
            //
            // 报表ToolStripMenuItem
            //
            this.报表ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.按科目报表ToolStripMenuItem,
            this.按凭证ToolStripMenuItem});
            this.报表ToolStripMenuItem.Name = "报表ToolStripMenuItem";
            this.报表ToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
            this.报表ToolStripMenuItem.Text = "报表(&H)";
            //
            // 按科目报表ToolStripMenuItem
            //
            this.按科目报表ToolStripMenuItem.Name = "按科目报表ToolStripMenuItem";
            this.按科目报表ToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.按科目报表ToolStripMenuItem.Text = "按科目名称报表";
            //
            // 按凭证ToolStripMenuItem
            //
            this.按凭证ToolStripMenuItem.Name = "按凭证ToolStripMenuItem";
            this.按凭证ToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
            this.按凭证ToolStripMenuItem.Text = "按凭证号报表";
            //
            // 账目佘额ToolStripMenuItem
            //
            this.账目佘额ToolStripMenuItem.Name = "账目佘额ToolStripMenuItem";
            this.账目佘额ToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
            this.账目佘额ToolStripMenuItem.Text = "账目余额";
            //
            // 按科目查询ToolStripMenuItem
            //
            this.按科目查询ToolStripMenuItem.Name = "按科目查询ToolStripMenuItem";
            this.按科目查询ToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
            this.按科目查询ToolStripMenuItem.Text = "按科目查询";
            //
            // 退出ToolStripMenuItem
            //
            this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
            this.退出ToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
            this.退出ToolStripMenuItem.Text = "退出(&E)";
            //
            // 按凭证查询ToolStripMenuItem
            //
            this.按凭证查询ToolStripMenuItem.Name = "按凭证查询ToolStripMenuItem";
            this.按凭证查询ToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
            this.按凭证查询ToolStripMenuItem.Text = "按凭证查询";
            //
            // 添加科目ToolStripMenuItem
            //
            this.添加科目ToolStripMenuItem.Name = "添加科目ToolStripMenuItem";
            this.添加科目ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.添加科目ToolStripMenuItem.Text = "科目信息";
            //
            // 科目信息ToolStripMenuItem
            //
            this.科目信息ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.添加科目ToolStripMenuItem,
            this.科目查询ToolStripMenuItem});
            this.科目信息ToolStripMenuItem.Name = "科目信息ToolStripMenuItem";
            this.科目信息ToolStripMenuItem.Size = new System.Drawing.Size(83, 20);
            this.科目信息ToolStripMenuItem.Text = "科目信息(&T)";
            //
            // 科目查询ToolStripMenuItem
            //
            this.科目查询ToolStripMenuItem.Name = "科目查询ToolStripMenuItem";
            this.科目查询ToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
            this.科目查询ToolStripMenuItem.Text = "科目查询";
            //
            // 总账游览ToolStripMenuItem
            //
            this.总账游览ToolStripMenuItem.Name = "总账游览ToolStripMenuItem";
            this.总账游览ToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
            this.总账游览ToolStripMenuItem.Text = "总账浏览";
            //
            // 账目查询ToolStripMenuItem
            //
            this.账目查询ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.总账游览ToolStripMenuItem,
            this.按凭证查询ToolStripMenuItem,
            this.按科目查询ToolStripMenuItem,
            this.账目佘额ToolStripMenuItem});
            this.账目查询ToolStripMenuItem.Name = "账目查询ToolStripMenuItem";
            this.账目查询ToolStripMenuItem.Size = new System.Drawing.Size(83, 20);
            this.账目查询ToolStripMenuItem.Text = "账目查询(&Q)";
            //
            // menuStrip2
            //
            this.menuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.系统管理ToolStripMenuItem,
            this.凭证管理ToolStripMenuItem,
            this.科目信息ToolStripMenuItem,
            this.账目查询ToolStripMenuItem,
            this.报表ToolStripMenuItem,
            this.退出ToolStripMenuItem});
            this.menuStrip2.Location = new System.Drawing.Point(0, 0);
            this.menuStrip2.Name = "menuStrip2";
            this.menuStrip2.Size = new System.Drawing.Size(474, 24);
            this.menuStrip2.TabIndex = 7;
            this.menuStrip2.Text = "menuStrip2";
            //
            // treeView1
            //
            this.treeView1.ForeColor = System.Drawing.Color.Blue;
            this.treeView1.ImageIndex = 0;
            this.treeView1.ImageList = this.imageList1;
            this.treeView1.Location = new System.Drawing.Point(0, 27);
            this.treeView1.Name = "treeView1";
            treeNode1.ImageIndex = 1;
            treeNode1.Name = "节点9";
            treeNode1.SelectedImageIndex = 2;
            treeNode1.Text = "公司信息";
            treeNode2.ImageIndex = 1;
            treeNode2.Name = "节点10";
            treeNode2.SelectedImageIndex = 2;
            treeNode2.Text = "初始化数据";
            treeNode3.ImageIndex = 1;
            treeNode3.Name = "节点11";
            treeNode3.SelectedImageIndex = 2;
            treeNode3.Text = "管理员设定";
            treeNode4.ImageKey = "1.bmp";
            treeNode4.Name = "节点1";
            treeNode4.SelectedImageIndex = 1;
            treeNode4.Text = "系统管理";
            treeNode5.ImageIndex = 1;
            treeNode5.Name = "节点12";
            treeNode5.SelectedImageIndex = 2;
            treeNode5.Text = "添加科目信息";
            treeNode6.ImageIndex = 1;
            treeNode6.Name = "节点13";
            treeNode6.SelectedImageIndex = 2;
            treeNode6.Text = "查询科目信息";
            treeNode7.ImageIndex = 0;
            treeNode7.Name = "节点4";
            treeNode7.SelectedImageIndex = 1;
            treeNode7.Text = "科目信息";
            treeNode8.ImageIndex = 1;
            treeNode8.Name = "节点14";
            treeNode8.SelectedImageIndex = 2;
            treeNode8.Text = "总帐查询";
            treeNode9.ImageIndex = 1;
            treeNode9.Name = "节点15";
            treeNode9.SelectedImageIndex = 2;
            treeNode9.Text = "按凭证查询";
            treeNode10.ImageIndex = 1;
            treeNode10.Name = "节点16";
            treeNode10.SelectedImageIndex = 2;
            treeNode10.Text = "按科目查询";
            treeNode11.ImageIndex = 1;
            treeNode11.Name = "节点17";
            treeNode11.SelectedImageIndex = 2;
            treeNode11.Text = "帐目佘额查询";
            treeNode12.ImageIndex = 0;
            treeNode12.Name = "节点6";
            treeNode12.SelectedImageIndex = 1;
            treeNode12.Text = "帐目查询";
            treeNode13.ImageIndex = 1;
            treeNode13.Name = "节点18";
            treeNode13.SelectedImageIndex = 2;
            treeNode13.Text = "凭证录入";
            treeNode14.ImageIndex = 1;
            treeNode14.Name = "节点19";
            treeNode14.SelectedImageIndex = 2;
            treeNode14.Text = "凭证审核";
            treeNode15.ImageIndex = 1;
            treeNode15.Name = "节点20";
            treeNode15.SelectedImageIndex = 2;
            treeNode15.Text = "凭证查询";
            treeNode16.ImageIndex = 1;
            treeNode16.Name = "节点21";
            treeNode16.SelectedImageIndex = 2;
            treeNode16.Text = "凭证结算";
            treeNode17.ImageIndex = 0;
            treeNode17.Name = "节点5";
            treeNode17.SelectedImageIndex = 1;
            treeNode17.Text = "凭证管理";
            treeNode18.ImageIndex = 1;
            treeNode18.Name = "节点22";
            treeNode18.SelectedImageIndex = 2;
            treeNode18.Text = "按凭证打印";
            treeNode19.ImageIndex = 1;
            treeNode19.Name = "节点23";
            treeNode19.SelectedImageIndex = 2;
            treeNode19.Text = "按科目打印";
            treeNode20.ImageIndex = 0;
            treeNode20.Name = "节点8";
            treeNode20.SelectedImageIndex = 1;
            treeNode20.Text = "报表打印";
            treeNode21.ImageIndex = 2;
            treeNode21.Name = "节点0";
            treeNode21.SelectedImageIndex = 1;
            treeNode21.Text = "资源管理";
            this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
            treeNode21});
            this.treeView1.SelectedImageIndex = 0;
            this.treeView1.Size = new System.Drawing.Size(165, 175);
            this.treeView1.TabIndex = 8;
            this.treeView1.AfterSelect  = new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
            //
            // imageList1
            //
            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
            this.imageList1.Images.SetKeyName(0, "1.bmp");
            this.imageList1.Images.SetKeyName(1, "2.bmp");
            this.imageList1.Images.SetKeyName(2, "3.ico");
            //
            // groupBox1
            //
            this.groupBox1.BackgroundImage = global::TailorGuidanceInterface.Properties.Resources.c;
            this.groupBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.groupBox1.Location = new System.Drawing.Point(162, 27);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(312, 175);
            this.groupBox1.TabIndex = 9;
            this.groupBox1.TabStop = false;
            //
            // timer1
            //
            this.timer1.Enabled = true;
            this.timer1.Interval = 1000;
            this.timer1.Tick  = new System.EventHandler(this.timer1_Tick);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(474, 226);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.treeView1);
            this.Controls.Add(this.menuStrip2);
            this.Controls.Add(this.statusStrip1);
            this.Name = "Form1";
            this.Text = "用TreeView控件制作导航界面";
            this.Load  = new System.EventHandler(this.Form1_Load);
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            this.menuStrip2.ResumeLayout(false);
            this.menuStrip2.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private System.Windows.Forms.StatusStrip statusStrip1;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel4;
        private System.Windows.Forms.ToolStripMenuItem 凭证录入ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证管理ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证审核ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证结算ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证总汇ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 凭证修改ToolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem 密码修改ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 管理理员信息ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 系统管理ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 公司信息ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 初始化使用时间ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 初始化科目资金ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 报表ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 按科目报表ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 按凭证ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 账目佘额ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 按科目查询ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 按凭证查询ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 添加科目ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 科目信息ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 科目查询ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 总账游览ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 账目查询ToolStripMenuItem;
        private System.Windows.Forms.MenuStrip menuStrip2;
        private System.Windows.Forms.TreeView treeView1;
        private System.Windows.Forms.ImageList imageList1;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.Timer timer1;
    }
}

标签: tree 导航

实例下载地址

利用TreeView制作目标导航栏

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警