I suspect that the class INI is not working o Vista.
Any issues on this ?
Antonio
c_dir := GetModuleFilename(GetInstance(),"MYPROG.EXE" + CHR(0), 255)
c_path := left ( c_dir, rat( "\", c_dir) -1 )
// ---------- READ FROM INI ----------------
IF !FILE ( c_path + "\Info.ini" )
SAVE_INI("N")
ENDIF
IF FILE ( c_path + "\Infobar.ini" )
INI oIni FILE c_path + "\Info.ini"
GET nDATE SECTION "Main" ENTRY "DATESET" OF oIni DEFAULT "5"
GET nINSERT SECTION "Main" ENTRY "WRITESET" OF oIni DEFAULT "1"
GET nORIENT SECTION "Main" ENTRY "ORIENTAT" OF oIni DEFAULT "1"
ENDINI
ENDIF
// ---------- SAVE TO INI --------------
FUNCTION SAVE_INI(message)
local cIni := c_path + "\Info.ini"
IF WritePProString( "Main", "DATESET", ALLTRIM(STR(e_RADIO1)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF WritePProString( "Main", "WRITESET", ALLTRIM(STR(e_INSERT)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF WritePProString( "Main", "ORIENTAT", ALLTRIM(STR(e_ORIENT)), cIni ) = .F.
MsgAlert("Not possible, to write in INI-File", "INI-File")
RETURN( NIL )
ENDIF
IF FILE(cIni)
cOpen := "Notepad.exe " + cIni
WinExec( "&cOpen" )
ELSE
MsgAlert( "Couldn't create File : " + cIni + " !!!","ATTENTION")
ENDIF
RETURN( NIL )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 62 guests