PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
Novo Exemplo TrayIcon, rodando na bandeja do Windows - DOG - Security DOG - Tray ICON - Iconize - Minimize - Relogio do Windows
Published by Boller
in the category Tools
New features



Description
Novo Exemplo Tray Icon (Trayicon/TrayIcone) Rodando na bandeja do Windows e controlando as tarefas do Gerenciador de Tarefas/Task Manager do Windows podendo fechar aplicações via linha de comando

Novo Exemplo TrayIcon, rodando na bandeja do Windows - DOG - Security DOG - Tray ICON - Iconize - Minimize - Relogio do Windows - Gerenciador de tarefas do Windows

New Example Tray Icon (Trayicon/TrayIcone) Running on the Windows tray and controlling the tasks of the Windows Task Manager/Task Manager being able to close applications via command line

Nouvel exemple d'icône de la barre d'état (Trayicon/TrayIcone) Fonctionnant dans la barre d'état Windows et contrôlant les tâches du gestionnaire de tâches de Windows pouvant fermer des applications via la ligne de commande

Nuevo Ejemplo de Icono de Bandeja (Trayicon/TrayIcone) Ejecutándose en la bandeja de Windows y controlando las tareas del Administrador de Tareas de Windows/Trask Manager pudiendo cerrar las aplicaciones a través de la línea de comandos

DUVIDAS, SUGESTÕES E CRITICAS ME MANDE NO E-MAIL

adrianoboller@gmail.com

ou +55 41 99491800 / 41999491800
Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
Boller
// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] NumberHD ()
//
// Parameters:
// None
// Return Value:
// ANSI string: // None
//
// For instance:
// Indicate an example.
//
PROCEDURE NumberHD()

nInfo is 8-byte int
nInfo = fDriveInfo("C:", fdSerialNumber)
//Info("The serial number of the disk is: "+nInfo)
gsNumHD = nInfo

RESULT nInfo
Boller
// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] PowerComputer ()
//
// Parameters:
// None
// Return Value:
// ANSI string: // None
//
// For instance:
// Indicate an example.
//
PROCEDURE PowerComputer()

sPowerComputer is string = ""

SERIAL_DOUNGLE_WEBDEV, SERIAL_DOUNGLE_WINDEV, SERIAL_DOUNGLE_WINDEVMOBILE, Windows, SerialWindows is string = ""

//FUNCAO GET SERIAL DOUNGLE
SERIAL_DOUNGLE_WEBDEV = 10
SERIAL_DOUNGLE_WINDEV = 20
SERIAL_DOUNGLE_WINDEVMOBILE = 30

sBaseBoardManufacturer, sBaseBoardProduct, sBaseBoardVersion, sBIOSReleaseDate, sBIOSVendor, sBIOSVersion, sSystemFamily, sSystemManufacturer is string = ""

ResExist1 is boolean = RegistryExist("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS")

ResExist2 is boolean = RegistryExist("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0")

IF ResExist1 = True AND ResExist2 = True

sBaseBoardManufacturer = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardManufacturer", True)
sBaseBoardProduct = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardProduct", True)
sBaseBoardVersion = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardVersion", True)
sBIOSReleaseDate = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BIOSReleaseDate", True)
sBIOSVendor = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BIOSVendor", True)
sBIOSVersion = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "BIOSVersion", True)
sSystemFamily = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "SystemFamily", True)
sSystemManufacturer = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "SystemManufacturer", True)

sPowerComputer = RegistryQueryValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", True)
GravaConfig("Processador",sPowerComputer)
sPowerComputer = sPowerComputer + CRLF

sPlaca_Mae is string = sBaseBoardManufacturer +" - "+ sBaseBoardProduct +" - "+ sBaseBoardVersion +" - "+ sBIOSReleaseDate +" - "+ sBIOSVendor +" - "+ sBIOSVersion +" - "+ sSystemFamily +" - "+ sSystemManufacturer
GravaConfig("PlacaMae",sPlaca_Mae)
sPowerComputer += sPlaca_Mae + CRLF

sWindows is string = RegistryQueryValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName", True)
GravaConfig("Windows",sWindows)
sPowerComputer += sWindows + CRLF

SerialWindows = RegistryQueryValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "BuildGUID", True)
GravaConfig("SerialWindows",SerialWindows)
sPowerComputer += SerialWindows + CRLF

sVersion_Windows is string = Windows +" - "+ SerialWindows +" - "+ SysWindowsVersion(sysProcessor) +" bits - "+ SysWindowsVersion(sysVersionBuild) +" - "+ SysWindowsVersion(sysVersionInfo) +" - "+ SysWindowsVersion(sysVersionNumber) +" - "+ SysWindowsVersion(sysVersionPlatform)
GravaConfig("Version_Windows",sVersion_Windows)
sPowerComputer += sVersion_Windows + CRLF

sPais is string = RegistryQueryValue("HKEY_CURRENT_USER\Control Panel\International", "sCountry", True)
GravaConfig("Pais",sPais)
sPowerComputer += sPais + CRLF

sIdioma is string = RegistryQueryValue("HKEY_CURRENT_USER\Control Panel\International", "LocaleName", True)
GravaConfig("Idioma",sIdioma)
sPowerComputer += sIdioma + CRLF

sPathWindows is string = RegistryQueryValue("HKEY_CURRENT_USER\Environment", "Path", True)
GravaConfig("PathWindows",sPathWindows)
sPowerComputer += sPathWindows + CRLF

END

sIP_4 is string = NetIPAddress()
GravaConfig("IP_4",sIP_4)
sPowerComputer += sIP_4 + CRLF
//gsIP = sIP_4

sPlaca_de_Rede_Mac is string = Upper(NetMACAddress())
GravaConfig("Placa_de_Rede_Mac",sPlaca_de_Rede_Mac)
sPowerComputer += sPlaca_de_Rede_Mac + CRLF

sName_PC is string = Upper(NetMachineName())
GravaConfig("Name_PC",sName_PC)
//gsName_PC = sName_PC
sPowerComputer += sName_PC + CRLF

sUser_Windows is string = Upper(NetworkUser())
GravaConfig("User_Windows",sUser_Windows)
sPowerComputer += sUser_Windows + CRLF
//gsUserWindows = sUser_Windows


//PCSOFT
gsPCSOFT is string = RegistryQueryValue("HKEY_LOCAL_MACHINE\SOFTWARE\Aladdin Knowledge Systems\HASP\Driver\Installer", "DrvPkgVersion", True)
GravaConfig("PCSOFT",gsPCSOFT)
sPowerComputer += gsPCSOFT + CRLF


//Marca_Modelo_Placa_de_Rede
sPlaca_de_Rede_Marca_Modelo,sPlaca_de_Rede_ServiceName is string
ResExist3 is boolean = RegistryExist("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards")
IF ResExist3 = True THEN

Key is string = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"
Achou is string = ""
x is int = 0
WHILE Key <> ""
x+= 1
Achou = RegistryQueryValue(Key+x, "Description", True)
IF Achou <> ""
sPlaca_de_Rede_Marca_Modelo = Achou
sPlaca_de_Rede_ServiceName = RegistryQueryValue(Key+x, "ServiceName", True)
BREAK
END
IF x > 5 THEN
BREAK
END
END
END
sPowerComputer += sPlaca_de_Rede_Marca_Modelo +" / "+ sPlaca_de_Rede_ServiceName + CRLF
//-------------------------------------------------------------------------------------

//AMBIENTE USER - DIRETORIOS A SEREM CRIPTOGRAFADOS
IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Documents\")
sDoc_User is string = "C:\Users\"+Upper(NetworkUser())+"\Documents\"
GravaConfig("Doc_User",sDoc_User)
sPowerComputer += sDoc_User + CRLF

sPPDATA is string = "C:\Users\"+Upper(NetworkUser())+"\AppData\Roaming\"
GravaConfig("APPDATA",sPPDATA)
sPowerComputer += sPPDATA + CRLF

sLOCALAPPDATA is string = "C:\Users\"+Upper(NetworkUser())+"\AppData\Local"
GravaConfig("LOCALAPPDATA",sLOCALAPPDATA)
sPowerComputer += sLOCALAPPDATA + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Pictures\")
sImages_User is string = "C:\Users\"+Upper(NetworkUser())+"\Pictures\"
GravaConfig("Images_User",sImages_User)
sPowerComputer += sImages_User + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Contacts\")
sContacts_User is string = "C:\Users\"+Upper(NetworkUser())+"\Contacts\"
GravaConfig("Contacts_User",sContacts_User)
sPowerComputer += sContacts_User + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Desktop\")
sDesktop_User is string = "C:\Users\"+Upper(NetworkUser())+"\Desktop\"
GravaConfig("Desktop_User",sDesktop_User)
sPowerComputer += sDesktop_User + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Downloads\")
sDownloads_User is string = "C:\Users\"+Upper(NetworkUser())+"\Downloads\"
GravaConfig("Downloads_User",sDownloads_User)
sPowerComputer += sDownloads_User + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Music\")
sMusic_User is string = "C:\Users\"+Upper(NetworkUser())+"\Music\"
GravaConfig("Music_User",sMusic_User)
sPowerComputer += sMusic_User + CRLF
END

IF fDirectoryExist("C:\Users\"+Upper(NetworkUser())+"\Videos\")
sVideos_User is string = "C:\Users\"+Upper(NetworkUser())+"\Videos\"
GravaConfig("Videos_User",sVideos_User)
sPowerComputer += sVideos_User + CRLF
END

//Wx
sProject_Windev is string
IF fDirectoryExist("C:\My Projects\")
sProject_Windev = "C:\My Projects\"
ELSE IF fDirectoryExist("D:\My Projects\")
sProject_Windev = "D:\My Projects\"
ELSE IF fDirectoryExist("E:\My Projects\")
sProject_Windev = "E:\My Projects\"
END
GravaConfig("Project_Windev",sProject_Windev)
sPowerComputer += sProject_Windev + CRLF

//WB
sProject_Webdev is string
IF fDirectoryExist("C:\My Sites\")
sProject_Webdev = "C:\My Sites\"
ELSE IF fDirectoryExist("D:\My Sites\")
sProject_Webdev = "D:\My Sites\"
ELSE IF fDirectoryExist("E:\My Sites\")
sProject_Webdev = "E:\My Sites\"
END
GravaConfig("Project_Webdev",sProject_Webdev)
sPowerComputer += sProject_Webdev + CRLF

//WM
sProject_Windev_Mobile is string
IF fDirectoryExist("C:\My Mobile Projects\")
sProject_Windev_Mobile = "C:\My Mobile Projects\"
ELSE IF fDirectoryExist("D:\My Mobile Projects\")
sProject_Windev_Mobile = "D:\My Mobile Projects\"
ELSE IF fDirectoryExist("E:\My Mobile Projects\")
sProject_Windev_Mobile = "E:\My Mobile Projects\"
END
GravaConfig("Project_Windev_Mobile",sProject_Windev_Mobile)
sPowerComputer += sProject_Windev_Mobile + CRLF

//Meus Documentos
sDoc_User_Alternativo is string
IF fDirectoryExist("C:\Meus Documentos\")
sDoc_User_Alternativo = "C:\Meus Documentos\"
ELSE IF fDirectoryExist("D:\Meus Documentos\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "D:\Meus Documentos\"
ELSE IF fDirectoryExist("E:\Meus Documentos\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "E:\Meus Documentos\"
ELSE

IF fDirectoryExist("C:\My Documents\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "C:\My Documents\"
ELSE IF fDirectoryExist("D:\My Documents\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "D:\My Documents\"
ELSE IF fDirectoryExist("E:\My Documents\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "E:\My Documents\"
ELSE

IF fDirectoryExist("C:\Documentos\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "C:\Documentos\"
ELSE IF fDirectoryExist("D:\Documentos\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "D:\Documentos\"
ELSE IF fDirectoryExist("E:\Documentos\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "E:\Documentos\"
ELSE

IF fDirectoryExist("C:\Documents\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "C:\Documents\"
ELSE IF fDirectoryExist("D:\Documens\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "D:\Documents\"
ELSE IF fDirectoryExist("E:\Documents\") AND sDoc_User_Alternativo = ""
sDoc_User_Alternativo = "E:\Documents\"
ELSE
sDoc_User_Alternativo = ""
END

END

END

END
IF sDoc_User_Alternativo <> ""
GravaConfig("Doc_User_Alternativo",sDoc_User_Alternativo)
sPowerComputer += sDoc_User_Alternativo + CRLF
END

//Programas Instalados
sProgramas is string = RegistryListkey("HKEY_CURRENT_USER\Software")
GravaConfig("Programas32bits",sProgramas)
sPowerComputer += sProgramas + CRLF

sProgramas64 is string = RegistryListkey("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node")
GravaConfig("Programas64bits",sProgramas64)
sPowerComputer += sProgramas64 + CRLF
//gsComputador = sPowerComputer

sPowerComputerCrypt is string = HashString(HA_HMAC_SHA3_512,sPowerComputer)
GravaConfig("PCID",sPowerComputerCrypt)

RESULT sPowerComputer
Boller
// Summary: <specify the procedure action>
// Syntax:
//CreateShortcuts ()
//
// Parameters:
// None

// Return value:
// For instance:
PROCEDURE CreateShortcuts()


//CRIA O ATALHO NA TELA

sShortcut_Name is string = "TrayIcon"
sShortcut_Command is string = fCurrentDir()+"\TrayIcon.exe"

//Diretorio de execução
//IF fDirectoryExist("C:\Program Files\") = False THEN
// fMakeDir("C:\Program Files\")
//END
//
//IF fDirectoryExist("C:\Program Files\TrayIcon\") = False THEN
// fMakeDir("C:\Program Files\TrayIcon\")
//END

//Copiar arquivo
//IF fFileExist("C:\Program Files\TrayIcon\TrayIcon.exe") = False
// fCopyFile(fCurrentDir()+"\TrayIcon.exe",fCurrentDir()+"\TrayIcon.exe")
//END

//Criar Autorun no Registro
RegistrySetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\", sShortcut_Name, sShortcut_Command)

//criação dos atalhos
//Atalho no iniciar
//shortcutDesktop - Atalho criado na área de trabalho do Windows para todos os usuários de computador.
IF CreateShortCut(shortcutDesktop, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
IF ErrorInfo() THEN
//shortcutUserDesktop = Atalho criado na área de trabalho do Windows para o usuário atual do computador.
IF CreateShortCut(shortcutUserDesktop, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
END
END
END

//Atalho criado no menu "Iniciar .. Programas .. Inicialização" do Windows para todos os usuários de computador.
IF CreateShortCut(shortcutStartup, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
IF ErrorInfo() THEN
//Shortcut created in the "Start .. Programs .. Startup" menu of Windows for the current computer user.
IF CreateShortCut(shortcutUserStartup, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
END
END
END


//Menu Program
IF CreateShortCut(shortcutProgram, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
IF ErrorInfo() THEN
IF CreateShortCut(shortcutUserProgram, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
END
END
END


//Menu Iniciar
IF CreateShortCut(shortcutStart, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
IF ErrorInfo() THEN
IF CreateShortCut(shortcutUserStart, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
END
END
END

//C:\Users\ADRIANO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
Usuario is string = ""
sDirStartup is string = "C:\Users\"+Usuario+"\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\"
IF fDirectoryExist(sDirStartup) = True THEN
IF CreateShortCut(shortcutUserStart, sShortcut_Name, sShortcut_Command, "", swsNormal, "A") = False THEN
Error("Failure creating the shortcut in" + SysDir(srCommonDesktop) + ...
", check your rights (administrator privileges required)", ErrorInfo())
END
END