• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

menu erstellen

Werbung:
<div id="header"></div>
<div id="menu">
<ul id="Navigation">
<li><a href="Forum.aspx" runat="server">Forum.aspx</a></li>
<li><a href="Home.aspx" runat="server">Home.aspx</a></li>
<li><a href="Schleife.aspx" runat="server">Schleife.aspx</a></li>
</ul>
</div>

css
body, a {
font: normal 100.01% Helvetica, Arial, sans-serif;
color: black; background-color: white;
}

#header{
width: 100%;
height: 200px;
position:relative;
background-color: gray;
}

#menu{
position:relative;
margin-left: 0px;
}

ul#Navigation {
width: 10em;
margin: 0;
padding: 0.8em;
border: 1px solid black;
background-color: silver;
}
ul#Navigation li {
list-style: none;
margin: 0.4em; padding: 0.2em;
border: 1px solid gray;
background-color: #eee;
}

ul#Navigation a {
text-decoration: none; font-weight: bold;
color: black;
}
ul#Navigation a:hover {
color: white; background-color: gray;
}
 
Werbung:
um ein login zu erstellen:
string strInput;
Int16 intZaehler = 0;


do
{
intZaehler += 1; //pw eingabe

strInput = Microsoft.VisualBasic.Interaction.InputBox("Geben sie das Passwort ein:"); //pw überprüfen
if (strInput == "admin")
{
MessageBox.Show("Willkommen " + strInput, "Angemeldet", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
else
{
MessageBox.Show("Fehler - Versuch Nr. " + intZaehler, "Falsch", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
} while (strInput != "admin");

***
 
kleines spiel ;-)

Int16 intSec = 0;

if (Int16.TryParse(this.txtSec.Text, out intSec) == false)
{
MessageBox.Show("Bitte geben Sie eine Zahl an!", "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

System.Threading.Thread.Sleep(intSec * 1000);

MessageBox.Show(Convert.ToString(intSec) + " Sekunde(n) vorbei", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
****
aber so kann man den login auch machen oder?

string strInput;
double intZaehler;


for (intZaehler = 1; intZaehler <= 3; intZaehler++)
{
//Eingabe des Passwortes
// Damit die Inputbox aus VB gebraucht werden kann, muss man unter Verweis einen neuen Verweis auf Microsoft.VisualBasic setzen
strInput = Microsoft.VisualBasic.Interaction.InputBox("Geben sie das Passwort ein:");
//Überprüfung des Passwortes
if (strInput == "admin")
{
MessageBox.Show("Willkommen " + strInput, "Angemeldet", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
}
else
{
MessageBox.Show("Fehler - Versuch Nr. " + intZaehler, "Falsch", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

??*****
 
ia so kannst dus auch machen!
falls du schleifen erstellen möchtest, hier generell wie man vorgehen kann:

Int16 intZeile;
Int16 intSpalte;
string strAusgabe = "";

//aussere schl> Zeilen
//innere schl> Spalten

for (intZeile = 0; intZeile <= 5; intZeile++) //Äussere Schlaufe
{

for (intSpalte = 0; intSpalte <= 9; intSpalte++) //Innere Schleife
{

strAusgabe = strAusgabe + string.Format("{0:00}", intZeile.ToString() + intSpalte.ToString()) + " ";
}

}
 
Werbung:
Zurück
Oben