C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[72557] Re:Re:볼랜드c++ exe 파일 c#(비주얼스튜디어) 사용하는 방법 가르쳐주세요.
[] 4071 읽음    2015-04-20 13:37
근데 다른 메모장파일은 저렇게 소스해도 되더라구요
볼랜드만 안되는데 무슨 이유인지 모르겠어여 ㅠㅠ


님이 쓰신 글 :
:  님이 쓰신 글 :
: :
: : 안녕하세요..
: : 볼랜드c++ 컴파일한 exe 파일을 비쥬얼스튜디어에서 불러서 사용하려고 하는데요...
: : 다른 exe 파일은 실행이 되는데, 볼랜드 c++ exe 파일은 실행이 안되네여
: : 이게 15초에 exe가 실행되고 그뒤에 30초 동안 hide 되는 소스입니다.
: : 혹시, 볼랜드c++에서 컴파일할때 다르게 해야하는게 있나요??
: :
: : 혹시나 해서 c#소스를 올려드립니다.
: :
: : using System;
: : using System.Diagnostics;
: : using System.Runtime.InteropServices;
: : using System.Threading;
: : 
: : namespace WindowChange
: : {
: :     class Program
: :     {
: :         [DllImport("user32.dll")]
: :         static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
: : 
: :         static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
: :         static readonly IntPtr HWND_NOTOPMOST = new IntPtr(-2);
: :         static readonly IntPtr HWND_TOP = new IntPtr(0);
: : 
: :         const UInt32 SWP_NOSIZE = 0x0001;
: :         const UInt32 SWP_NOMOVE = 0x0002;
: :         const UInt32 SWP_NOZORDER = 0x0004;
: :         const UInt32 SWP_NOREDRAW = 0x0008;
: :         const UInt32 SWP_NOACTIVATE = 0x0010;
: :         const UInt32 SWP_FRAMECHANGED = 0x0020;  /* The frame changed: send WM_NCCALCSIZE */
: :         const UInt32 SWP_SHOWWINDOW = 0x0040;
: :         const UInt32 SWP_HIDEWINDOW = 0x0080;
: :         const UInt32 SWP_NOCOPYBITS = 0x0100;
: :         const UInt32 SWP_NOOWNERZORDER = 0x0200;  /* Don't do owner Z ordering */
: :         const UInt32 SWP_NOSENDCHANGING = 0x0400;  /* Don't send WM_WINDOWPOSCHANGING */
: :         const UInt32 TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE;
: : 
: :         static void Main(string[] args)
: :         {
: :
: :             System.Diagnostics.Process SamsungProject1;
: :
: :             System.Diagnostics.Process MiPlatform320U;
: :
: :
: :             //string sFileName = @"SamsungProject1.exe";
: :
: :             //System.Diagnostics.ProcessStartInfo prif = new System.Diagnostics.ProcessStartInfo("SamsungProject1.exe");
: :
: :             //prif.CreateNoWindow = true;
: :             //prif.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
: :             //prif.Arguments = sFileName;
: :             //SamsungProject1 = System.Diagnostics.Process.Start(prif);
: :
: :             //SamsungProject1 = Process.Start("SamsungProject1");
: :
: :             //iexplore = Process.Start("MiPlatform320U");
: :
: :             SamsungProject1 = Process.Start("notepad");
: :             //SamsungProject1 = Process.GetProcessesByName("SamsungProject1");
: :
: :
: :
: :             Thread.Sleep(5000);
: :
: :             //MiPlatform320U = Process.Start("MiPlatform320U");
: :             //MiPlatform320U = Process.GetProcessesByName("iexplore");
: :
: :             //Thread.Sleep(20000);
: :
: :
: :
: :
: :            
: :             while (true)
: :             {
: :                 //Thread.Sleep(1000);
: :                 Console.WriteLine("Change SamsungProject1 SWP_FRAMECHANGED Start");
: :
: :                 SetWindowPos(SamsungProject1.MainWindowHandle, HWND_NOTOPMOST, 0, 0, 1920, 1080, SWP_SHOWWINDOW);
: :
: :                 Console.WriteLine("Change SamsungProject1 SWP_FRAMECHANGED End");
: :                
: :                 Thread.Sleep(5000);
: :
: :                 Console.WriteLine("Change SamsungProject1 SWP_HIDEWINDOW Start");
: :
: :                 SetWindowPos(SamsungProject1.MainWindowHandle, HWND_NOTOPMOST, 0, 0, 1920, 1080, SWP_HIDEWINDOW);
: :
: :                 Console.WriteLine("Change SamsungProject1 SWP_HIDEWINDOW End");
: :
: :                 Thread.Sleep(5000);
: :                 //Console.WriteLine("Change SamsungProject1 SWP_SHOWWINDOW Start");
: :                 //SetWindowPos(SamsungProject1.MainWindowHandle, HWND_NOTOPMOST, 0, 0, 1920, 1080, SWP_SHOWWINDOW);
: :
: :                 //Console.WriteLine("Change SamsungProject1 SWP_SHOWWINDOW End");
: :
: :                 //Console.WriteLine("Change MiPlatform320U Start");
: :                 //SetWindowPos(MiPlatform320U.MainWindowHandle, HWND_TOPMOST, 0, 0, 1920, 1080, SWP_SHOWWINDOW);
: :                 //Console.WriteLine("Change MiPlatform320U End");
: :
: :                 //Thread.Sleep(8000);
: :
: :                 //SetWindowPos(calc.MainWindowHandle, HWND_TOP, 0, 0, 1920, 1080, SWP_HIDEWINDOW);
: :
: :             }
: :            
: :
: :         }
: :
: :         public static Process iexplore { get; set; }
: :     }
: : }
: :
:
: "SamsungProject1"이 패스가 걸려있지 않은 듯.
:

+ -

관련 글 리스트
72547 볼랜드c++ exe 파일 c#(비주얼스튜디어) 사용하는 방법 가르쳐주세요. 4090 2015/04/18
72548     Re:볼랜드c++ exe 파일 c#(비주얼스튜디어) 사용하는 방법 가르쳐주세요. 4296 2015/04/18
72557         Re:Re:볼랜드c++ exe 파일 c#(비주얼스튜디어) 사용하는 방법 가르쳐주세요. 4071 2015/04/20
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.