Sponsor
Ricerca
Syndication
Sponsor
Trova programmatori esperti di progettazione e grapic a ScriptLance.com

byte per qualunque

Marzo 23, 2009

Funzione SetBytes (Byte) As String

On Error GoTo errorhandler

Se Bytes> = 1073741824 Poi
SetBytes = Format (Byte / 1024 / 1024 / 1024, "# 0,00") _
& "GB"
Elseif Bytes> = 1048576 Quindi
SetBytes = Format (Byte / 1024 / 1024, "# 0,00") & "MB"
Elseif Byte> = 1024 Then
SetBytes = Format (Byte / 1024, "# 0,00") & "KB"
Elseif Bytes <1024 Allora
SetBytes = Fix (Bytes) & "Bytes"
End If

Funzione uscita
errorhandler:
SetBytes = "non può calcolare"
End Function

Private Sub Form_Load ()
MsgBox SetBytes (1100)
End Sub

Da Inglese a Francese dizionario

22 marzo, 2009

# include
# include

dict char [] [2] [40] = (
"Ciao", "bonjour",
"Anno", "annee",
"Buona", "bon",
"Auto", "voiture",
"Casa", "maison",
"Sì", "oui",
"Amico", "amico",
"Strada", "rue",
"",""
);

int main (void)
(
int i = 0;
char parola [80];

printf ( "Inserire una parola in inglese per la ricerca for.n");
si (parola);
while (strcmp (dict [i] [0 ],""))
(
if (! strcmp (parola, dict [i] [0]))
(
printf ( "equivalente francese è il seguente:% sn", dict [i] [1]);
break;
)
i + +;
)

if (! strcmp (dict [i] [0], ""))
printf ( "Parola non found.n");

return 0;
)

cambiare sfondo finestre

22 marzo, 2009

Dichiarare Funzione SystemParametersInfo Lib "User32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam Come Qualsiasi, ByVal fuWinIni As Long) As Long

Public Const SPI_SETDESKWALLPAPER = 20

Dim lngSuccess As Long
Dim strBitmapImage As String

strBitmapImage = "h: windowsstraw.bmp"
lngSuccess = SystemParametersInfo (SPI_SETDESKWALLPAPER, 0, strBitmapImage, 0)

recenti documenti cartella vuota

21 marzo, 2009

# include
# include
# define WIN32_LEAN_AND_MEAN

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PStr szCmdLine, int iCmdShow)
(

if (MessageBox (NULL, "Premere OK per svuotare la cartella Documenti recenti". "riciclatore", MB_YESNO | MB_ICONINFORMATION)! = IDYES)
return FALSE;

SHAddToRecentDocs (SHARD_PATH, NULL);

return FALSE;
)

Elenco tutte le stampanti

20 marzo, 2009

Posizionare una casella combinata in un modulo e inserire il codice riportato di seguito.

Private Sub Form_Load ()
Dim stampante
Per ogni stampante In Stampanti
Combo1.AddItem printer.DeviceName
Successivo
End Sub

Tradurre