如下VB代码:
Public Class Form1
Dim DyLikeDrawLib As New DYD.DYD
Dim PngPath As String
Dim PNG As Bitmap
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PngPath = "y:\图片库\0.png" 'PNG图片地址
PNG = New Bitmap(PngPath)
DyLikeDrawLib.UserKey = "D" '授权码
DyLikeDrawLib.DrawBP(Me, PNG, 255) 'DrawBP(要显示的目标窗体,PNG图,透明度)
End Sub
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or &H80000
Return cp
End Get
End Property
End Class
因本人没有学过VB所以也不知VB语法所以请问翻译成C#应该是什么呢?
信手写的,看不懂也别太较真儿~
public class Form1 : Form
{
DYD.DYD DyLikeDrawLib =new DYD.DYD();
string PngPath ;
Bitmap PNG ;
private Form1_Load(object sender,EventArgse){
PngPath = "y:\图片库\0.png" 'PNG图片地址;
PNG = New Bitmap(PngPath);
DyLikeDrawLib.UserKey = "D" //授权码;
DyLikeDrawLib.DrawBP(Me, PNG, 255) //DrawBP(要显示的目标窗体,PNG图,透明度);
}
...