作者waikatomath (macgyver)
看板C_Sharp
標題[問題]c # problem
時間Tue Apr 22 09:37:33 2008
can anyone help me to solve a c# problem....the following question
is my assignment last week, but i didnt finish it
Firstly, create a project and add a large PictureBox,a "start game"
Botton and three TrackBar sliders to the main form.
After this, I want the three Point objects to appear in the Pbox
after I press the "start game"button and stay there. So i can not
declear these point objects inside the click handler for that button.
Instead, you must declear them as INSTANCE VARIABLES of your main Form1
class. Declare them as private Point object called p1 p2 and p3. then
add a click handler to the "start game" button and write some c# code
to initialize those three points to some default values. exp
p1 = new Point(100,100);
make sure that three point are not in a straight line
next you should write a redraw method that firstly clears the Pbox,
then draws the 3 points and finally draws the circle, getting its(X,Y)
position and its radius from the 3 TrackBar values. You might to break
up this redraw method so that it calls several smaller methods. Then
add handlers for the "Scroll" event of the 3 TrackBars and call your
Redraw() method from within each handler.
sorry about this but i need the code for this problem. thx for help
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.238.250.210
1F:噓 sheauren:英文版的交作業文算是時代的進步嗎= =a 04/22 10:01
2F:→ bcse:可能是因為老師用英文出題,這樣貼比較方便? 04/22 10:53
3F:→ waikatomath:yap ....ur right 04/22 11:16
4F:推 asoedarren:what's your problem? 04/22 13:00
5F:推 huge:不考慮自己想想怎麼解決嗎? 04/22 13:00
6F:→ teyou:This problem seems easy to solve... 04/22 13:13
7F:→ waikatomath:抱歉,這是我第一次學程式,有許多不懂...這一個作業已 04/22 14:47
8F:→ waikatomath:經截止了...我做到一半就交了,只是想知道要怎麼做 04/22 14:49
9F:→ waikatomath:希望了解的能幫忙...感謝 04/22 14:51
10F:→ FantasyRyu:yo yo come on, check it out 04/22 22:33