IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C# Discussion :

afficher dans un panel plusieurs pictureBox


Sujet :

C#

  1. #1
    Membre du Club
    Inscrit en
    Mars 2011
    Messages
    62
    Détails du profil
    Informations forums :
    Inscription : Mars 2011
    Messages : 62
    Points : 55
    Points
    55
    Par défaut afficher dans un panel plusieurs pictureBox
    Bonjour,

    Je cherche une solution en c# pour afficher dans une panel plusieurs pictureBox. J'ai fait un test avec une seul pictureBox pour afficher une image apartir un fichier image mais ca marche pas avec plusieurs picturebox.
    Auriez vous une idée ?

    Merci de m'aider

  2. #2
    Max
    Max est déconnecté
    Expert éminent sénior

    Avatar de Max
    Homme Profil pro
    Artisan développeur
    Inscrit en
    Mai 2007
    Messages
    2 954
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Artisan développeur
    Secteur : Industrie

    Informations forums :
    Inscription : Mai 2007
    Messages : 2 954
    Points : 14 933
    Points
    14 933
    Par défaut
    Pavé César !

  3. #3
    Expert éminent sénior

    Avatar de Deepin
    Homme Profil pro
    Ingénieur - Chef de projet Modélisation/Simulation
    Inscrit en
    Avril 2004
    Messages
    3 164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Afrique Du Sud

    Informations professionnelles :
    Activité : Ingénieur - Chef de projet Modélisation/Simulation
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2004
    Messages : 3 164
    Points : 51 026
    Points
    51 026
    Par défaut
    Tu pourrais nous montrer ce que tu as déjà essayé / fait ?

  4. #4
    Membre du Club
    Inscrit en
    Mars 2011
    Messages
    62
    Détails du profil
    Informations forums :
    Inscription : Mars 2011
    Messages : 62
    Points : 55
    Points
    55
    Par défaut
    Citation Envoyé par buns Voir le message
    Tu pourrais nous montrer ce que tu as déjà essayé / fait ?
    je veux fait un livre photo mais j'ai un probleme de creation des album mais mon probleme je n'arrive pas a ajouter plus que une image sur picturebox avec qui est au dessus sur une panel mais j'arrive pas

  5. #5
    Expert éminent sénior

    Avatar de Deepin
    Homme Profil pro
    Ingénieur - Chef de projet Modélisation/Simulation
    Inscrit en
    Avril 2004
    Messages
    3 164
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Afrique Du Sud

    Informations professionnelles :
    Activité : Ingénieur - Chef de projet Modélisation/Simulation
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2004
    Messages : 3 164
    Points : 51 026
    Points
    51 026
    Par défaut
    Tu as du code a nous montrer ?

  6. #6
    Membre du Club
    Inscrit en
    Mars 2011
    Messages
    62
    Détails du profil
    Informations forums :
    Inscription : Mars 2011
    Messages : 62
    Points : 55
    Points
    55
    Par défaut
    Citation Envoyé par buns Voir le message
    Tu as du code a nous montrer ?
    oui bien sur

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    using System;
    using System.Drawing.Imaging;
    using System.Drawing;
    using System.Drawing.Text;
    using System.Drawing.Printing;
    using System.Drawing.Design;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.IO;
    using System.Management;
    using System.Globalization;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using ToolsService;
    using My_Exploryer;
     
     
    namespace My_Explorer
    {
     
     
    	public class Explorer : System.Windows.Forms.Form
    	{
    		private System.Windows.Forms.Splitter splitter1;
    		private System.Windows.Forms.MainMenu mainMenu1;
    		private System.Windows.Forms.MenuItem menuItem1;
    		private System.Windows.Forms.MenuItem menuItem2;
    		private System.Windows.Forms.MenuItem menuItem3;
            private System.Windows.Forms.MenuItem menuItem4;
            private System.Windows.Forms.ImageList m_imageListTreeView;
    		private System.ComponentModel.IContainer components;
            ArrayList imgFiles = new ArrayList();
            ArrayList bgFiles  = new ArrayList();
            private TreeNode selectedNode;
            private ImageList imageList1;
            private Button button1;
            private Button button2;
            private ImageList imageList2;
            private GroupBox Taille;
            private GroupBox groupBox1;
            private Button button3;
            private Button button4;
            private Button button5;
            private TabPage tabPage2;
            private ListView bgView;
            private TabPage tabPage1;
            private Label label1;
            private TreeView tvFolders;
            private ListView lvFiles;
            private TabControl tabControl1;
            private Label label2;
            private ComboBox comboBox1;
            private MenuItem menuItem5;
            private MenuItem menuItem6;
            private Button button6;
            private Button button7;
            public TableLayoutPanel tableLayoutPanel1;
            private Panel panel1;
            private SaveFileDialog saveFileDialog1;
            private ContextMenuStrip contextMenuStrip1;
            private PictureBox pictureBox;
            public RichTextBox richTextBox1;
            private ListBox listBox1;
            private Panel panel2;
            public TableLayoutPanel tableLayoutPanel2;
            private PictureBox pictureBox2;
            private String currentLocalPath;
     
    		public Explorer()
    		{
    			//
    			// Required for Windows Form Designer support
    			//
    			InitializeComponent();
     
    			// Populate TreeView with Drive list
    			PopulateDriveList();
    		}
     
    		/// <summary>
    		/// Clean up any resources being used.
    		/// </summary>
    		protected override void Dispose( bool disposing )
    		{
    			if( disposing )
    			{
    				if (components != null) 
    				{
    					components.Dispose();
    				}
    			}
    			base.Dispose( disposing );
    		}
     
    		#region Windows Form Designer generated code
    		/// <summary>
    		/// Required method for Designer support - do not modify
    		/// the contents of this method with the code editor.
    		/// </summary>
    		private void InitializeComponent()
    		{
                this.components = new System.ComponentModel.Container();
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Explorer));
                this.m_imageListTreeView = new System.Windows.Forms.ImageList(this.components);
                this.splitter1 = new System.Windows.Forms.Splitter();
                this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
                this.menuItem1 = new System.Windows.Forms.MenuItem();
                this.menuItem2 = new System.Windows.Forms.MenuItem();
                this.menuItem5 = new System.Windows.Forms.MenuItem();
                this.menuItem6 = new System.Windows.Forms.MenuItem();
                this.menuItem3 = new System.Windows.Forms.MenuItem();
                this.menuItem4 = new System.Windows.Forms.MenuItem();
                this.imageList1 = new System.Windows.Forms.ImageList(this.components);
                this.button2 = new System.Windows.Forms.Button();
                this.button1 = new System.Windows.Forms.Button();
                this.imageList2 = new System.Windows.Forms.ImageList(this.components);
                this.Taille = new System.Windows.Forms.GroupBox();
                this.groupBox1 = new System.Windows.Forms.GroupBox();
                this.button4 = new System.Windows.Forms.Button();
                this.button3 = new System.Windows.Forms.Button();
                this.button5 = new System.Windows.Forms.Button();
                this.tabPage2 = new System.Windows.Forms.TabPage();
                this.bgView = new System.Windows.Forms.ListView();
                this.tabPage1 = new System.Windows.Forms.TabPage();
                this.label1 = new System.Windows.Forms.Label();
                this.tvFolders = new System.Windows.Forms.TreeView();
                this.lvFiles = new System.Windows.Forms.ListView();
                this.tabControl1 = new System.Windows.Forms.TabControl();
                this.label2 = new System.Windows.Forms.Label();
                this.comboBox1 = new System.Windows.Forms.ComboBox();
                this.button6 = new System.Windows.Forms.Button();
                this.button7 = new System.Windows.Forms.Button();
                this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
                this.pictureBox = new System.Windows.Forms.PictureBox();
                this.richTextBox1 = new System.Windows.Forms.RichTextBox();
                this.panel1 = new System.Windows.Forms.Panel();
                this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
                this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
                this.listBox1 = new System.Windows.Forms.ListBox();
                this.panel2 = new System.Windows.Forms.Panel();
                this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
                this.pictureBox2 = new System.Windows.Forms.PictureBox();
                this.Taille.SuspendLayout();
                this.groupBox1.SuspendLayout();
                this.tabPage2.SuspendLayout();
                this.tabPage1.SuspendLayout();
                this.tabControl1.SuspendLayout();
                this.tableLayoutPanel1.SuspendLayout();
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
                this.panel1.SuspendLayout();
                this.panel2.SuspendLayout();
                this.tableLayoutPanel2.SuspendLayout();
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
                this.SuspendLayout();
                // 
                // m_imageListTreeView
                // 
                this.m_imageListTreeView.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_imageListTreeView.ImageStream")));
                this.m_imageListTreeView.TransparentColor = System.Drawing.Color.Transparent;
                this.m_imageListTreeView.Images.SetKeyName(0, "");
                this.m_imageListTreeView.Images.SetKeyName(1, "");
                this.m_imageListTreeView.Images.SetKeyName(2, "");
                this.m_imageListTreeView.Images.SetKeyName(3, "");
                this.m_imageListTreeView.Images.SetKeyName(4, "");
                this.m_imageListTreeView.Images.SetKeyName(5, "");
                this.m_imageListTreeView.Images.SetKeyName(6, "");
                this.m_imageListTreeView.Images.SetKeyName(7, "");
                this.m_imageListTreeView.Images.SetKeyName(8, "");
                // 
                // splitter1
                // 
                this.splitter1.Location = new System.Drawing.Point(0, 0);
                this.splitter1.Name = "splitter1";
                this.splitter1.Size = new System.Drawing.Size(3, 492);
                this.splitter1.TabIndex = 3;
                this.splitter1.TabStop = false;
                // 
                // mainMenu1
                // 
                this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                this.menuItem1,
                this.menuItem3});
                // 
                // menuItem1
                // 
                this.menuItem1.Index = 0;
                this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                this.menuItem2,
                this.menuItem5});
                this.menuItem1.Text = "&File";
                // 
                // menuItem2
                // 
                this.menuItem2.Index = 0;
                this.menuItem2.Text = "Nouveau";
                this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
                // 
                // menuItem5
                // 
                this.menuItem5.Index = 1;
                this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                this.menuItem6});
                this.menuItem5.Text = "Ouvrir";
                // 
                // menuItem6
                // 
                this.menuItem6.Index = 0;
                this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
                this.menuItem6.Text = "Fichier";
                this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
                // 
                // menuItem3
                // 
                this.menuItem3.Index = 1;
                this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                this.menuItem4});
                this.menuItem3.Text = "&Help";
                // 
                // menuItem4
                // 
                this.menuItem4.Index = 0;
                this.menuItem4.Text = "&About";
                // 
                // imageList1
                // 
                this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
                this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
                this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
                // 
                // button2
                // 
                this.button2.Image = global::My_Exploryer.Properties.Resources.down1;
                this.button2.Location = new System.Drawing.Point(28, 57);
                this.button2.Name = "button2";
                this.button2.Size = new System.Drawing.Size(54, 18);
                this.button2.TabIndex = 8;
                this.button2.UseVisualStyleBackColor = true;
                this.button2.Click += new System.EventHandler(this.button2_Click);
                // 
                // button1
                // 
                this.button1.Image = global::My_Exploryer.Properties.Resources.up;
                this.button1.Location = new System.Drawing.Point(28, 29);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(54, 18);
                this.button1.TabIndex = 7;
                this.button1.UseVisualStyleBackColor = true;
                this.button1.Click += new System.EventHandler(this.button1_Click);
                // 
                // imageList2
                // 
                this.imageList2.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
                this.imageList2.ImageSize = new System.Drawing.Size(16, 16);
                this.imageList2.TransparentColor = System.Drawing.Color.Transparent;
                // 
                // Taille
                // 
                this.Taille.Controls.Add(this.button2);
                this.Taille.Controls.Add(this.button1);
                this.Taille.Location = new System.Drawing.Point(756, 407);
                this.Taille.Name = "Taille";
                this.Taille.Size = new System.Drawing.Size(100, 85);
                this.Taille.TabIndex = 10;
                this.Taille.TabStop = false;
                this.Taille.Text = "Taille";
                // 
                // groupBox1
                // 
                this.groupBox1.Controls.Add(this.button4);
                this.groupBox1.Controls.Add(this.button3);
                this.groupBox1.Location = new System.Drawing.Point(887, 407);
                this.groupBox1.Name = "groupBox1";
                this.groupBox1.Size = new System.Drawing.Size(100, 85);
                this.groupBox1.TabIndex = 11;
                this.groupBox1.TabStop = false;
                this.groupBox1.Text = "Position";
                // 
                // button4
                // 
                this.button4.Location = new System.Drawing.Point(14, 55);
                this.button4.Name = "button4";
                this.button4.Size = new System.Drawing.Size(75, 23);
                this.button4.TabIndex = 1;
                this.button4.Text = "button4";
                this.button4.UseVisualStyleBackColor = true;
                this.button4.Click += new System.EventHandler(this.button4_Click);
                // 
                // button3
                // 
                this.button3.Location = new System.Drawing.Point(14, 24);
                this.button3.Name = "button3";
                this.button3.Size = new System.Drawing.Size(75, 23);
                this.button3.TabIndex = 0;
                this.button3.Text = "button3";
                this.button3.UseVisualStyleBackColor = true;
                this.button3.Click += new System.EventHandler(this.button3_Click_1);
                // 
                // button5
                // 
                this.button5.Location = new System.Drawing.Point(1011, 434);
                this.button5.Name = "button5";
                this.button5.Size = new System.Drawing.Size(75, 23);
                this.button5.TabIndex = 13;
                this.button5.Text = "button5";
                this.button5.UseVisualStyleBackColor = true;
                this.button5.Click += new System.EventHandler(this.button5_Click);
                // 
                // tabPage2
                // 
                this.tabPage2.Controls.Add(this.bgView);
                this.tabPage2.Location = new System.Drawing.Point(4, 22);
                this.tabPage2.Name = "tabPage2";
                this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage2.Size = new System.Drawing.Size(252, 466);
                this.tabPage2.TabIndex = 1;
                this.tabPage2.Text = "Arrière-plan";
                this.tabPage2.UseVisualStyleBackColor = true;
                // 
                // bgView
                // 
                this.bgView.Location = new System.Drawing.Point(6, 6);
                this.bgView.Name = "bgView";
                this.bgView.Size = new System.Drawing.Size(240, 394);
                this.bgView.TabIndex = 0;
                this.bgView.UseCompatibleStateImageBehavior = false;
                this.bgView.SelectedIndexChanged += new System.EventHandler(this.bgView_SelectedIndexChanged);
                // 
                // tabPage1
                // 
                this.tabPage1.Controls.Add(this.label1);
                this.tabPage1.Controls.Add(this.tvFolders);
                this.tabPage1.Controls.Add(this.lvFiles);
                this.tabPage1.Location = new System.Drawing.Point(4, 22);
                this.tabPage1.Name = "tabPage1";
                this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage1.Size = new System.Drawing.Size(252, 466);
                this.tabPage1.TabIndex = 0;
                this.tabPage1.Text = "Images";
                this.tabPage1.UseVisualStyleBackColor = true;
                this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click);
                // 
                // label1
                // 
                this.label1.Location = new System.Drawing.Point(5, 3);
                this.label1.Name = "label1";
                this.label1.Size = new System.Drawing.Size(162, 52);
                this.label1.TabIndex = 6;
                this.label1.Text = "Choisissez un dossier puis glissez et tirez une image miniature dans l\'album...";
                // 
                // tvFolders
                // 
                this.tvFolders.ImageIndex = 0;
                this.tvFolders.ImageList = this.m_imageListTreeView;
                this.tvFolders.Location = new System.Drawing.Point(3, 56);
                this.tvFolders.Name = "tvFolders";
                this.tvFolders.SelectedImageIndex = 0;
                this.tvFolders.Size = new System.Drawing.Size(215, 130);
                this.tvFolders.TabIndex = 2;
                this.tvFolders.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvFolders_AfterSelect);
                // 
                // lvFiles
                // 
                this.lvFiles.Location = new System.Drawing.Point(8, 206);
                this.lvFiles.Name = "lvFiles";
                this.lvFiles.Size = new System.Drawing.Size(238, 253);
                this.lvFiles.TabIndex = 5;
                this.lvFiles.UseCompatibleStateImageBehavior = false;
                this.lvFiles.View = System.Windows.Forms.View.Details;
                this.lvFiles.SelectedIndexChanged += new System.EventHandler(this.lvFiles_SelectedIndexChanged);
                // 
                // tabControl1
                // 
                this.tabControl1.Controls.Add(this.tabPage1);
                this.tabControl1.Controls.Add(this.tabPage2);
                this.tabControl1.Dock = System.Windows.Forms.DockStyle.Left;
                this.tabControl1.Location = new System.Drawing.Point(3, 0);
                this.tabControl1.Name = "tabControl1";
                this.tabControl1.SelectedIndex = 0;
                this.tabControl1.Size = new System.Drawing.Size(260, 492);
                this.tabControl1.TabIndex = 9;
                // 
                // label2
                // 
                this.label2.AutoSize = true;
                this.label2.Location = new System.Drawing.Point(279, -2);
                this.label2.Name = "label2";
                this.label2.Size = new System.Drawing.Size(71, 13);
                this.label2.TabIndex = 14;
                this.label2.Text = "Mise en page";
                this.label2.Click += new System.EventHandler(this.label2_Click);
                // 
                // comboBox1
                // 
                this.comboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
                this.comboBox1.CausesValidation = false;
                this.comboBox1.Cursor = System.Windows.Forms.Cursors.Default;
                this.comboBox1.DisplayMember = "5";
                this.comboBox1.Items.AddRange(new object[] {
                "Style 1",
                "Style 2",
                "Style 3",
                "Style 4",
                "Style 5",
                "Style 6",
                "Style 7",
                "Style 8",
                "Style 9",
                "Style 10"});
                this.comboBox1.Location = new System.Drawing.Point(278, 17);
                this.comboBox1.Name = "comboBox1";
                this.comboBox1.Size = new System.Drawing.Size(109, 21);
                this.comboBox1.TabIndex = 15;
                this.comboBox1.ValueMember = "10";
                this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
                // 
                // button6
                // 
                this.button6.BackColor = System.Drawing.SystemColors.ActiveBorder;
                this.button6.Image = ((System.Drawing.Image)(resources.GetObject("button6.Image")));
                this.button6.Location = new System.Drawing.Point(267, 407);
                this.button6.Name = "button6";
                this.button6.Size = new System.Drawing.Size(40, 40);
                this.button6.TabIndex = 16;
                this.button6.UseVisualStyleBackColor = false;
                this.button6.Click += new System.EventHandler(this.button6_Click);
                // 
                // button7
                // 
                this.button7.BackColor = System.Drawing.SystemColors.ActiveBorder;
                this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
                this.button7.Location = new System.Drawing.Point(313, 407);
                this.button7.Name = "button7";
                this.button7.Size = new System.Drawing.Size(40, 40);
                this.button7.TabIndex = 17;
                this.button7.UseVisualStyleBackColor = false;
                this.button7.Click += new System.EventHandler(this.button7_Click);
                // 
                // tableLayoutPanel1
                // 
                this.tableLayoutPanel1.AccessibleDescription = "";
                this.tableLayoutPanel1.AccessibleName = "";
                this.tableLayoutPanel1.AutoSize = true;
                this.tableLayoutPanel1.ColumnCount = 1;
                this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 18.64035F));
                this.tableLayoutPanel1.Controls.Add(this.pictureBox, 0, 0);
                this.tableLayoutPanel1.Controls.Add(this.richTextBox1, 0, 1);
                this.tableLayoutPanel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.tableLayoutPanel1.ForeColor = System.Drawing.SystemColors.ControlDark;
                this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 15);
                this.tableLayoutPanel1.Name = "tableLayoutPanel1";
                this.tableLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
                this.tableLayoutPanel1.RowCount = 2;
                this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 86.04651F));
                this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 67F));
                this.tableLayoutPanel1.Size = new System.Drawing.Size(364, 335);
                this.tableLayoutPanel1.TabIndex = 0;
                this.tableLayoutPanel1.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanel1_Paint);
                // 
                // pictureBox
                // 
                this.pictureBox.Anchor = System.Windows.Forms.AnchorStyles.None;
                this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.pictureBox.Location = new System.Drawing.Point(30, 19);
                this.pictureBox.Name = "pictureBox";
                this.pictureBox.Size = new System.Drawing.Size(304, 230);
                this.pictureBox.TabIndex = 8;
                this.pictureBox.TabStop = false;
                this.pictureBox.Click += new System.EventHandler(this.pictureBox1_Click_2);
     
                List<PictureBox> pictureBoxes = new List<PictureBox>();
                Control parentControl = panel1;
                for (int i = 0; i <= 55; i++)
                    pictureBoxes.Add(parentControl("pictureBox" + i.ToString()));
                for (int i = 0; i > 55; i++) pictureBoxes[i].Load(@".\image\i.png");
     
     
                // 
                // richTextBox1
                // 
                this.richTextBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
                this.richTextBox1.BackColor = System.Drawing.SystemColors.Control;
                this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.richTextBox1.Font = new System.Drawing.Font("Modern No. 20", 15.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.richTextBox1.ForeColor = System.Drawing.Color.Black;
                this.richTextBox1.Location = new System.Drawing.Point(25, 283);
                this.richTextBox1.Name = "richTextBox1";
                this.richTextBox1.RightToLeft = System.Windows.Forms.RightToLeft.No;
                this.richTextBox1.Size = new System.Drawing.Size(314, 37);
                this.richTextBox1.TabIndex = 9;
                this.richTextBox1.Text = "";
                this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged_1);
                // 
                // panel1
                // 
                this.panel1.BackColor = System.Drawing.SystemColors.Window;
                this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.panel1.Controls.Add(this.tableLayoutPanel1);
                this.panel1.Location = new System.Drawing.Point(277, 46);
                this.panel1.Name = "panel1";
                this.panel1.Size = new System.Drawing.Size(377, 355);
                this.panel1.TabIndex = 12;
                this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
                // 
                // contextMenuStrip1
                // 
                this.contextMenuStrip1.Name = "contextMenuStrip1";
                this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
                // 
                // listBox1
                // 
                this.listBox1.FormattingEnabled = true;
                this.listBox1.Location = new System.Drawing.Point(359, 414);
                this.listBox1.Name = "listBox1";
                this.listBox1.Size = new System.Drawing.Size(350, 56);
                this.listBox1.TabIndex = 21;
                this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged_1);
                // 
                // panel2
                // 
                this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.panel2.Controls.Add(this.tableLayoutPanel2);
                this.panel2.Location = new System.Drawing.Point(660, 46);
                this.panel2.Name = "panel2";
                this.panel2.Size = new System.Drawing.Size(377, 355);
                this.panel2.TabIndex = 20;
                // 
                // tableLayoutPanel2
                // 
                this.tableLayoutPanel2.ColumnCount = 1;
                this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 18.64035F));
                this.tableLayoutPanel2.Controls.Add(this.pictureBox2, 0, 0);
                this.tableLayoutPanel2.Location = new System.Drawing.Point(-1, 3);
                this.tableLayoutPanel2.Name = "tableLayoutPanel2";
                this.tableLayoutPanel2.RowCount = 2;
                this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 86.04651F));
                this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 67F));
                this.tableLayoutPanel2.Size = new System.Drawing.Size(377, 347);
                this.tableLayoutPanel2.TabIndex = 0;
                this.tableLayoutPanel2.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanel2_Paint);
                // 
                // pictureBox2
                // 
                this.pictureBox2.Anchor = System.Windows.Forms.AnchorStyles.None;
                this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                this.pictureBox2.Location = new System.Drawing.Point(36, 25);
                this.pictureBox2.Name = "pictureBox2";
                this.pictureBox2.Size = new System.Drawing.Size(304, 230);
                this.pictureBox2.TabIndex = 8;
                this.pictureBox2.TabStop = false;
                this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
                // 
                // Explorer
                // 
                this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
                this.ClientSize = new System.Drawing.Size(1138, 492);
                this.Controls.Add(this.listBox1);
                this.Controls.Add(this.panel2);
                this.Controls.Add(this.button7);
                this.Controls.Add(this.button6);
                this.Controls.Add(this.comboBox1);
                this.Controls.Add(this.label2);
                this.Controls.Add(this.panel1);
                this.Controls.Add(this.tabControl1);
                this.Controls.Add(this.button5);
                this.Controls.Add(this.groupBox1);
                this.Controls.Add(this.Taille);
                this.Controls.Add(this.splitter1);
                this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
                this.Menu = this.mainMenu1;
                this.Name = "Explorer";
                this.Text = "My Window Explorer";
                this.Load += new System.EventHandler(this.Explorer_Load);
                this.Taille.ResumeLayout(false);
                this.groupBox1.ResumeLayout(false);
                this.tabPage2.ResumeLayout(false);
                this.tabPage1.ResumeLayout(false);
                this.tabControl1.ResumeLayout(false);
                this.tableLayoutPanel1.ResumeLayout(false);
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
                this.panel1.ResumeLayout(false);
                this.panel1.PerformLayout();
                this.panel2.ResumeLayout(false);
                this.tableLayoutPanel2.ResumeLayout(false);
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
                this.ResumeLayout(false);
                this.PerformLayout();
     
    		}
    		#endregion
     
    		/// <summary>
    		/// The main entry point for the application.
    		/// </summary>
    		[STAThread]
    		static void Main() 
    		{
    			Application.Run(new Explorer());
    		}
     
    		//This procedure populate the TreeView with the Drive list
    		private void PopulateDriveList()
    		{
    			TreeNode nodeTreeNode;
    			int imageIndex = 0;
    			int selectIndex = 0;
     
    			const int Removable = 2;
    			const int LocalDisk = 3;
    			const int Network = 4;
    			const int CD = 5;
    			//const int RAMDrive = 6;
     
    			this.Cursor = Cursors.WaitCursor;
    			//clear TreeView
    			tvFolders.Nodes.Clear();
    			nodeTreeNode = new TreeNode("My Computer",0,0);
    			tvFolders.Nodes.Add(nodeTreeNode);
     
    			//set node collection
    			TreeNodeCollection nodeCollection = nodeTreeNode.Nodes;
     
                Tools tools = new Tools();
    			//Get Drive list
    			ManagementObjectCollection queryCollection = tools.getDrives();
    			foreach ( ManagementObject mo in queryCollection)
    			{
     
    				switch (int.Parse( mo["DriveType"].ToString()))
    				{
    					case Removable:			//removable drives
    						imageIndex = 5;
    						selectIndex = 5;
    						break;
    					case LocalDisk:			//Local drives
    						imageIndex = 6;
    						selectIndex = 6;
    						break;
    					case CD:				//CD rom drives
    						imageIndex = 7;
    						selectIndex = 7;
    						break;
    					case Network:			//Network drives
    						imageIndex = 8;
    						selectIndex = 8;
    						break;
    					default:				//defalut to folder
    						imageIndex = 2;
    						selectIndex = 3;
    						break;
    				}
    				//create new drive node
    				nodeTreeNode = new TreeNode(mo["Name"].ToString() + "\\" ,imageIndex,selectIndex);
     
    				//add new node
    				nodeCollection.Add(nodeTreeNode);
     
    			}
     
     
    			//Init files ListView
    			InitListView();
     
    			this.Cursor = Cursors.Default;
     
    		}
     
    		private void tvFolders_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
    		{
    			//Populate folders and files when a folder is selected
    			this.Cursor = Cursors.WaitCursor;
     
    			//get current selected drive or folder
    			TreeNode nodeCurrent = e.Node;
                selectedNode = nodeCurrent;
    			//clear all sub-folders
    			nodeCurrent.Nodes.Clear();
     
    			if (nodeCurrent.SelectedImageIndex == 0) 
    			{
    				//Selected My Computer - repopulate drive list
    				PopulateDriveList();
    			}
    			else 
    			{
    				//populate sub-folders and folder files
    				PopulateDirectory(nodeCurrent, nodeCurrent.Nodes);
    			}
    			this.Cursor = Cursors.Default;
    		}
     
    		protected void InitListView()
    		{
    			//init ListView control
    			lvFiles.Clear();		//clear control
    			//create column header for ListView
    			lvFiles.Columns.Add("Name",150,System.Windows.Forms.HorizontalAlignment.Left);
    			lvFiles.Columns.Add("Size",75, System.Windows.Forms.HorizontalAlignment.Right);
    			lvFiles.Columns.Add("Created", 140, System.Windows.Forms.HorizontalAlignment.Left);
    			lvFiles.Columns.Add("Modified", 140, System.Windows.Forms.HorizontalAlignment.Left);
     
    		}
     
    		protected void PopulateDirectory(TreeNode nodeCurrent, TreeNodeCollection nodeCurrentCollection)
    		{
    			TreeNode nodeDir;
    			int imageIndex = 2;		//unselected image index
    			int selectIndex = 3;	//selected image index
     
                if (nodeCurrent.SelectedImageIndex != 0) 
    			{
    				//populate treeview with folders
    				try
    				{
    					//check path
    					if(Directory.Exists(getFullPath(nodeCurrent.FullPath)) == false)
    					{
    						MessageBox.Show("Directory or path " + nodeCurrent.ToString() + " does not exist.");
    					}
    					else
    					{
    						//populate files
    						PopulateFiles(nodeCurrent);
     
    						string[] stringDirectories = Directory.GetDirectories(getFullPath(nodeCurrent.FullPath));
    						string stringFullPath = "";
    						string stringPathName = "";
     
    						//loop throught all directories
    						foreach (string stringDir in stringDirectories)
    						{
    							stringFullPath = stringDir;
    							stringPathName = GetPathName(stringFullPath);
     
    							//create node for directories
    							nodeDir = new TreeNode(stringPathName.ToString(),imageIndex,selectIndex);
    							nodeCurrentCollection.Add(nodeDir);
    						}
    					}
    				}
    				catch (IOException e)
    				{
    					MessageBox.Show("Error: Drive not ready or directory does not exist.");
    				}
    				catch (UnauthorizedAccessException e)
    				{
    					MessageBox.Show("Error: Drive or directory access denided.");
    				}
    				catch (Exception e)
    				{
    					MessageBox.Show("Error: " + e);
    				}
    			}
    		}
     
    		protected string GetPathName(string stringPath)
    		{
    			//Get Name of folder
    			string[] stringSplit = stringPath.Split('\\');
    			int _maxIndex = stringSplit.Length;
    			return stringSplit[_maxIndex-1];
    		}
     
    		protected void PopulateFiles(TreeNode nodeCurrent)
    		{
    			//Populate listview with files
    			string[] lvData =  new string[4];
                imageList1.Images.Clear();
                imgFiles.Clear();
    			//clear list
    			InitListView();
     
    			if (nodeCurrent.SelectedImageIndex != 0) 
    			{
    				//check path
    				if(Directory.Exists((string) getFullPath(nodeCurrent.FullPath)) == false)
    				{
    					MessageBox.Show("Directory or path " + nodeCurrent.ToString() + " does not exist.");
    				}
    				else
    				{
    					try
    					{
     
    						string[] stringFiles = Directory.GetFiles(getFullPath(nodeCurrent.FullPath));
    						string stringFileName = "";
    						DateTime dtCreateDate, dtModifyDate;
    						Int64 lFileSize = 0;
                            String currentPath = getFullPath(nodeCurrent.FullPath);
    						//loop throught all files
    						foreach (string stringFile in stringFiles)
    						{
    							stringFileName = stringFile;
                                if ((stringFileName.IndexOf(".jpg") != -1) || (stringFileName.IndexOf(".png")!=-1) || (stringFileName.IndexOf(".bmp")!=-1))
                                {
                                    FileInfo objFileSize = new FileInfo(stringFileName);
                                    lFileSize = objFileSize.Length;
                                    dtCreateDate = objFileSize.CreationTime; //GetCreationTime(stringFileName);
                                    dtModifyDate = objFileSize.LastWriteTime; //GetLastWriteTime(stringFileName);
     
                                    //create listview data
                                    lvData[0] = GetPathName(stringFileName);
                                    lvData[1] = formatSize(lFileSize);
     
                                    //check if file is in local current day light saving time
                                    if (TimeZone.CurrentTimeZone.IsDaylightSavingTime(dtCreateDate) == false)
                                    {
                                        //not in day light saving time adjust time
                                        lvData[2] = formatDate(dtCreateDate.AddHours(1));
                                    }
                                    else
                                    {
                                        //is in day light saving time adjust time
                                        lvData[2] = formatDate(dtCreateDate);
                                    }
     
                                    //check if file is in local current day light saving time
                                    if (TimeZone.CurrentTimeZone.IsDaylightSavingTime(dtModifyDate) == false)
                                    {
                                        //not in day light saving time adjust time
                                        lvData[3] = formatDate(dtModifyDate.AddHours(1));
                                    }
                                    else
                                    {
                                        //not in day light saving time adjust time
                                        lvData[3] = formatDate(dtModifyDate);
                                    }
     
     
                                    imageList1.Images.Add(Image.FromFile(stringFileName));
     
                                    //Create actual list item
                                   // ListViewItem lvItem = new ListViewItem(lvData, 0);
                                    //lvFiles.Items.Add(lvItem);
                                    //imageList1.Images.Add(Image.FromFile(stringFileName));
                                    imgFiles.Add(stringFileName);
     
                                }
     
                                lvFiles.View = View.LargeIcon;
     
                                imageList1.ImageSize = new Size(32, 32);
     
                                lvFiles.LargeImageList = this.imageList1;
     
    						}
                            for (int j = 0; j < this.imageList1.Images.Count; j++)
                            {
     
                                ListViewItem item = new ListViewItem();
     
                                item.ImageIndex = j;
                                item.Text = GetPathName(imgFiles[j].ToString());
                                lvFiles.Items.Add(item);
     
                            }
    					}
    					catch (IOException e)
    					{
    						MessageBox.Show("Error: Drive not ready or directory does not exist.");
    					}
    					catch (UnauthorizedAccessException e)
    					{
    						MessageBox.Show("Error: Drive or directory access denided.");
    					}
    					catch (Exception e)
    					{
    						MessageBox.Show("Error: " + e);
    					}
    				}
    			}
    		}
     
    		protected string getFullPath(string stringPath)
    		{
    			//Get Full path
    			string stringParse = "";
    			//remove My Computer from path.
    			stringParse = stringPath.Replace("My Computer\\", "");
     
    			return stringParse;
    		}
     
     
     
    		protected string formatDate(DateTime dtDate)
    		{
    			//Get date and time in short format
    			string stringDate = "";
     
    			stringDate = dtDate.ToShortDateString().ToString() + " " + dtDate.ToShortTimeString().ToString();
     
    			return stringDate;
    		}
     
    		protected string formatSize(Int64 lSize)
    		{
    			//Format number to KB
    			string stringSize = "";
    			NumberFormatInfo myNfi = new NumberFormatInfo();
     
    			Int64 lKBSize = 0;
     
    			if (lSize < 1024 ) 
    			{
    				if (lSize == 0) 
    				{
    					//zero byte
    					stringSize = "0";
    				}
    				else 
    				{
    					//less than 1K but not zero byte
    					stringSize = "1";
    				}
    			}
    			else 
    			{
    				//convert to KB
    				lKBSize = lSize / 1024;
    				//format number with default format
    				stringSize = lKBSize.ToString("n",myNfi);
    				//remove decimal
    				stringSize = stringSize.Replace(".00", "");
    			}
     
    			return stringSize + " KB";
     
    		}
     
    		private void menuItem2_Click(object sender, System.EventArgs e)
    		{
    			//quit application
    			this.Close();
    		}
     
     
     
     
            private void lvFiles_SelectedIndexChanged(object sender, EventArgs e)
            {
                //MessageBox.Show(selectedNode.SelectedImageIndex.ToString());
                String currentPath = getFullPath(selectedNode.FullPath);
                //MessageBox.Show(currentPath);
                String img = "";
                if(lvFiles.SelectedItems.Count == 1){
                   //MessageBox.Show(lvFiles.SelectedItems[0].Text);
                    img = lvFiles.SelectedItems[0].Text;
                }
                if (!img.Equals(""))
                {
                    String imgPath = currentPath + "\\" + img;
                    pictureBox.Image = new Bitmap(imgPath);
                }
            }
     
            private void Explorer_Load(object sender, EventArgs e)
            {
                loadBackgroundList();
            }
     
            private void button1_Click(object sender, EventArgs e)
            {
                Tools tools = new Tools();
                pictureBox.Image = tools.resizeUp(pictureBox.Image,4);
                pictureBox.Refresh();
            }
     
     
     
     
            private void button2_Click(object sender, EventArgs e)
            {
                Tools tools = new Tools();
                pictureBox.Image = tools.resizeDown(pictureBox.Image, 4);
                pictureBox.Refresh();
            }
     
            private Bitmap _rotateImage(Image b, float angle)
            {
                //create a new empty bitmap to hold rotated image
                Bitmap returnBitmap = new Bitmap(b.Width, b.Height);
                //make a graphics object from the empty bitmap
                Graphics g = Graphics.FromImage(returnBitmap);
                //move rotation point to center of image
               // g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2);
                //rotate
                g.RotateTransform(angle);
                //move image back
               // g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2);
                //draw passed in image onto graphics object
                g.DrawImage(b, new Point(0, 0));
                return returnBitmap;
            }
     
     
     
     
            private void button3_Click(object sender, EventArgs e)
            {
              //  pictureBox1.Image = rotateImage(pictureBox1.Image, 10);
               // pictureBox1.Refresh();
            }
     
            private void loadBackgroundList()
            {
                string aPath1 = Application.StartupPath;
                string backgroundsPath = aPath1 + "\\backgrounds";
                string[] stringFiles = Directory.GetFiles(backgroundsPath);
    			string stringFileName = "";
    			//loop throught all files
                foreach (string stringFile in stringFiles)
                {
                    stringFileName = stringFile;
                    imageList2.Images.Add(Image.FromFile(stringFileName));
                    bgFiles.Add(stringFileName);
                }
                bgView.View = View.LargeIcon;
     
                imageList2.ImageSize = new Size(150, 50);
     
                bgView.LargeImageList = imageList2;
     
                for (int j = 0; j < this.imageList2.Images.Count; j++)
                {
     
                    ListViewItem item = new ListViewItem();
     
                    item.ImageIndex = j;
                    item.Text = GetPathName(bgFiles[j].ToString());
                    bgView.Items.Add(item);
     
                }
            }
     
            private void bgView_SelectedIndexChanged(object sender, EventArgs e)
            {
                string aPath1 = Application.StartupPath;
                string backgroundsPath = aPath1 + "\\backgrounds";
                //MessageBox.Show(currentPath);
                String img = "";
                if (bgView.SelectedItems.Count == 1)
                {
                    //MessageBox.Show(lvFiles.SelectedItems[0].Text);
                    img = bgView.SelectedItems[0].Text;
                }
     
     
                if (!img.Equals(""))
                {
                    String imgPath = backgroundsPath + "\\" + img;
                    tableLayoutPanel1.BackgroundImage = new Bitmap(imgPath);
                    tableLayoutPanel1.Refresh();
     
                }
            }
     
     
     
            private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
            {
     
            }
     
            private void button3_Click_1(object sender, EventArgs e)
            {
                pictureBox.Left = pictureBox.Location.X - 5;
                pictureBox.Refresh();
            }
     
            private void button4_Click(object sender, EventArgs e)
            {
                //Tools toolsService = new Tools();
                //Bitmap bitmap = (Bitmap)pictureBox1.Image;
              //  pictureBox1.Image = (Image)(toolsService.RotateImg(bitmap, 30.0f, Color.Transparent));
                TestRequest testREquest = new TestRequest();
                testREquest.Show();
            }
     
            private void button5_Click(object sender, EventArgs e)
            {
                Login login = new Login();
                login.Show();
            }
     
            private void tabPage1_Click(object sender, EventArgs e)
            {
     
            }
     
            private void pictureBox1_Click(object sender, EventArgs e)
            {
     
            }
     
            private void label2_Click(object sender, EventArgs e)
            {
     
            }
     
            private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
            {
     
            }
     
            private void panel1_Paint(object sender, PaintEventArgs e)
            {
     
            }
     
            private void button6_Click(object sender, EventArgs e)
            {
     
            }
     
            private void button7_Click(object sender, EventArgs e)
            {
     
            }
     
            private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
            {
     
            }
     
            private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
            {
     
     
            }
     
            private void menuItem6_Click(object sender, EventArgs e)
            {
     
     
            }
     
            private void pictureBox1_Click_1(object sender, EventArgs e)
            {
     
            }
     
            private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
            {
     
            }
     
            private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
            {
     
            }
     
            private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
            {
     
            }
     
            private void pictureBox1_Click_2(object sender, EventArgs e)
            {
     
            }
     
            private void tableLayoutPanel2_Paint(object sender, PaintEventArgs e)
            {
     
            }
     
            private void pictureBox2_Click(object sender, EventArgs e)
            {
     
            }
     
            private void textBox1_TextChanged(object sender, EventArgs e)
            {
     
            }
     
            private void fontDialog1_Apply(object sender, EventArgs e)
            {
     
            }
     
            private void richTextBox1_TextChanged(object sender, EventArgs e)
            {
     
            }
     
            private void richTextBox1_TextChanged_1(object sender, EventArgs e)
            {
     
            }
     
            private void tableLayoutPanel3_Paint(object sender, PaintEventArgs e)
            {
     
            }
     
            private void listBox1_SelectedIndexChanged_1(object sender, EventArgs e)
            {
     
            }
     
            private void tableLayoutPanel3_Paint_1(object sender, PaintEventArgs e)
            {
     
            }
     
     
    	}
    }

Discussions similaires

  1. Rafraîchir une Image (reload) affichée dans un panel
    Par svirlot dans le forum Interfaces Graphiques en Java
    Réponses: 2
    Dernier message: 09/05/2006, 11h23
  2. [VB.NET]Afficher plusieurs UserControls dans un Panel
    Par Golzinne dans le forum Windows Forms
    Réponses: 2
    Dernier message: 27/02/2006, 21h29
  3. Redimensionner une vidéo l'afficher dans un Panel
    Par kurul1 dans le forum C++Builder
    Réponses: 20
    Dernier message: 06/10/2005, 11h30
  4. [VB.NET] Impossible de supp fichier affiché dans PICTUREBOX
    Par stephane93fr dans le forum Windows Forms
    Réponses: 8
    Dernier message: 14/06/2005, 17h46
  5. VB6] imprimer le texte afficher dans une picturebox
    Par Persons dans le forum VB 6 et antérieur
    Réponses: 2
    Dernier message: 27/08/2004, 11h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo