Myanmar IT Resource Forum
Myanmar IT Resource Forum
Myanmar IT Resource Forum

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

Htet Naing

Htet Naing
Moderator



Moderator
ကြ်န္ေတာ္တို ့ေတြ ဒီလိုမ်ိဴး Tool tip ေလးေတြနဲ ့ရင္းႏွီးၿပီးသားပါ။ ပံုမွာဆိုရင္ Microsoft Visual Studio 2005 ဆိုတာေလးေပါ့။ Mouse pointer ေလးတင္လိုက္ရင္ေပၚလာတတ္ပါတယ္။ မိမိေရးတဲ့ Program မွာအဲ့လိုမ်ိဳးေပၚေအာင္လုပ္လို ့ရပါတယ္။ ဒီေနရာမွာေတာ့ VB.Net နဲ ့ၿပဳလုပ္ပံုကို ၿပန္လည္မွ်ေ၀ေပးမွာပါ။
[You must be registered and logged in to see this image.]


(၁) အရင္ဦးဆံုး မိမိရဲ ့Form ေပၚမွာ Button ေလးတစ္ခုယူလိုက္ပါ။ ၿပီးရင္ Button ကို ၾကိဳက္တဲ့ Name နဲ ့ Text ၿပင္လိုက္ပါဦး။ (eg., Name=btnsample, Text=Sample)


(၂) Name နဲ ့Text ကိုၿပင္ၿပီးသြားရင္ေတာ့ ခုလိုပံုေလးကိုေတြ ့ရမွာပါ။
[You must be registered and logged in to see this image.]


(၃)အခု Tool Tip ထည့္ဖို ့အတြက္ Toolbox ထဲမွ ကို Doulbe Click လုပ္ၿပီးထည့္လိုက္ပါ။ Name ကိုေတာ့မၿပင္ေတာ့ပါဘူး။
[You must be registered and logged in to see this image.]


(၄) Sample ကို Doulbe Click ႏွိပ္လိုက္ပါ။ ဒါဆိုရင္ btnsample ရဲ ့Click method ကိုေရာက္ေနပါလိမ့္မယ္။
[You must be registered and logged in to see this image.]


(၅) ၀ိုင္းၿပထားတဲ့ေနရာမွာ Click ႏွိပ္ၿပီး MouseEnter ဆိုတဲ့ method ကိုေရာက္ေအာင္သြားပါ။
[You must be registered and logged in to see this image.]


(၆)အခု ကြ်န္ေတာ္တို ့btnsample ရဲ ့ MouseEnter မွာ ကြ်န္ေတာ္တို ့ေပၚေစခ်င္တဲ့ Tooltip ကိုေရးရပါမယ္။
(MouseEnter ဆိုတာကေတာ့ Mouse Pointer ေရာက္သြားတဲ့အခါကို ေၿပာတာပါ။ ေရးရမွာကေတာ့
Code:
 ToolTip1.SetToolTip(btnsample, "This is a sample.")

ToolTip1 ဆိုတာက ကြ်န္ေတာ္တို ့ထည့္ထားတဲ့ ToolTip ပါ။ Name ကိုမၿပင္ထားလို ့ToolTip1 လို ့သံုးတာပါ
ၿပင္ခဲ့ရင္ေတာ့ ေၿပာင္းထားတဲ့ Name ကိုထည့္ေပးရမွာပါ။
[You must be registered and logged in to see this image.]


(၇) ကဲ…ခု F5 ႏွိပ္ၿပီး Run ၾကည့္လိုက္ပါ။ Sample ဆိုတဲ့ button ေပၚကို Mouse Pointer တင္လိုက္တဲ့အခါမွာ ကြ်န္ေတာ္တို ့ေရးထားတဲ့စာသားကုိ ToolTip အေနနဲ ့ၿပေပးမွာပါ။
[You must be registered and logged in to see this image.]


(၈) စာသားကိုအၿမဲၿပေစခ်င္ရင္ေတာ့ ToolTip ရဲ ့Properties box ထဲက ShowAlways ကို True ေၿပာင္းေပးပါ။
[You must be registered and logged in to see this image.]


(၉)အခ်ိန္ကာလတစ္ခုထိပဲ ၿပေစခ်င္ရင္ေတာ့ShowAlways ကို False လို ့ထားပါ။ Second ကိုေတာ့ReshowDelay မွာ လိုခ်င္တဲ့ Second တန္ဖိုးကိုထည့္ေပးပါ။(ဥပမာ- 5 ဆိုရင္ 5 seconds ၿပေပးပါလိမ့္မယ္။)
[You must be registered and logged in to see this image.]

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Forum create on Forumotion | ©phpBB | Free forum support | Report an abuse | Forumotion.com