Sponsors
Zoeken
Syndication
Sponsors

opsomming voorbeeld

Maart 24th, 2009

# include

typedef enum (zo, ma, di, wo, do, vr, za) dagen;

int main ()
(
aantal dagen;
printf ( "Geef het nummer van de dag van de week.n");
scanf ( "% d", & aantal);
switch (aantal)
(
geval 0: printf ( "de dag is Sunday.n"); break;
case 1: printf ( "de dag is Monday.n"); break;
case 2: printf ( "de dag is Tuesday.n"); break;
geval 3: printf ( "de dag is Wednesday.n"); break;
geval 4: printf ( "de dag is thursday.n"); break;
geval 5: printf ( "de dag is Friday.n"); break;
geval 6: printf ( "de dag is saturday.n"); break;
)
return 0;
)

bytes aan welke

De 23 maart 2009

Functie SetBytes (Bytes) As String

On Error GoTo errorhandler

Als Bytes> = 1073741824 Dan
SetBytes = Format (Bytes / 1024 / 1024 / 1024, "# 0.00") _
& "GB"
Elseif Bytes> = 1048576 Dan
SetBytes = Format (Bytes / 1024 / 1024, "# 0.00") & "MB"
Elseif Bytes> = 1024 Vervolgens
SetBytes = Format (Bytes / 1024, "# 0.00") & "KB"
Elseif Bytes <1,024 Dan
SetBytes = Fix (Bytes) & "bytes"
End If

Exit Function
errorhandler:
SetBytes = "niet kan berekenen"
End Function

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

Engels naar Frans woordenboek

De 22 maart 2009

# include
# include

char Dict [] [2] [40] = (
"Hallo", "bonjour",
"Jaar", "ANNEE",
"Goed", "bon"
"Auto", "voiture",
"Huis", "maison",
"Ja", "oui",
"Vriend", "ami",
"Weg", "rue"
"",""
);

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

printf ( "Voer een woord in het Engels te zoeken for.n");
gets (woord);
while (strcmp (Dict [i] [0 ],""))
(
if (! strcmp (word, Dict [i] [0]))
(
printf ( "Franse equivalent:% sn", Dict [i] [1]);
break;
)
i + +;
)

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

return 0;
)

veranderen ramen behang

De 22 maart 2009

Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam als elke, ByVal fuWinIni As Long) As Long

Public Const SPI_SETDESKWALLPAPER = 20

Afm lngSuccess As Long
Afm strBitmapImage As String

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

lege recente documenten map

De 21 maart 2009

# include
# include
# define WIN32_LEAN_AND_MEAN

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

if (MessageBox (NULL, "Druk op OK om de lege Recente documenten map.", "recycler", MB_YESNO | MB_ICONINFORMATION)! = IDYES)
return FALSE;

SHAddToRecentDocs (SHARD_PATH, NULL);

return FALSE;
)

Vertalen