vb.net代码转换为c#代码,谢谢
想把下面的vb.net代码转换为c#代码,谢谢,在线等.
Sub SelPlay(strUrl,strWidth,StrHeight)
Dim Exts,isExt
If strUrl <> "" Then
isExt = LCase(Mid(strUrl,InStrRev(strUrl, ".")+1))
Else
isExt = ""
End If
Exts = "avi,wmv,asf,mov,rm,ra,ram"
If Instr(Exts,isExt)=0 Then
Response.write "非法视频文件"
Else
Select Case isExt
Case "avi","wmv","asf","mov"
Response.write "<EMBED id=MediaPlayer src="&strUrl&" width="&strWidth&" height="&strHeight&" loop=""false"" autostart=""true""></EMBED>"
Case "mov","rm","ra","ram"
Response.Write "<OBJECT height="&strHeight&" width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""9525"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""-1"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SRC"" VALUE="""&strUrl&""">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
Response.Write "<BR>"
Response.Write "<OBJECT height=32 width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""847"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ControlPanel,StatusBar"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
End Select
End If
End Sub
...全文
相关推荐
C#代码项目转换VB.NET项目代码(可整个项目转换)
转换代码:在项目加载后,选择要转换的C#源代码文件,右键单击,然后选择“转换”或“转换到VB.NET”。SharpDevelop会尝试自动将C#代码转换为等效的VB.NET代码。4.
VB.Net to C# Converter将VB代码转换成C#代码
这时,"VB.Net to C# Converter"软件便发挥了关键作用,它能够帮助程序员高效地将VB.Net代码转换为C#代码,大大节省了手动转换的时间和精力。
C#代码转换为VB.NET代码的工具
对于已经习惯C#语法的开发者来说,如果需要在VB.NET项目中工作,可能会面临代码转换的需求。这时,"C#代码转换为VB.NET代码的工具"就显得尤为重要。
C#代码转换为Vb.Net
在压缩包"ConvertCSharp2VB"中,可能包含的就是一个这样的转换工具或示例代码,用于演示如何将C#代码转换成VB.NET代码的过程。
VB.Net to C# Converter 代码转换工具
该工具能够帮助开发者将VB.Net编写的源代码自动转换为等效的C#代码,大大节省了手动转换的时间和精力。


