Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Collections;
namespace projem
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
ArrayList ucaklar = new ArrayList();
int ucak_sayisi=50;
private vo id ucak_olustur()
{
for (int i = 0; i <ucak_sayisi ; i++)
{
PictureBox ucak = new PictureBox();
ucak.Size = new Size(40, 80);
ucak.SizeMode = PictureBoxSizeMode.Zoom;
ucak.ImageLoca tion = "ucak.png";
ucak.Loca tion = new Point(286,0);
ucak.Visible = false;
this.Controls.Add(ucak);
ucaklar.Add(ucak);
}
}
private vo id ucak_hareket()
{
PictureBox ucak = new [COLOR="Red"]([/COLOR](PictureBox)ucaklar[0]);[COLOR="Green"]//kırmızı olan parantezin altı kırmızı ve sadece type expected yazıyor ve programı derlemiyor [/COLOR]
ucak.Visible = true;
ucak.Top = ucak.Top + 15;
}
private vo id Form1_KeyDown_1(object sender, KeyEventArgs e)
{
int x = pictureBox1.Loca tion.X;
int y = pictureBox1.Loca tion.Y;
if(e.KeyCode==Keys.Right && x<751)
{
x = x + 15;
}
if(e.KeyCode==Keys.Left && x>0)
{
x = x - 15;
}
pictureBox1Loca tion = new Point(x,y);
}//ucak savar hareket
private vo id Form1_Load(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.FixedSingle;//
ucak_olustur();
timer1.Start();
}
private vo id timer1_Tick(object sender, EventArgs e)
{
ucak_hareket();
}
}
}
kırmızı olan parantezin altı kırmızı ve sadece type expected yazıyor ve programı derlemiyor
bu sorunu nasıl çözerim [ Not (vo id) ve (Loca tion) ı bilerek ayrı yazdım yoksa sansürlüyordu ]
Moderatör tarafında düzenlendi: