Expert Software Company : News

duminică, 28 octombrie 2012

Activare dezactivare tasta PrintScreen


#Define VK_PRINTSCREEN 0x2c
Declare Integer RegisterHotKey In user32 ;
Integer HWnd ;
, Integer Id ;
, Integer fsModifiers ;
, Integer vk
* Dezactivare
RegisterHotKey(_Screen.HWnd, 0, 0, VK_PRINTSCREEN)
* Activare
Declare Integer UnregisterHotKey In user32 Integer HWnd, Integer Id
UnregisterHotKey(_Screen.HWnd, 0)

Aflarea spatiului ocupat de o tabela DBF

*Select lcAlias
Wait Window Header() + Recsize() * Reccount() + 1

Salvare setari de retea

* Salvare
NetSh Dump > my_Network_cfg.txt

*Restaurare

NetSh Exec my_Network_cfg.txt

Obtinere inregistrari care nu se regasesc in alt tabel

Select From Tabla1 ;    WHERE Not Exists ;
   (
Select From Tabla2 ;
   WHERE Tabla1.Id = Tabla2.Id)

sau

Select From Tabla1 ;    Where Id Not In (Select Id From Tabla2)

Obtinere zecumale dintr-un numar

Function GetDecimals(tnDecimal  As Decimal) As Decimal
    Return tnDecimal - Int(tnDecimal)
EndFunc

Afisare CheckBox in Raport

Iif(CampLogic, Chr(0xFD), Chr(0xA8))

Public oForm
oForm=CreateObject("form1")
oForm.Show
Define Class form1 As Form
Top = 0
Left = 0
Height = 520
Width = 790
DoCreate = .T.
Name = "Form1"

Add Object Graf As OleControl With ;
Top = 10, ;
Left = 5, ;
Height = 500, ;
Width = 780, ;
Name = "Graf", ;
OleClass = "MSChart20Lib.MsChart"

Procedure Init
Text to _cliptext noshow
X1 X2 X3 X4
25 35 15 25
EndText
This.Graf.Editpaste
#Define VtChChartType2dPie 14
This.Graf.ChartType = VtChChartType2dPie
This.Graf.ShowLegend = .T.
This.Graf.TitleText = "Titul Graficului"
EndProc
EndDefine