We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to use carousel control for using database in vb.net (window form)

Thread ID:





114538 Nov 22,2013 08:04 PM Dec 5,2013 11:12 AM Windows Forms 1
Tags: Tools
Asked On November 22, 2013 08:04 PM


    i want to create application pic view using database.i dont know to code for carousel..can you give simple application carousel using database.thank.

Kannan R [Syncfusion]
Replied On December 5, 2013 11:12 AM

Hi Amat,


Thank you for using Syncfusion products.




i want to create application pic view using database.


can you give simple application carousel using database

Yes, we have prepared sample that loads carousel child items background image from Database.




1)     New SQL database and table needs to be created.

2)     Need to save image in created database table as byte array value.


Code Snippet:[VB]


Dim stream As New MemoryStream()




Dim pic() As Byte=stream.ToArray()


com.Parameters.AddWithValue("@Pic", pic)



3)     And to load image in carousel, need to retrieve and store saved image in DataTable.

4)     Carousel child panel image can be defined with this retrieved image.


Code Snippet:[VB]


dp.Fill(ds, "MyImages")

Dim myRow As DataRow

myRow = ds.Tables("MyImages").Rows(0)


MyData = CType(myRow("fldPic"), Byte())


Dim stream As New MemoryStream(MyData)

'With the code below, you are in fact converting the byte array of image

'to the real image.

Me.panel2.BackgroundImage = Image.FromStream(stream)




Please find the sample in below location.


Sample Location: Carosel DB.zip




It is needed to set SQL DB and its DataSource settings based on your machine.



Please let us know if it helps,





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.