Ç뽫ÒÔÏÂvb´úÂëÈçºÎдΪC#´úÂë лл - .NET¼¼Êõ / C#
Ç뽫ÒÔÏÂvb´úÂëÈçºÎдΪC#´úÂë лл
VB code:
Dim lpszName As New VBFixedStringAttribute(100)
Dim i As Integer
Dim DriverName As String = Space(80)
Dim DriverVersion As String = Space(80)
Dim bmp As BITMAPINFO
With bmp.bmiHeader
.biSize = Len(bmp.bmiHeader)
.biWidth = 320
.biHeight = 240
.biPlanes = 1
.biBitCount = 24
End With
i=0 'ÉãÏñÍ·ËùÔÚµÄ×éºÅ
capGetDriverDescriptionA(i, DriverName, 80, DriverVersion, 80)
lwndC1 = capCreateCaptureWindowA(DriverName, WS_VISIBLE Or WS_CHILD, 0, 0, PictureBox1.Width, PictureBox1.Height, PictureBox1.Handle.ToInt32, 0)
If capDriverConnect(lwndC1, 0) Then
capDlgVideoSource(lwndC1)
capPreviewRate(lwndC1, 66)
capPreview(lwndC1, True)
capSetVideoFormat(lwndC1, bmp, Len(bmp))
SetWindowPos(lwndC1, 0, 0, 0, bmp.bmiHeader.biWidth, bmp.bmiHeader.biHeight, SWP_NOMOVE Or SWP_NOZORDER)
ListBox1.Items.Add(DriverName.Trim)
End If
Function capDlgVideoSource(ByVal lwnd As Long) As Boolean
capDlgVideoSource = SendMessage(lwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0)
End Function
ÆäÖУº
Public Const WM_CAP_START As Integer = WM_USER
Public Const WM_CAP_DLG_VIDEOSOURCE As Integer = WM_CAP_START + 42
http://www.developerfusion.com/tools/convert/vb-to-csharp/
ÔÚÏßת»»
C# code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlight
Ïà¹ØÎÊ´ð£º
DataSetµ¼³öxml Åú´¦Àí(Ñ»·)µÃÔõô´¦Àí
XMLÎļþ
<A>
<B>
<C>
</C>
&nb ......
Ôõô°ÑÒÑÖªµÄÊý¾Ý±£´æ³ÉxmlÎļþ£¬ÏÖÔÚÒÑÖªµÄÊý¾ÝÊÇ
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o=& ......
ÏÖÔÚÓиöxmlÎļþÊÇ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
dim a as string,b as string£¬c as string
a="¹¤³Ì±àºÅ,µ¥Î»¹¤³ÌÃû³Æ,·Ö²¿¹¤³Ì±àºÅ"
b="µ¥Î»¹¤³ÌÃû³Æ"
c="µ¥Î»"
Ôõô²ÅÄÜÅжϳöa×Ö·û´®ÖдæÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®
¿´¿´i ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆÌ¨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£ ......