Click here to Skip to main content
11,428,825 members (63,702 online)

Visual Basic

 
QuestionUsing large XML dataset efficiently Pin
DisIsHoody7-Nov-12 9:16
memberDisIsHoody7-Nov-12 9:16 
AnswerRe: Using large XML dataset efficiently Pin
David Mujica7-Nov-12 10:10
memberDavid Mujica7-Nov-12 10:10 
Questionvb.net Web Browser Control! how to automate when web page is using frames. Pin
Kieran Sloan7-Nov-12 5:27
memberKieran Sloan7-Nov-12 5:27 
AnswerRe: vb.net Web Browser Control! how to automate when web page is using frames. Pin
Zaf Khan26-Nov-12 3:13
memberZaf Khan26-Nov-12 3:13 
QuestionHelp with Error Message Pin
GeorgieMPorgie5-Nov-12 4:32
memberGeorgieMPorgie5-Nov-12 4:32 
AnswerRe: Help with Error Message Pin
Wayne Gaylard5-Nov-12 5:05
mentorWayne Gaylard5-Nov-12 5:05 
GeneralRe: Help with Error Message Pin
GeorgieMPorgie5-Nov-12 6:03
memberGeorgieMPorgie5-Nov-12 6:03 
GeneralRe: Help with Error Message Pin
Wayne Gaylard5-Nov-12 19:31
mentorWayne Gaylard5-Nov-12 19:31 
QuestionUse Reportvier to Show Table with Unknown Number of Columns Pin
Member 76634803-Nov-12 16:03
memberMember 76634803-Nov-12 16:03 
AnswerRe: Use Reportvier to Show Table with Unknown Number of Columns Pin
Dave Kreskowiak4-Nov-12 5:25
mvpDave Kreskowiak4-Nov-12 5:25 
AnswerRe: Use Reportvier to Show Table with Unknown Number of Columns Pin
Mycroft Holmes4-Nov-12 12:54
memberMycroft Holmes4-Nov-12 12:54 
QuestionHow can i retrieve image to pictureBox ? Pin
heinhtataung1-Nov-12 19:04
memberheinhtataung1-Nov-12 19:04 
AnswerRe: How can i retrieve image to pictureBox ? Pin
Eddy Vluggen2-Nov-12 1:57
memberEddy Vluggen2-Nov-12 1:57 
AnswerRe: How can i retrieve image to pictureBox ? Pin
SZLMCL7-Nov-12 0:20
memberSZLMCL7-Nov-12 0:20 
hy

This function converts byte array to image:

Public Shared Function ByteArrayToImage(ByVal ByteArr() As Byte) As Object
                Dim ImageStream As System.IO.MemoryStream
 
                Try
                    If ByteArr.GetUpperBound(0) > 0 Then
                        ImageStream = New System.IO.MemoryStream(ByteArr)
                        Return Image.FromStream(ImageStream)
                    Else
                        Return Nothing
                    End If
                Catch ex As Exception
                    Return Nothing
                End Try
            End Function

and this convert back:

 Public Shared Function ImageToByteArray(ByVal NewImage As Image) As Object
                Dim ImageStream As System.IO.MemoryStream
                Dim ByteArr() As Byte
 
                Try
                    ReDim ByteArr(0)
                    If NewImage IsNot Nothing Then
                        ImageStream = New System.IO.MemoryStream
                        NewImage.Save(ImageStream, Imaging.ImageFormat.Jpeg)
                        ReDim ByteArr(CInt(ImageStream.Length - 1))
                        ImageStream.Position = 0
                        ImageStream.Read(ByteArr, 0, CInt(ImageStream.Length))
                    End If
                    Return ByteArr
                Catch ex As Exception
                    Return Nothing
                End Try
            End Function

+You need DBNull check when the column allow nulls.
QuestionHow can i save image in my N-tier application? Pin
heinhtataung31-Oct-12 21:20
memberheinhtataung31-Oct-12 21:20 
AnswerRe: How can i save image in my N-tier application? Pin
Eddy Vluggen1-Nov-12 4:05
memberEddy Vluggen1-Nov-12 4:05 
QuestionAI program Pin
Casey Edison31-Oct-12 6:04
memberCasey Edison31-Oct-12 6:04 
AnswerRe: AI program Pin
Simon_Whale31-Oct-12 6:08
memberSimon_Whale31-Oct-12 6:08 
GeneralRe: AI program Pin
Casey Edison31-Oct-12 6:13
memberCasey Edison31-Oct-12 6:13 
AnswerRe: AI program Pin
Richard MacCutchan31-Oct-12 8:59
mvpRichard MacCutchan31-Oct-12 8:59 
GeneralRe: AI program Pin
Casey Edison31-Oct-12 13:26
memberCasey Edison31-Oct-12 13:26 
GeneralRe: AI program Pin
Richard MacCutchan1-Nov-12 0:18
mvpRichard MacCutchan1-Nov-12 0:18 
GeneralRe: AI program Pin
Casey Edison1-Nov-12 1:42
memberCasey Edison1-Nov-12 1:42 
GeneralRe: AI program Pin
Richard MacCutchan1-Nov-12 3:06
mvpRichard MacCutchan1-Nov-12 3:06 
GeneralRe: AI program Pin
Casey Edison1-Nov-12 9:14
memberCasey Edison1-Nov-12 9:14 
GeneralRe: AI program Pin
Richard MacCutchan1-Nov-12 9:19
mvpRichard MacCutchan1-Nov-12 9:19 
GeneralRe: AI program Pin
Casey Edison1-Nov-12 13:40
memberCasey Edison1-Nov-12 13:40 
GeneralRe: AI program Pin
Richard MacCutchan1-Nov-12 15:55
mvpRichard MacCutchan1-Nov-12 15:55 
GeneralRe: AI program Pin
Casey Edison1-Nov-12 9:15
memberCasey Edison1-Nov-12 9:15 
GeneralRe: AI program Pin
Eddy Vluggen2-Nov-12 2:08
memberEddy Vluggen2-Nov-12 2:08 
QuestionHow to INSERT multiple rows of data to sql table? Pin
zaimah31-Oct-12 2:28
memberzaimah31-Oct-12 2:28 
AnswerRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 3:11
memberEddy Vluggen31-Oct-12 3:11 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
zaimah31-Oct-12 3:28
memberzaimah31-Oct-12 3:28 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 3:48
memberEddy Vluggen31-Oct-12 3:48 
GeneralRe: How to INSERT multiple rows of data to sql table? [modified] Pin
zaimah31-Oct-12 4:01
memberzaimah31-Oct-12 4:01 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 4:22
memberEddy Vluggen31-Oct-12 4:22 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
zaimah31-Oct-12 4:53
memberzaimah31-Oct-12 4:53 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 4:58
memberEddy Vluggen31-Oct-12 4:58 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
zaimah31-Oct-12 5:17
memberzaimah31-Oct-12 5:17 
AnswerRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 5:53
memberEddy Vluggen31-Oct-12 5:53 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
zaimah31-Oct-12 6:28
memberzaimah31-Oct-12 6:28 
GeneralRe: How to INSERT multiple rows of data to sql table? Pin
Eddy Vluggen31-Oct-12 7:20
memberEddy Vluggen31-Oct-12 7:20 
AnswerRe: How to INSERT multiple rows of data to sql table? Pin
Andy_L_J15-Nov-12 21:14
memberAndy_L_J15-Nov-12 21:14 
AnswerRe: How to INSERT multiple rows of data to sql table? [modified] Pin
April Fans19-Dec-12 18:43
memberApril Fans19-Dec-12 18:43 
QuestionMemory required by a form Pin
Gagnon Claude30-Oct-12 2:35
memberGagnon Claude30-Oct-12 2:35 
AnswerRe: Memory required by a form Pin
Eddy Vluggen30-Oct-12 3:38
memberEddy Vluggen30-Oct-12 3:38 
AnswerRe: Memory required by a form Pin
Dave Kreskowiak30-Oct-12 8:07
mvpDave Kreskowiak30-Oct-12 8:07 
GeneralRe: Memory required by a form Pin
Gagnon Claude30-Oct-12 14:24
memberGagnon Claude30-Oct-12 14:24 
GeneralRe: Memory required by a form Pin
Dave Kreskowiak30-Oct-12 14:45
mvpDave Kreskowiak30-Oct-12 14:45 
QuestionWhy can't i find a consistent set of examples for SQL and Linq Pin
Gerald Connolly29-Oct-12 12:51
memberGerald Connolly29-Oct-12 12:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150428.2 | Last Updated 3 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid