Search results for query: *

  1. J

    Called form resize calling form in InitializeComponent() of constructor

    formA calls formB like following. FormB formB = new FormB() formB.ShowDialog() When InitializeComponent() is run in the formB's constructor, formA is shrunk(resized) and become original size when formB_Load() starts. It's really weired. Can anybody give me any idea or advice regarding this...
  2. J

    does not contain a constructor ... error

    The following code is from Microsoft MSDN. public class Employee4 { public string id; public string name; public Employee4() { } public Employee4(string name, string id) { this.name = name; this.id = id...
  3. J

    Writting structure & array in file

    I have a structure and array. I want to write in a file in C#. Here is the C code. How do I do in C#? fp = fopen (filename, "wb"); if (! fp) { return -1; } fwrite (&bfh.bfType, 1, sizeof(BITMAPFILEHEADER), fp); fwrite (&bih.biSize, 1, sizeof(BITMAPINFOHEADER), fp); fwrite (imagearray, 1...
  4. J

    Bitmap generating C code

    Yes I was lazy, I'll try web search. I declared Structure. Next I should write to file. C# equivalent of fwrite is BinaryWriter? or BinaryFormatter? I'm trying like this. using (BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Create))) { writer.Write( ??? )...
  5. J

    Bitmap generating C code

    How to define BITMAPINFOHEADER structure in C#? And how to assign BITMAPINFOHEADER structure to Bitmap class?
  6. J

    Bitmap generating C code

    I have a C code which create bitmap like this. long SaveBmpFile( LPCTSTR filename, BYTE *ImageBitmap, DWORD BitmapByteCount, long width, long height) { FILE *fp; BITMAPFILEHEADER bfh; BITMAPINFOHEADER bih; DWORD dwBitmapByteCountPerLine; DWORD dwBitmapByteCount; dwBitmapByteCountPerLine =...
  7. J

    Cannot implicitly convert type 'long' to 'uint'

    I converted like this and removed error. BitmapByteCountPerLine = (uint)((IMGWIDTH * 3 + 3) & (~3)); It seems C# type conversion is more strict than C++.
  8. J

    Cannot implicitly convert type 'long' to 'uint'

    I comppile this code, error occurs. uint IMGWIDTH = 100; uint BitmapByteCountPerLine; BitmapByteCountPerLine = (IMGWIDTH * 3 + 3) & (~3);<=== Compile Error Cannot implicitly convert type 'long' to 'uint'. An explicit conversion exists (are you missing a...
  9. J

    Refresh label.text in Form_Load

    In ImageAcquireProc, wait for X-ray detection and acquire data as soon as X-ray exposure is detected. I tried backgroundWorker. I moved all codes in Form_Load to backgroundWorker_DoWork, I'm not sure if this is good way though.
  10. J

    Refresh label.text in Form_Load

    I made some call in the Form_Load and terminate like this. private void Form1_Load(object sender, EventArgs e) { Label1.Text = "Prepareing..."; SetGain("3"); SetIntegrationTime("500"); SetThresholdLevel("50")...
  11. J

    VB6 exe call C# exe

    Thanks. I'll try Environment.GetCommandLineArgs.
  12. J

    VB6 exe call C# exe

    Thanks for detailed answer. My C# program will be Windows Forms Application, not Console Application. Even in this case, I should do simillar way, is it right?
  13. J

    VB6 exe call C# exe

    No, I want to make separate execution file using C# FYI, passing parameter is like this. VB6 to C# : 1. offset 2. gain 3.min 4. max C# to VB6 : 1. file name 2. status
  14. J

    VB6 exe call C# exe

    My VB6 program should call some device interface program. I should make this device interface program using C#. Once VB6 program call C# execution file, C# program should run on the top most until it terminates. 1. How to make run C# program on the top most? Should it be done in VB6? or C#...
  15. J

    instance method

    What is the difference between instance method and other method? I can't figure out difference.
  16. J

    Windows Forms Application and WPF Application

    Thanks for kind answer.
  17. J

    Windows Forms Application and WPF Application

    What is the major difference between Windows Forms Application and WPF Application?
Back
Top Bottom