2012-07-18 2 views
0

vb.net을 C#으로 변환하려고 시도했지만 컴파일하는 동안 계속 오류가 발생합니다. .NET을 처음 사용합니다. 이것은 변환 된 이미지 유틸리티 클래스의 제 버전입니다.vb.Net 프로젝트를 C# .Net 프로젝트로 변환

using Microsoft.VisualBasic; 
using System; 
using System.Collections; 
using System.Collections.Generic; 
using System.Data; 
using System.Diagnostics; 
using System.IO; 
using System.Drawing; 
using System.Drawing.Imaging; 
using System.Runtime.InteropServices; 
using Com.Griaule.IcaoFace; 
using System.Windows.Forms; 

namespace IcaoWF 
{ 
public class Util 
{ 

    //Set if the mouth is important 

    public const bool USES_MOUTH = true; 
    //The number of supported pictures 

    const int SFile = 3; 
    // 
    public const int FEATURES_COLOR = (255 << 8); 

    public const int FEATURES_SIZE = 8; 
    //File Vector with spec ID 

    TFile[] VTFile = new TFile[SFile + 1]; 
    //Pointers to the .NET classes 
    public FaceImage GrFaceImage = null; 
    public IcaoImage GrIcaoImage = null; 
    public CbeffImage GrCbeffImage = null; 

    public Cbeff GrCbeff = null; 

    ListBox log; 

    // raw image data type. 
    public struct TRawImage 
    { 
     // Image data. 
     public object img; 
     // Image width. 
     public int width; 
     // Image height. 
     public int height; 
     //Reduction Factor because stretch 
     public float frX; 
     public float frY; 
     //Eyes an mouth positions 
     public int lx; 
     public int ly; 
     public int rx; 
     public int ry; 
     public int mx; 
     public int my; 
    } 

    // File Enum Type 
    public enum EFile 
    { 
     BMP = 1, 
     JPEG2000 = 2, 
     CBEFF = 3, 
     NOTDEF = 0 
    } 

    //File Type 
    private struct TFile 
    { 
     //File Extension 
     public string fileExt; 
     //File Type 
     public EFile fileID; 
    } 

    //Class constructor 

    public Util(ListBox ltBox) 
    { 
     //Adding Supportted files 
     VTFile[1].fileExt = ".bmp"; 
     VTFile[1].fileID = EFile.BMP; 
     VTFile[2].fileExt = ".jp2"; 
     VTFile[2].fileID = EFile.JPEG2000; 
     VTFile[3].fileExt = ".cbeff"; 
     VTFile[3].fileID = EFile.CBEFF; 

     log = ltBox; 
    } 

    public void WriteError(GriauleIcaoFaceException err) 
    { 
     WriteLog("Error: " + err.ToString()); 
    } 

    // Write a message in box. 
    public void WriteLog(string message) 
    { 
     log.Items.Add(message); 
     log.SelectedIndex = log.Items.Count - 1; 
     log.ClearSelected(); 
    } 

    //Get the ID File Type from file path name 
    public EFile GetFileType(string fileName) 
    { 
     EFile functionReturnValue = default(EFile); 
     int i = 0; 
     for (i = 0; i <= SFile; i++) 
     { 
      if (Strings.InStr(1, fileName, VTFile[i].fileExt) == Strings.Len(fileName) - Strings.Len(VTFile[i].fileExt) + 1) 
      { 
       functionReturnValue = VTFile[i].fileID; 
       return functionReturnValue; 
      } 
     } 
     functionReturnValue = EFile.NOTDEF; 
     return functionReturnValue; 
    } 

    //Loading an Image 
    public bool LoadImage(string fileName, PictureBox img) 
    { 

     // create face image from file   
     GrFaceImage = new FaceImage(fileName); 

     // display face image 
     DisplayFaceImage(img, false); 

     WriteLog("Image loaded successfully."); 

     return true; 
    } 

    //Process the raw Image to FaceImage Type and paint the points on pBox 
    public bool ProcessFaceImage(PictureBox pBox) 
    { 

     //Set mouth to be relevant to generate the ICAO 
     GrFaceImage.MouthDetectionEnabled = USES_MOUTH; 

     WriteLog("Finding the eyes and mouth positions. Please, wait..."); 

     //Get the positions from mouth and eyes 
     if (GetPositionsFromFaceImage()) 
     { 
      WriteLog("Eyes and mouth founded. Drawing their positions on the image."); 
      //Display Face Image with eyes and mouth drawn 
      DisplayFaceImage(pBox, true); 
      return true; 
     } 
     else 
     { 
      //Display Face Image 
      DisplayFaceImage(pBox, false); 
      return false; 
     } 
    } 

    //Display the ICAO Image 

    public void DisplayIcaoImg(PictureBox imgIcao) 
    { 
     if (GrFaceImage.LeftEye.X <= 0 | GrFaceImage.LeftEye.Y <= 0 | GrFaceImage.LeftEye.X > GrFaceImage.Width | GrFaceImage.LeftEye.Y > GrFaceImage.Height) 
     { 
      WriteLog("Left eye is out of bounds."); 
      return; 
     } 

     if (GrFaceImage.RightEye.X <= 0 | GrFaceImage.RightEye.Y <= 0 | GrFaceImage.RightEye.X > GrFaceImage.Width | GrFaceImage.RightEye.Y > GrFaceImage.Height) 
     { 
      WriteLog("Right eye is out of bounds."); 
      return; 
     } 

     if (GrFaceImage.Mouth.X <= 0 | GrFaceImage.Mouth.Y <= 0 | GrFaceImage.Mouth.X > GrFaceImage.Width | GrFaceImage.Mouth.Y > GrFaceImage.Height) 
     { 
      WriteLog("Mouth is out of bounds."); 
      return; 
     } 

     //Get the GrIcaoImage 
     try 
     { 
      GrIcaoImage = GrFaceImage.FullFrontalImage(imgIcao.Width, 3.0/4.0, IcaoImage.IcaoFullFrontalMode.FullFrontal); 
     } 
     catch (GriauleIcaoFaceException ex) 
     { 
      WriteError(ex); 
      return; 
     } 

     //Getting the eyes positons from icao 
     if (GetPositionsFromIcaoImage()) 
     { 
      //Displaying the icao image 
      DisplayIcaoImage(imgIcao); 
     } 

     WriteLog("ICAO image generated."); 

    } 

    //Display Face Image 

    public void DisplayFaceImage(PictureBox pBox, bool withFeatures) 
    { 
     if (withFeatures) 
     { 
      pBox.Image = GrFaceImage.ImageWithFeatures(8, Color.Green); 
     } 
     else 
     { 
      pBox.Image = GrFaceImage.Image; 
     } 

     pBox.Update(); 

    } 

    //Display Cbeff Image 

    public void DisplayCbeffImage(PictureBox pBox) 
    { 
     pBox.Image = GrCbeffImage.Image; 
     pBox.Update(); 

    } 

    //Display Icao Image 

    public void DisplayIcaoImage(PictureBox pBox) 
    { 
     pBox.Image = GrIcaoImage.Image; 
     pBox.Update(); 

    } 

    //Save ICAO in CBEFF file format 

    public void SaveIcaoIntoCBEFFImage(string fileName) 
    { 
     // Create a CBEFF from Icao   

     if (GetCbeffFromIcao()) 
     { 
      //Get the CBEFF buffer 
      try 
      { 
       SaveBuffer(fileName, ref GrCbeff.CBEFF); 
      } 
      catch (GriauleIcaoFaceException ex) 
      { 
       WriteError(ex); 
      } 

     } 

    } 

    //Load an ICAO image from CBEFF file format 
    public void LoadIcaoFromCBEFFImage(string fileName, PictureBox pBox) 
    { 
     //Creating the cbeff from the buffer 
     try 
     { 
      GrCbeff = new Cbeff(LoadBuffer(fileName)); 
      GrCbeffImage = GrCbeff.Image(0); 
     } 
     catch (GriauleIcaoFaceException ex) 
     { 
      WriteError(ex); 
     } 

     // Display icao image   
     DisplayCbeffImage(pBox); 

    } 

    //Save ICAO image in JPEG2000 file format 
    public void SaveIcaoIntoJP2Image(string fileName) 
    { 
     // Create a CBEFF from Icao 
     if (!GetCbeffFromIcao()) 
     { 
      return; 
     } 

     //Get Jpeg2000 buffer from CBEFF and save it in a file   
     SaveBuffer(fileName, ref GrCbeffImage.BufferJPEG); 
    } 

    //Save Byte Buffer into a file 
    private void SaveBuffer(string fileName, ref byte[] buffer) 
    { 
     System.IO.FileStream oFileStream = new FileStream(fileName, FileMode.Create, FileAccess.Write); 
     System.IO.BinaryWriter swb = new System.IO.BinaryWriter(oFileStream); 
     swb.Write(buffer); 
     swb.Close(); 
    } 

    //Load stream from file 
    private byte[] LoadBuffer(string fileName) 
    { 
     // Open a file that is to be loaded into a byte array 
     FileInfo oFile = null; 
     oFile = new FileInfo(fileName); 

     System.IO.FileStream oFileStream = oFile.OpenRead(); 
     long lBytes = oFileStream.Length; 
     byte[] fileData = new byte[lBytes + 1]; 

     // Read the file into a byte array 
     oFileStream.Read(fileData, 0, lBytes); 
     oFileStream.Close(); 

     return fileData; 
    } 

    //Get CBEFF image from an Icao image 
    private bool GetCbeffFromIcao() 
    { 
     //Create Cbeff Image Data pointer 
     GrCbeff = new Cbeff(); 
     GrCbeffImage = GrCbeff.AddImage(GrIcaoImage, false, 0); 

     GrCbeffImage.Gender = CbeffImage.CbeffGender.Unknown; 
     GrCbeffImage.Eyes = CbeffImage.CbeffEyes.Unspecified; 
     GrCbeffImage.Hair = CbeffImage.CbeffHair.Unspecified; 
     GrCbeffImage.FeatureMask = 0; 
     GrCbeffImage.Expression = CbeffImage.CbeffExpression.Unspecified; 

     return true; 
    } 

    //Get eyes and mouth position from Face Image 
    public bool GetPositionsFromFaceImage() 
    { 
     float prob = 0; 
     //Get the eyes detection probabilty   
     prob = GrFaceImage.DetectionProbability; 
     if (prob == 0) 
     { 
      Interaction.MsgBox("There isn't any probability to find the eyes position.", Constants.vbCritical, "No probability"); 
      return false; 
     } 
     return true; 
    } 

    //Get eyes and mouth position from ICAO Image 
    public bool GetPositionsFromIcaoImage() 
    { 
     //get the position from an icao image. 
     float prob = 0; 
     prob = GrIcaoImage.DetectionProbability; 
     if (prob <= 0) 
     { 
      WriteLog("There isn't any probability to find the eyes position."); 
      return false; 
     } 
     return true; 
    } 

    //Set left eye position on library 
    public void SetLeftEyePos(int x, int y) 
    { 
     GrFaceImage.LeftEye = new Point(x, y); 
    } 

    //Set right eye position on library 
    public void SetRightEyePos(int x, int y) 
    { 
     GrFaceImage.RightEye = new Point(x, y); 
    } 

    //Set mouth position on library 
    public void SetMouthPos(int x, int y) 
    { 
     if (x > 0 & x < GrFaceImage.Width & y > 0 & y < GrFaceImage.Height) 
     { 
      Point p = new Point(x, y); 
      GrFaceImage.Mouth = p; 
     } 
    } 

    //Marshal between library and VB .NET. Copy an Variant Array to Byte() vector 
    public byte[] ConvertArrayToVByte(Array buffer) 
    { 
     GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); 
     IntPtr ptr = handle.AddrOfPinnedObject(); 
     byte[] bytes = new byte[buffer.Length + 1]; 
     Marshal.Copy(ptr, bytes, 0, bytes.Length); 
     return bytes; 
    } 

    // Show GriauleAfis version and type 
    public void MessageVersion() 
    { 
     int majorVersion = 0; 
     int minorVersion = 0; 

     GriauleIcaoFace.GetVersion(majorVersion, minorVersion); 
     MessageBox.Show("The GrIcaoFace DLL version is " + majorVersion + "." + minorVersion + ".", "GrIcaoFace Version", MessageBoxButtons.OK); 
    } 

} 
} 

Util.cs 나는 계속이 오류와 함께 오류가 발생합니다 :

여기

The type or namespace name 'ListBox' could not be found (are you missing a using directive or an assembly reference?).
The type or namespace name 'PictureBox' could not be found (are you missing a using directive or an assembly reference?).

그리고이 필요한 경우 내가 vb.net 버전을 게시 할 수있는 formMain.cs

using Microsoft.VisualBasic; 
using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 

namespace IcaoWF 
{ 
public partial class formMain : Form 
{ 
    public formMain(): base() 
    { 
     Load += formMain_Load; 
     InitializeComponent(); 
    } 

    // raw image data type. 
    private struct TSetting 
    { 
     // Image data. 
     public Button button; 
     // Image width. 
     public Label x; 
     public Label y; 
     public bool setting; 
    } 
    TSetting CSetting = new TSetting(); 

    Util myUtil = default(Util); 
    private void formMain_Load(Object sender, EventArgs e) 
    { 
     InitializeInterface(); 
     //Setting file filters 
     ldImg.Filter = "JPEG Images (*.jpg,*.jpeg)|*.jpg;*.jpeg|Gif Images (*.gif)|*.gif|Bitmaps (*.bmp)|*.bmp"; 
     ldIcaoImg.Filter = "CBEFF (*.cbeff)|*.cbeff"; 
     svIcaoImg.Filter = "JPEG2000 (*.jp2)|*.jp2|CBEFF (*.cbeff)|*.cbeff"; 
     myUtil = new Util(logBox); 

     //Verifieing if the mouth is important 
     gbMouth.Enabled = myUtil.USES_MOUTH; 
    } 

    //Unlock the interface and update the clicked iten 
    private void interfaceSetStop(int x, int y) 
    { 
     if (CSetting.setting) { 
      //Set the CSetting to false 
      CSetting.setting = false; 
      //Set positions from mouse to CSetting text selected 
      CSetting.x.Text = x.ToString(); 
      CSetting.y.Text = y.ToString(); 
      //Enable Set button again 
      CSetting.button.Enabled = true; 
      //Set the normal cursor above image 
      imgFace.Cursor = Cursors.Arrow; 
      //Enable all butons, disabled before 
      EnableButtons(); 

      //Sets new position from image 
      myUtil.SetLeftEyePos(lbLeftEyeXPos.Text, lbLeftEyeYPos.Text); 
      myUtil.SetRightEyePos(lbRightEyeXPos.Text, lbRightEyeYPos.Text); 
      if (myUtil.USES_MOUTH) { 
       myUtil.SetMouthPos(lbMouthXPos.Text, lbMouthYPos.Text); 
      } 

      //Redraw img 
      myUtil.DisplayFaceImage(imgFace, true); 
     } 
    } 

    //Initialize the program interface 
    private void InitializeInterface() 
    { 
     //Disable butons 
     DisableButtons(); 
     //Disbable image picture box 
     imgFace.Enabled = false; 
     //Current setting eye or mouth to false 
     CSetting.setting = false; 
     //Disable Save ICAO image 
     mnFileSaveIcaoImg.Enabled = false; 
     //Reset the logBox 
     logBox.ResetText(); 
    } 

    //Enable all butons from interface 
    private void EnableButtons() 
    { 
     btGenIcaoImage.Enabled = true; 
     btLeftEyeSet.Enabled = true; 
     btMouthSet.Enabled = true; 
     btRightEyeSet.Enabled = true; 
     btProcess.Enabled = true; 
     imgFace.Enabled = true; 
    } 

    //Set the inteface to click on the image 
    private void btLeftEyeSet_Click(Object sender, EventArgs e) 
    { 
     interfaceSetStart(btLeftEyeSet, lbLeftEyeXPos, lbLeftEyeYPos); 
    } 

    //Set the inteface to click on the image 
    private void lbRightEyeSet_Click(Object sender, EventArgs e) 
    { 
     interfaceSetStart(btRightEyeSet, lbRightEyeXPos, lbRightEyeYPos); 
    } 

    //Set the inteface to click on the image 
    private void btMouthSet_Click(Object sender, EventArgs e) 
    { 
     interfaceSetStart(btMouthSet, lbMouthXPos, lbMouthYPos); 
    } 

    //Lock the interface to click on image 
    private void interfaceSetStart(Button button, Label x, Label y) 
    { 
     //Set the clicked button set 
     CSetting.button = button; 
     //set the label to update the position 
     CSetting.x = x; 
     CSetting.y = y; 
     //Enable set mode 
     CSetting.setting = true; 
     //Disable the button 
     button.Enabled = false; 
     //Enable Cross cursor on image 
     imgFace.Cursor = Cursors.Cross; 
     //Disable button to avoid user to click in another area 
     DisableButtons(); 
    } 

    //Disable all buttons from interface 
    private void DisableButtons() 
    { 
     btGenIcaoImage.Enabled = false; 
     btLeftEyeSet.Enabled = false; 
     btMouthSet.Enabled = false; 
     btRightEyeSet.Enabled = false; 
     btProcess.Enabled = false; 
    } 


    //On click on the image, stop the interface and set the right position 
    private void imgFace_MouseDown(object sender, MouseEventArgs e) 
    { 
     interfaceSetStop(e.X/(imgFace.Width/myUtil.GrFaceImage.Width), e.Y/(imgFace.Height/myUtil.GrFaceImage.Height)); 
    } 

    //Gen the ICAO image from FaceImage 
    private void btGenIcaoImage_Click(Object sender, EventArgs e) 
    { 
     //Display ICAO image captured 
     myUtil.DisplayIcaoImg(imgIcaoImg); 
     //Enabled 
     mnFileSaveIcaoImg.Enabled = true; 
    } 

    //Load Icao IMAGE From CBEFF or JPEG2000 
    private void mnFileLoadIcaoImg_Click(Object sender, EventArgs e) 
    { 
     Util.EFile fileType = default(Util.EFile); 
     ldIcaoImg.FileName = ""; 

     //save the ICAO image 
     if (ldIcaoImg.ShowDialog == DialogResult.OK & !string.IsNullOrEmpty(ldIcaoImg.FileName)) 
     { 
      fileType = myUtil.GetFileType(ldIcaoImg.FileName); 
      switch (fileType) 
      { 

       case Util.EFile.CBEFF: 
        //Save CBEFF image 
        myUtil.LoadIcaoFromCBEFFImage(ldIcaoImg.FileName, imgIcaoImg); 
        break; 
       // 
       default: 
        //Image type not found 
        myUtil.WriteLog("File type not supported."); 
        return; 
      } 
     } 
    } 

    //Save ICAO Image 
    private void mnFileSaveIcaoImg_Click(Object sender, EventArgs e) 
    { 
     Util.EFile fileType = default(Util.EFile); 
     svIcaoImg.FileName = ""; 

     //save the ICAO image 
     if (svIcaoImg.ShowDialog == DialogResult.OK & !string.IsNullOrEmpty(svIcaoImg.FileName)) 
     { 
      fileType = myUtil.GetFileType(svIcaoImg.FileName); 
      switch (fileType) 
      { 

       case Util.EFile.CBEFF: 
        //Save CBEFF image 
        myUtil.SaveIcaoIntoCBEFFImage(svIcaoImg.FileName); 

        break; 
       case Util.EFile.JPEG2000: 
        //Save JPEG200 image 
        myUtil.SaveIcaoIntoJP2Image(svIcaoImg.FileName); 

        break; 
       default: 
        //Image type not found 
        myUtil.WriteLog("File type not supported."); 
        break; 
      } 
     } 
    } 

    //Load Image 

    private void mnFileLoadImg_Click(Object sender, EventArgs e) 
    { 
     lbLeftEyeXPos.Text = "0"; 
     lbLeftEyeYPos.Text = "0"; 
     lbRightEyeXPos.Text = "0"; 
     lbRightEyeYPos.Text = "0"; 
     lbMouthXPos.Text = "0"; 
     lbMouthYPos.Text = "0"; 

     //Disable buttons 
     DisableButtons(); 

     //Enable image 
     imgFace.Enabled = true; 
     //Set file name image to null 
     ldImg.FileName = ""; 
     if (ldImg.ShowDialog == DialogResult.OK & !string.IsNullOrEmpty(ldImg.FileName)) 
     { 
      //load image from FileName into imgFace Picture Box 

      if (myUtil.LoadImage(ldImg.FileName, imgFace)) 
      { 
       //Set the icaoImage to null 
       imgIcaoImg.Image = null; 
       imgIcaoImg.Refresh(); 

       //Disble mnFileSaveIcaoImg to save 
       mnFileSaveIcaoImg.Enabled = false; 

       //Disable buttons 
       DisableButtons(); 

       //Enable find eyes and mouth button 
       btProcess.Enabled = true; 
      } 
     } 
    } 

    //Close the program 
    private void MenuItem5_Click(Object sender, EventArgs e) 
    { 
     this.Close(); 
    } 

    //Process the Face Image 
    private void btProcess_Click(Object sender, EventArgs e) 
    { 
     //Enable buttons to set eyes and mouth 
     EnableButtons(); 

     //Process face image 

     if (myUtil.ProcessFaceImage(imgFace)) 
     { 
      //Get positions from face image 
      lbLeftEyeXPos.Text = myUtil.GrFaceImage.LeftEye.X.ToString(); 
      lbLeftEyeYPos.Text = myUtil.GrFaceImage.LeftEye.Y.ToString(); 
      lbRightEyeXPos.Text = myUtil.GrFaceImage.RightEye.X.ToString(); 
      lbRightEyeYPos.Text = myUtil.GrFaceImage.RightEye.Y.ToString(); 
      lbMouthXPos.Text = myUtil.GrFaceImage.Mouth.X.ToString(); 
      lbMouthYPos.Text = myUtil.GrFaceImage.Mouth.Y.ToString(); 

     } 

    } 

    //Print the DLL version 
    private void mnVersion_Click(Object sender, EventArgs e) 
    { 
     myUtil.MessageVersion(); 
    } 


} 
} 

입니다.

EDITED : 프로젝트에 제안 (System.Windows.Forms.dll)을 추가했으며 다른 모든 것은 사용하고 있습니다.

고맙습니다는 Nurcky

+0

그냥 마우스 오른쪽 버튼으로 클릭에 대한 참조를 추가합니다. – Habib

+0

June Roslyn CTP는 VB에서 C#으로 잘 작동하는 변환기와 함께 제공됩니다. 이 두 언어 사이에는 어휘 및 통사 변환을 할 수있는 유틸리티가 많이 있습니다. 만약 당신이 모를 경우 : http://www.developerfusion.com/tools/convert/vb-to-csharp/ –

+0

vb.net 하나 잘 작동합니다. Habib을 사용하여 "using System.Windows.Forms;"로 수정합니다. 그러나 그것은 나에게 정확할 더 많은 다른 에로스 52를 준다. 고맙습니다 하빕 – Nurcky

답변

2

ListBox는 System.Windows.Forms.dll 어셈블리에 정의되어있다. 해당 어셈블리에 대한 참조가 있는지 확인하십시오.

은 또한 당신은 아마

using System.Windows.Forms; 
+0

나는 그것을 시도했지만 철강은 더 많은 오류가 발생합니다. 고맙습니다 Eric – Nurcky

+0

지금 어떤 오류가 있습니까? –

+0

이것은 다음 중 하나입니다. "오류 이름 'Strings'이 (가) 현재 컨텍스트"at "에 없습니다. Strings.Len (VTFile [i] .fileExt) +1) " – Nurcky

1

System.Windows.Forms 네임 스페이스를 사용합니다. System.Windows.Forms 네임 스페이스를 사용하려면 System.Windows.Forms.dll을 참조로 추가해야합니다.

솔루션 탐색기에서

, 프로젝트 노드를 마우스 오른쪽 단추로 클릭하고 참조 추가를 클릭

다음과 같은 단계를 따르 참조를 추가합니다.

참조 추가 대화 상자에서 .NET 탭을 선택하고 System.Windows.Forms를 선택하고 확인을 클릭하십시오.

+0

나는 둘 다 해냈다. 도움이되지 않았다. 프로젝트는 메인 폼과 위에 게시 된 이미지 유틸리티 클래스로 구성됩니다.아마 내가 도움이 될 경우 모두 VB 버전을 게시해야합니다. – Nurcky

1

ListBox 및 PictureBox 컨트롤은 모두 System.Windows.Forms 네임 스페이스에 있습니다. 코드의 맨 위에 다음 문을 추가

using System.Windows.Forms;

는 그런 오류를 선택 결의를 얻고있는 클래스에 System.Windows.Forms.dll

+0

도움이되지 않았습니다 ... 저는 "Dim myUtil As Util"을 "Util myUtil = default (Util)"로 변환했습니다. 하지만 ""("myUtil.LoadImage (ofdLoadImage.FileName, pbMainImage))"에서 "mainForm.cs에서 새 객체 instace를 만드는 데" "오류가 발생합니다. 어떻게해야합니까? "Util myUtil = new Util();"하지만 오류가 발생합니다. – Nurcky

관련 문제