الاخوة الاكارم في المنتدى
السلام عليكم ورحمة الله وبركاته وبعد
لدي سؤال في vb.net وهو عند ما امرر الماوس على زر امر button
يتغير لون الزر الى الاحمر وعندما لا يكون الماوس على الزر يتغير لون
الزر الى اخضر
ارجوا الرد على السؤال في اقرب وقت ممكن وشكرا
الاخوة الاكارم في المنتدى
السلام عليكم ورحمة الله وبركاته وبعد
لدي سؤال في vb.net وهو عند ما امرر الماوس على زر امر button
يتغير لون الزر الى الاحمر وعندما لا يكون الماوس على الزر يتغير لون
الزر الى اخضر
ارجوا الرد على السؤال في اقرب وقت ممكن وشكرا
واحد كود وصلحه ..
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button2_Click(object sender, System.EventArgs e)
{
Button1.ForeColor = System.Drawing.Color.Crimson;
}
protected void Button3_Click(object sender, System.EventArgs e)
{
Button1.ForeColor = System.Drawing.Color.DodgerBlue;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to set, change Button ForeColor (font, text color)</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:Navy">Button Example: ForeColor</h2>
<asp:Button
ID="Button1"
runat="server"
Text="Test Button ForeColor"
Font-Bold="true"
Height="44"
/>
<br /><br />
<asp:Button
ID="Button2"
runat="server"
Text="ForeColor Crimson"
OnClick="Button2_Click"
/>
<asp:Button
ID="Button3"
runat="server"
Text="ForeColor DodgerBlue"
OnClick="Button3_Click"
/>
</div>
</form>
</body>
</html>http://asp-net-example.blogspot.com/2009/03/how-to-set-change-button-forecolor-font.html
تم تعديل هذه المشاركة بواسطة مبرمج القاعده في 16 مارس 2011 في 23:11
اللهم أطل عمري وأحسن عملي واختم بالشهادة أجلي
اخى العزيز عليك ان تفعل هذا بـــــ css
فى اعلى الصفحة بين وسمين head اكتب
<style type="text/css">
/* mycolor هو اى اسم يمكن ان تختاره انتا */
.mycolor
{
background-color:Green;
}
/* hover عندما يمر الماوس */
.mycolor:hover
{
background-color:red
}
</style>المشروع مرفق يا اخى
yaso_772@yahoo.com