Click here to Skip to main content
16,005,037 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionAuthentication Pin
Anu_Bala31-May-06 2:16
Anu_Bala31-May-06 2:16 
AnswerRe: Authentication Pin
Tim Carmichael31-May-06 3:11
Tim Carmichael31-May-06 3:11 
QuestionDataGridView - prevent selection highlighting Pin
mdsffm31-May-06 0:54
mdsffm31-May-06 0:54 
AnswerRe: DataGridView - prevent selection highlighting Pin
sathish s31-May-06 2:42
sathish s31-May-06 2:42 
AnswerRe: DataGridView - ignore the previous post Pin
sathish s31-May-06 2:43
sathish s31-May-06 2:43 
AnswerRe: DataGridView - prevent selection highlighting Pin
Kschuler31-May-06 4:11
Kschuler31-May-06 4:11 
GeneralRe: DataGridView - prevent selection highlighting Pin
mdsffm31-May-06 4:18
mdsffm31-May-06 4:18 
Questionmediadet getbitmapbits in vb.net Pin
asadn14731-May-06 0:41
asadn14731-May-06 0:41 
Smile | :) I am trying to use the getbitmapbits funtion of the mediadet in vb.net,is that possible,My code is given below plz find errors,as it does not respond when getitmapbits function is called.


CODE

Dim width As Integer = 480
Dim heigh As Integer = 640
'Dim mediatype1 As _AMMediaType
' Dim vih As videoinfoheader = mediatype1.
' get buffer size
Dim abuffer As Byte = 0
Dim buffer As IntPtr = IntPtr.Zero
Dim md As MediaDet
md.Filename() = txtFName.Text
md.CurrentStream() = 0

Dim bufferSize1 As Integer = 0
md.GetBitmapBits(0, bufferSize1, abuffer, width, Height)
MessageBox.Show("buffersize got and is = " & bufferSize1)
Dim bmpinfoheaderSize As Integer = 40
Dim bufferSize As Integer = (((width * Height) * 24) / 8) + _ bmpinfoheaderSize

' allocate buffer, then get bitmap bits
buffer = Marshal.AllocHGlobal(bufferSize)
md.GetBitmapBits(0, bufferSize, abuffer, width, Height)

' marshal to struct and then dealloc
'dim header as BitmapInfoHeader = system.Runtime.InteropServices._ Marshal.PtrToStructure(buffer,typeof(BitmapInfoHeader))
Dim p As New Bitmap(width, Height, width * 3,_ Imaging.PixelFormat.Format24bppRgb, New IntPtr(CInt(abuffer) + 40))
PBox.Image() = p

System.Runtime.InteropServices.Marshal.FreeHGlobal(buffer)



Asad

QuestionColor listbox Pin
mikica1731-May-06 0:02
mikica1731-May-06 0:02 
AnswerRe: Color listbox Pin
Mekong River31-May-06 0:07
Mekong River31-May-06 0:07 
QuestionToolStrip Pin
Socheat.Net30-May-06 23:26
Socheat.Net30-May-06 23:26 
AnswerRe: ToolStrip Pin
Mekong River31-May-06 0:11
Mekong River31-May-06 0:11 
QuestionToolStrip ComboBox Pin
Socheat.Net30-May-06 23:12
Socheat.Net30-May-06 23:12 
AnswerRe: ToolStrip ComboBox Pin
Mekong River31-May-06 0:10
Mekong River31-May-06 0:10 
GeneralRe: ToolStrip ComboBox Pin
Socheat.Net7-Jun-06 23:15
Socheat.Net7-Jun-06 23:15 
GeneralRe: ToolStrip ComboBox Pin
Mekong River7-Jun-06 23:31
Mekong River7-Jun-06 23:31 
QuestionVB.NET Image Pin
Socheat.Net30-May-06 23:05
Socheat.Net30-May-06 23:05 
AnswerRe: VB.NET Image Pin
Mekong River31-May-06 0:18
Mekong River31-May-06 0:18 
AnswerRe: VB.NET Image Pin
Steven J Jowett9-Jun-06 0:06
Steven J Jowett9-Jun-06 0:06 
GeneralRe: VB.NET Image Pin
Socheat.Net11-Jun-06 21:36
Socheat.Net11-Jun-06 21:36 
Questiongeneration of XML file Pin
Malayasen30-May-06 21:51
Malayasen30-May-06 21:51 
AnswerRe: generation of XML file Pin
Mekong River31-May-06 0:20
Mekong River31-May-06 0:20 
QuestionHelp me please,How to ... Pin
SiamBrain.NET30-May-06 21:28
SiamBrain.NET30-May-06 21:28 
QuestionPass Value Pin
zenithmaximus30-May-06 20:47
zenithmaximus30-May-06 20:47 
AnswerRe: Pass Value Pin
_AK_30-May-06 20:54
_AK_30-May-06 20:54 

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

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