• Dec 19 Fri 2014 16:08
  • 暫存

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;

open7412 發表在 痞客邦 留言(0) 人氣()

VB
Private Sub CommandButton1_Click()
Dim a(1, 9) As Integer
For i = 1 To 9
a(1, i) = i

open7412 發表在 痞客邦 留言(0) 人氣()

 
int x;
int width, height;
int[] myarray = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
// Instantiating all the buttons in the array
for (int j = 1; j < 5; j++)
{
for (int i = 1; i < 5; i++)
{
width = this.Size.Width;
height = this.Size.Height;
buttons[i, j] = new Button();
buttons[i, j].Location = new Point(i * 50, j * 50);
//x = (i + 1) * (j + 1);
x = myarray[(j-1)*4+i-1];

open7412 發表在 痞客邦 留言(0) 人氣()

  • Dec 05 Fri 2014 14:34
  • VB

456
 
 

Private Sub CommandButton1_Click()
For i = 1 To 9
Cells(1, i) = i
Cells(2, i) = i
Cells(1, i).Font.ColorIndex = 0
Next
Cells(3, 1) = Fix(Rnd() * 9 + 1)
Switch
Cells(1, Cells(3, 1)).Font.ColorIndex = 4
For j = 1 To 9
Cells(3, 1) = Fix(Rnd() * j + 1)
t = Cells(1, Cells(3, 1))
Cells(1, Cells(3, 1)) = Cells(1, j)
Cells(1, j) = t
Next
End Sub
 
 
 
 
 
 
 
 

Private Sub CommandButton1_Click()
For i = 1 To 9
Cells(1, i) = i
Cells(1, i).Font.ColorIndex = 0
Next
Cells(3, 1) = Fix(Rnd() * 9 + 1)


Switch
For j = 1 To 9
i = 10 - j
Cells(3, 1) = Fix(Rnd() * i + 1)
a = Cells(1, Cells(3, 1))
Cells(1, Cells(3, 1)) = Cells(1, i)
Cells(1, i) = a
Next
End Sub


 



open7412 發表在 痞客邦 留言(0) 人氣()

未命名
 
 
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;

open7412 發表在 痞客邦 留言(0) 人氣()

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 WindowsFormsApplication12
{
    public partial class Form1 : Form
    {
        System.Windows.Forms.Button Button1;
        System.Windows.Forms.Button[] Buttons;
        Button[,] buttons = new Button[9, 9];
        int i;
        int j;
        public Form1()
        {
            InitializeComponent();
           
        }

        private void Form1_Load(object sender, EventArgs e)
        {
          
            for (int i = 0; i < 9; ++i)
            {
                for (int j= 0; j < 9; ++j)
                {
                    int x;
                    int width, height;
                    width = this.Size.Width;
                    height = this.Size.Height;
                    buttons[i, j] = new Button();
                    buttons[i, j].Location = new Point(i * 50, j * 50);
                    x = (i+1) * (j+1);

                   
                    width = 50;
                    height = 50;
                    buttons[i,j].Size = new Size(width, height);
                    buttons[i,j].Text = x.ToString();
                    this.Controls.Add(buttons[i, j]);
                   
                }
            }
            //VX();
            //HX();
        }

open7412 發表在 痞客邦 留言(0) 人氣()

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;

open7412 發表在 痞客邦 留言(0) 人氣()

未命名
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;

open7412 發表在 痞客邦 留言(0) 人氣()

  • Oct 17 Fri 2014 16:19
  • 跑馬

未命名2
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.Threading;

open7412 發表在 痞客邦 留言(0) 人氣()

  • Oct 17 Fri 2014 15:04
  • week4

未命名
 
 
for (int i = 1; i <= 50; i++)
{
Thread.Sleep(500); //Delay 0.5秒
Application.DoEvents();

open7412 發表在 痞客邦 留言(0) 人氣()

test
 
 
 
 

open7412 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。