الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

سؤال... عن شفرة في vb.net

بدأه bilali في 16 مارس 2011 · 2 رد · 317 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الاخوة الاكارم في المنتدى

السلام عليكم ورحمة الله وبركاته وبعد

لدي سؤال في vb.net وهو عند ما امرر الماوس على زر امر button

يتغير لون الزر الى الاحمر وعندما لا يكون الماوس على الزر يتغير لون

الزر الى اخضر

ارجوا الرد على السؤال في اقرب وقت ممكن وشكرا

#2

واحد كود وصلحه ..

<%@ 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

اللهم أطل عمري وأحسن عملي واختم بالشهادة أجلي

#3

اخى العزيز عليك ان تفعل هذا بـــــ css

فى اعلى الصفحة بين وسمين head اكتب

  <style type="text/css">
   /* mycolor  هو اى اسم يمكن ان تختاره انتا */ 
   .mycolor
{
 background-color:Green;

}
   /* hover عندما يمر الماوس */ 
.mycolor:hover
{
 background-color:red

}
    </style>

المشروع مرفق يا اخى

btn_color.rar

yaso_772@yahoo.com

مواضيع مشابهة