Sponsorer
Søgning
Syndication
Sponsorer
Find freelance programmører på ScriptLance.com - Søg på verdensplan

bytes at uanset

23 marts 2009

Funktion SetBytes (byte) Som String

On Error Goto errorhandler

Hvis Bytes> = 1073741824 Derefter
SetBytes = Format (Bytes / 1024 / 1024 / 1024, "# 0.00") _
& "GB"
ElseIf Bytes> = 1048576 Derefter
SetBytes = Format (Bytes / 1024 / 1024, "# 0.00") & "MB"
ElseIf Bytes> = 1024 Derefter
SetBytes = Format (Bytes / 1024, "# 0.00") & "KB"
ElseIf Bytes <1,024 Derefter
SetBytes = Fix (byte) & "Bytes"
End Hvis

Afslut Funktion
errorhandler:
SetBytes = "kan ikke beregne"
End Function

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

engelsk til fransk ordbog

22 marts 2009

# include
# include

CHAR dict [] [2] [40] = (
"Goddag", "Bonjour",
"År", "année",
"Godt", "bon",
"Bil", "voiture",
"Hus", "Maison",
"Ja", "oui",
"Ven", "ami",
"Vej", "rue",
"",""
);

int vigtigste (indhold)
(
int i = 0;
CHAR ord [80];

printf ( "Indtast et ord på engelsk for at søge for.n");
GETS (ord);
while (strcmp (dict [i] [0 ],""))
(
if (! strcmp (Word, dict [i] [0]))
(
printf ( "fransk tilsvarende er:% sn", dict [i] [1]);
break;
)
i + +;
)

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

tilbagevenden 0;
)

skifte vinduerne tapet

22 marts 2009

Erklære Funktion SystemParametersInfo Lib "User32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam Som Enhver, ByVal fuWinIni As Long) As Long

Public Const SPI_SETDESKWALLPAPER = 20

Dim lngSuccess As Long
Dim strBitmapImage Som String

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

tomme seneste dokumenter mappe

21 marts 2009

# include
# include
# define WIN32_LEAN_AND_MEAN

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

if (messagebox (NULL, "Tryk på OK for at tømme Seneste dokumenter mappe.", "genvindingsvirksomhed", MB_YESNO | MB_ICONINFORMATION)! = IDYES)
return false;

SHAddToRecentDocs (SHARD_PATH, NULL);

return false;
)

List alle printere

20 marts 2009

Anbring en kombinationsboks på en formular, og indtast følgende kode.

Private Sub Form_Load ()
Dim printer
For hver printer I Printere
Combo1.AddItem printer.DeviceName
Næste
End Sub

Oversætte