[問題]c # problem
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
噓
04/22 10:01, , 1F
04/22 10:01, 1F
→
04/22 10:53, , 2F
04/22 10:53, 2F
→
04/22 11:16, , 3F
04/22 11:16, 3F
推
04/22 13:00, , 4F
04/22 13:00, 4F
推
04/22 13:00, , 5F
04/22 13:00, 5F
→
04/22 13:13, , 6F
04/22 13:13, 6F
→
04/22 14:47, , 7F
04/22 14:47, 7F
→
04/22 14:49, , 8F
04/22 14:49, 8F
→
04/22 14:51, , 9F
04/22 14:51, 9F
→
04/22 22:33, , 10F
04/22 22:33, 10F