|
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
|
|
|
|
|
Hallo,I'm begginer in VB.How am I colorized row in listbox?
Thanks,
|
|
|
|
|
|
How can i move toolStrip in VB.NET 2005 as Microsoft Office Word
................
|
|
|
|
|
|
I don't know how insert icon to ToolStripCOmboBox in VB.NET 2005
................
|
|
|
|
|
|
It can not help me, Can u?
................
|
|
|
|
|
|
I want to open image in my application and store the path in button next and back to display image?
................
|
|
|
|
|
|
Is that a question or a statement?
|
|
|
|
|
It is question
................
|
|
|
|
|
help me i am a new Programmer
plz tell how to genarate a new XML file using VB.
malayasen
|
|
|
|
|
|
Help me please
i am new programmer
i have two problem
1. How to Get all form name in project ? (Code)
2. How to Create Data Provider Class to Cast type from Sql Or Oracle Type
Best Regard
Thank you
SiamBrain.NET
Hello
|
|
|
|
|
Hi all,
im workin on a sql statement to validate a login transaction.
how am i goin to have the value of a textbox in my sql statement?
im trying this code.
com_signon = New OleDbCommand("select * from tbl_access where user_id = !txt_username", con_db_ssr)
but it doesn't work...
-::maximus::-
|
|
|
|
|
Hi,
You can use like this:
"select * from tbl_access where user_id ='" & TextBox3.Text "'"
Hope this will help you.
Best Regards,
Apurva Kaushal
|
|
|
|
|
com_signon = New OleDbCommand("select * from tbl_access where user_id ='"& txt_username.Text &"'", con_db_ssr)
|
|
|
|
|
tnx guys
-::maximus::-
|
|
|
|
|
You should look into using a parameterized query instead.
Both examples that you got are totally open to SQL injection attacks.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All,
I have Data Grid on aspx page. One of the column in that grid is a Template Column. I have added a Drop down list in EditItemTemplate. If I add this in ItemTemplate I am able to bind the DropDownList in code behind by making a reference using the below code:
e.Item.Cells(4).FindControl("ddlCountry")
But when this control is present in EditItemTemplate I am not able to get the reference to the above control. Can anybody suggest me how to go ahead with this situation?
Thank you,
Krishnaraj
|
|
|
|
|
Hi,
You can use Onitemdatabound event of the datagrid to do this. What you need to do is in that event you just check for the edititemtype and then bind the dropdownlist.
Hope this will help you.
BTW This you better post in asp.net forum.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
Thank you for your kind response,
The code I metioned earlier is inside the Onitemdatabound and before binding I am checking the ‘ListItemType.EditItem’. I am getting problem when I try to get the reference to the control using the below code inside he event handler. Please check this below code
Dim cmb As New DropDownList
If e.Item.ItemType = ListItemType.EditItem Then
cmb = e.Item.Cells(4).FindControl("ddlCountry")
End If
In the above code ‘ddlCountry’ is the dropdown list control id. If I add this control in the Item Template instead of Edit item template I get reference to it.
Krishnaraj
|
|
|
|
|
Hi,
Directly use e.Item.FindControl("ddlCountry").
Best Regards,
Apurva Kaushal
|
|
|
|