作者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