Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Julio MGM
  Where is Julio MGM?
 Coimbra
 Portugal
 Julio MGM
 To: Julio MGM
  Where is Julio MGM?
 Coimbra
 Portugal
 Julio MGM
 Tags
Subject: RE: Abrir aplicacao Windows 8.1 Ecra Preto
Thread ID: 415988 Message ID: 415994 # Views: 49 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Windows 7 and VFP
Date: Thursday, December 18, 2014 12:26:26 PM         
   


I made a small exe with the next code to open my main app and also works ok.

It is not a soluction but for now i am going with it....

If anyone has any ideas on how i can solve this problem it would be great..

#DEFINE NORMAL_PRIORITY_CLASS 32
#DEFINE IDLE_PRIORITY_CLASS 64
#DEFINE HIGH_PRIORITY_CLASS 128
#DEFINE REALTIME_PRIORITY_CLASS 1600

DECLARE INTEGER CreateProcess IN kernel32.DLL ;
      INTEGER lpApplicationName, ;
      STRING lpCommandLine, ;
      INTEGER lpProcessAttributes, ;
      INTEGER lpThreadAttributes, ;
      INTEGER bInheritHandles, ;
      INTEGER dwCreationFlags, ;
      INTEGER lpEnvironment, ;
      INTEGER lpCurrentDirectory, ;
      STRING @lpStartupInfo, ;
      STRING @lpProcessInformation

DECLARE INTEGER GetLastError IN kernel32.DLL

* Startup info is 68 bytes, of which we need to
* initially populate the 'cb' or Count of Bytes member
* with the overall length of the structure.
* The remainder should be 0-filled.
START = long2str(68) + REPLICATE(CHR(0), 64)

* PROCESS_INFORMATION structure is 4 longs,
* or 4*4 bytes = 16 bytes, which we'll initially zero.
process_info = REPLICATE(CHR(0), 16)

* Start a copy of NOTEPAD (EXE name must be null-terminated)
File2Run = "arranque.exe" + CHR(0)

* Call CreateProcess, obtain a process handle. Treat the
* application to run as the 'command line' argument, accept
* all other defaults. Important to pass the start and
* process_info by reference.
RetCode = CreateProcess(0, File2Run, 0, 0, 1, ;
      NORMAL_PRIORITY_CLASS, 0, 0, @START, @process_info)

*!*	* Unable to run, exit now.
*!*	IF RetCode = 0
*!*	      =MESSAGEBOX("Error occurred. Error code: ", GetLastError())
*!*	      RETURN
*!*	ENDIF

*!*	READ EVENTS

********************
FUNCTION long2str
********************
* passed : 32-bit non-negative numeric value (m.longval)
* returns : ascii character representation of passed
*    value in low-high format (m.retstr)
* example :
*   m.long = 999999
*   m.longstr = long2str(m.long)
PARAMETERS m.longval

PRIVATE i, m.retstr

m.retstr = ""
FOR i = 24 TO 0 STEP -8

   m.retstr		= CHR(INT(m.longval/(2^i))) + m.retstr
   m.longval	= MOD(m.longval, (2^i))

   NEXT

RETURN m.retstr




Sorry for my English :)

ENTIRE THREAD

Open Aplication Windows 8.1 Black screen Posted by Julio MGM @ 12/18/2014 10:58:02 AM
RE: Abrir aplicacao Windows 8.1 Ecra Preto Posted by Julio MGM @ 12/18/2014 11:24:06 AM
RE: Abrir aplicacao Windows 8.1 Ecra Preto Posted by Julio MGM @ 12/18/2014 12:26:26 PM