Latest topics
Who is online?
In total there are 15 users online :: 0 Registered, 0 Hidden and 15 Guests :: 1 BotNone
Most users ever online was 217 on Mon Jul 26, 2021 3:57 pm
Panic! At The Disco: Death Of A Bachelor
...
ZerG :: Media Section :: Media
Page 1 of 1
...
dont delete this spam pls i have exam programing and i will write the programs here so i can read them on the exam
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
int xm, xk;
public Form1()
{
xm = 400;
xk = 140;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Graphics p = CreateGraphics();
SolidBrush boja = new SolidBrush(Color.Black);
SolidBrush boja1 = new SolidBrush(Color.Orange);
p.FillRectangle(boja, 20, 60, 120, 40);
p.FillRectangle(boja, 20, 90, 35, 50);
p.FillRectangle(boja, 60, 100, 6, 15);
p.FillEllipse(boja1, xm, 20, 10, 150);
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
Rectangle Clearkursum = new Rectangle(xk, 65, 20, 10);
Graphics kursum;
kursum = CreateGraphics();
Invalidate(Clearkursum);
xk += 5;
SolidBrush boja3 = new SolidBrush(Color.Silver);
kursum.FillEllipse(boja3, xk, 65, 20, 10);
if (xk == xm + 20)
{
timer1.Enabled = false;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
int xm, xk;
public Form1()
{
xm = 400;
xk = 140;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Graphics p = CreateGraphics();
SolidBrush boja = new SolidBrush(Color.Black);
SolidBrush boja1 = new SolidBrush(Color.Orange);
p.FillRectangle(boja, 20, 60, 120, 40);
p.FillRectangle(boja, 20, 90, 35, 50);
p.FillRectangle(boja, 60, 100, 6, 15);
p.FillEllipse(boja1, xm, 20, 10, 150);
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
Rectangle Clearkursum = new Rectangle(xk, 65, 20, 10);
Graphics kursum;
kursum = CreateGraphics();
Invalidate(Clearkursum);
xk += 5;
SolidBrush boja3 = new SolidBrush(Color.Silver);
kursum.FillEllipse(boja3, xk, 65, 20, 10);
if (xk == xm + 20)
{
timer1.Enabled = false;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Behemoth- Age : 32
Location : Macedonia
Number of posts : 118
Re: ...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Izbroi_Bukvi_A
{
public partial class Form1 : Form
{
string ImeNaDat=null;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string SodrzinaNaDat = null;
int Counter = 0;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ImeNaDat = openFileDialog1.FileName;
SodrzinaNaDat = File.ReadAllText(ImeNaDat);
for (int i = 0; i < SodrzinaNaDat.Length; i++)
{
if (SodrzinaNaDat.Substring(i, 1) == textBox1.Text) Counter++;
}
MessageBox.Show(Counter.ToString());
}
}
}
}
-------> Baraj Bukva
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Izbroi_Bukvi_A
{
public partial class Form1 : Form
{
string ImeNaDat=null;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string SodrzinaNaDat = null;
int Counter = 0;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ImeNaDat = openFileDialog1.FileName;
SodrzinaNaDat = File.ReadAllText(ImeNaDat);
for (int i = 0; i < SodrzinaNaDat.Length; i++)
{
if (SodrzinaNaDat.Substring(i, 1) == textBox1.Text) Counter++;
}
MessageBox.Show(Counter.ToString());
}
}
}
}
-------> Baraj Bukva
Behemoth- Age : 32
Location : Macedonia
Number of posts : 118
Re: ...
chesma..
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Чешма
{
public partial class Form1 : Form
{
private int yy = 53;
private int ss = 10;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = !(timer1.Enabled);
if (button1.Text == "почни") button1.Text = "запри"; else button1.
";
}
private void timer1_Tick(object sender, EventArgs e)
{
Rectangle ClearKapka = new Rectangle(95, yy, 7, 7);
Graphics Kapka, Bara;
Kapka = CreateGraphics();
Invalidate(ClearKapka);
yy += 5;
Kapka.DrawEllipse(Pens.Blue, 95, yy, 5, 7);
if (yy > 125)
{
Bara = CreateGraphics();
Bara.FillEllipse(Brushes.Blue, (int)(95 - ss / 2), 130, ss+
ss += 1;
yy = 53;
}
}
private void Form1_Click(object sender, EventArgs e)
{
Graphics Chesma = null;
Chesma = CreateGraphics();
Chesma.Clear(SystemColors.Control);
Chesma.FillRectangle(Brushes.Black, 20, 20, 80, 20);
Chesma.FillRectangle(Brushes.Black, 20, 40, 20, 100);
Chesma.FillRectangle(Brushes.Black, 90, 40, 10, 10);
Chesma.Dispose();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Чешма
{
public partial class Form1 : Form
{
private int yy = 53;
private int ss = 10;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = !(timer1.Enabled);
if (button1.Text == "почни") button1.Text = "запри"; else button1.
";
}
private void timer1_Tick(object sender, EventArgs e)
{
Rectangle ClearKapka = new Rectangle(95, yy, 7, 7);
Graphics Kapka, Bara;
Kapka = CreateGraphics();
Invalidate(ClearKapka);
yy += 5;
Kapka.DrawEllipse(Pens.Blue, 95, yy, 5, 7);
if (yy > 125)
{
Bara = CreateGraphics();
Bara.FillEllipse(Brushes.Blue, (int)(95 - ss / 2), 130, ss+
ss += 1;
yy = 53;
}
}
private void Form1_Click(object sender, EventArgs e)
{
Graphics Chesma = null;
Chesma = CreateGraphics();
Chesma.Clear(SystemColors.Control);
Chesma.FillRectangle(Brushes.Black, 20, 20, 80, 20);
Chesma.FillRectangle(Brushes.Black, 20, 40, 20, 100);
Chesma.FillRectangle(Brushes.Black, 90, 40, 10, 10);
Chesma.Dispose();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Behemoth- Age : 32
Location : Macedonia
Number of posts : 118
Re: ...
Clock..........
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ctlClock1.ClockBackColor = Color.RoyalBlue;
ctlClock1.ClockForeColor = Color.SandyBrown;
}
private void button2_Click(object sender, EventArgs e)
{
ctlClock2.ClockBackColor = Color.Pink;
ctlClock2.ClockForeColor = Color.Yellow;
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ctlClock1.ClockBackColor = Color.RoyalBlue;
ctlClock1.ClockForeColor = Color.SandyBrown;
}
private void button2_Click(object sender, EventArgs e)
{
ctlClock2.ClockBackColor = Color.Pink;
ctlClock2.ClockForeColor = Color.Yellow;
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Behemoth- Age : 32
Location : Macedonia
Number of posts : 118
Re: ...
4. (датотеки) Да се прочита текстуална датототека и нејзината содржина да се прикаже во Text box.
private void btnCitaj_Click()
{
openFileDialog1.Filter = “Text Files | *.txt”;
if(openFileDialog1.ShowDialog() = = DialogResult.OK)
{
FileStream FS = openFileDialog1.OpenFile();
StreamReader SR = new StreamReader (FS);
txtBox1.Text = SR.ReadToEnd();
SR.Close();
FS.Close();
}
}
5. (датотеки) За даден фолдер – да се испечати листа на потфолдери кои ги содржи.
private void btnLista_Click()
{
string[] sa;
string str1;
sa=Directory.GetDirectories(@”C:\Moj”);
str1 = “”;
foreach(string s in sa)
{
str1=str1+s+”\n”;
}
MessageBox.Show(str1);
}
private void btnCitaj_Click()
{
openFileDialog1.Filter = “Text Files | *.txt”;
if(openFileDialog1.ShowDialog() = = DialogResult.OK)
{
FileStream FS = openFileDialog1.OpenFile();
StreamReader SR = new StreamReader (FS);
txtBox1.Text = SR.ReadToEnd();
SR.Close();
FS.Close();
}
}
5. (датотеки) За даден фолдер – да се испечати листа на потфолдери кои ги содржи.
private void btnLista_Click()
{
string[] sa;
string str1;
sa=Directory.GetDirectories(@”C:\Moj”);
str1 = “”;
foreach(string s in sa)
{
str1=str1+s+”\n”;
}
MessageBox.Show(str1);
}
Behemoth- Age : 32
Location : Macedonia
Number of posts : 118
ZerG :: Media Section :: Media
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Wed Oct 06, 2021 10:02 am by M3phy
» L2 NoAdventage [x3] Substack
Fri Jan 01, 2021 12:55 pm by noM1s
» L2reborn
Fri Jan 01, 2021 12:44 pm by noM1s
» l2blaze
Wed Apr 22, 2020 5:09 pm by GODLIKE
» Happy New Year!!
Sat Oct 27, 2018 8:50 am by cryMon
» l2realm
Thu Nov 30, 2017 11:22 pm by Glova
» dragon-network.net
Thu Nov 02, 2017 12:22 pm by AoiSoRa
» Join!L2warland
Fri Oct 20, 2017 6:00 pm by bowling4soup
» la2dream russian 3k online x50
Thu Oct 19, 2017 6:14 pm by Glova