This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
37 lines (34 loc) · 1.37 KB
/
Form1.vb
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
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports System.Reflection
Imports System.IO
Imports DevExpress.XtraBars.Ribbon
Namespace WindowsFormsApplication40
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
Dim Group As New GalleryItemGroup()
Group.Items.Add(New DevExpress.XtraBars.Ribbon.GalleryItem(GetImage("1.jpg"), "1", "1"))
Group.Items.Add(New DevExpress.XtraBars.Ribbon.GalleryItem(GetImage("2.jpg"), "2", "2"))
Group.Items.Add(New DevExpress.XtraBars.Ribbon.GalleryItem(GetImage("3.jpg"), "3", "3"))
myGalleryControl1.Gallery.Groups.Add(Group)
myGalleryControl1.Gallery.ImageSize = New Size(100, 100)
AddHandler myGalleryControl1.KeyboardSelectedItemChanged, AddressOf myGalleryControl1_KeyboardSelectedItemChanged
End Sub
Private Sub myGalleryControl1_KeyboardSelectedItemChanged(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Public Function GetImage(ByVal name As String) As Image
Dim executed As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim stream As Stream = executed.GetManifestResourceStream("" & name)
Return Image.FromStream(stream)
End Function
End Class
End Namespace