返回首页

AutoCAD绘图无环ACAD的实体:您好,
如何从AutoCAD图形文件,而无需使用循环实体。我试图找到ACAD的实体使用ACAD块的,没有使用循环。但我没有得到ACAD单位acadbockreference。 NBSP

- 阿莫尔

回答

评论会员:。坦维尔答 时间:2012/02/07
试试这个

Dim dt As New Date

dt = "26-12-2011"

Dim a As Integer = 6

Dim a1 As Integer = 1

 

 While a1 <= Len(dt)

   If a = Mid(dt, a1, 1) Then

      MsgBox(a)

      Exit While

   End If

   a1 = a1 + 1

 End While

 

评论会员:KARTHIKHarve 时间:2012/02/07
你好,
我写了简单的Windows窗体应用程序,
它由一个包含两列的表格,DataGridView1控制
当你进入细胞中的第一列的日期,然后按输入
在同一行seckond的列的单元格的值变为
星期根据输入的日期,
和焦点移到下一行的第一列细胞。
我已经使用了:
DataGridViewCellEndEdit
编辑模式为当前单元格结束时发生的事件
afther你按回车,单击DataGridView控件或其他细胞。

代码为Program.cs的


代码为MainForm.cs:


/*

 * Created by SharpDevelop.

 * User: Peri 沤eljko

 * Date: 27.12.2011

 * Time: 14:50

 * 

 */

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Windows.Forms;

namespace Date_and_days

{

	/// <summary>

	/// Description of MainForm.

	/// </summary>

	public partial class MainForm : Form

	{

		public MainForm()

		{

			//

			// The InitializeComponent() call is required for Windows Forms designer support.

			//

			InitializeComponent();

			

		}

		

		void DataGridView1CellEndEdit(object sender, DataGridViewCellEventArgs e)

		{

			

			//

			// Event occurs when edit mode for the current cell ends,

			// afther you press enter, or click on other cell i DataGridView control

			//

			

			// 

			// Local variables

			//

			DateTime Date;

			int row = 0;

			int	column = 0;

			bool IsDate = false;

			row = dataGridView1.CurrentCell.RowIndex;

			column = dataGridView1.CurrentCell.ColumnIndex;

			

			//

			// If  edit mode ends for the cell in the first column,Date column.

			//

			if (column == 0)

			{

				//

				// Checks if you have entered Date in first column, Date column.

				//

				// IsDate is true if it is Date entered into Date column,

				// the value of the entered date is set out to Date variable,

				// afther that program write the day of the week from entered date into

				// seckond column Day of the week column.

				//

				// else program sets the value of the seckond column to empty string

				//

				IsDate = DateTime.TryParse(dataGridView1.CurrentCell.Value.ToString(),out Date);

				

				if (IsDate)

				{

					dataGridView1[column+1,row].Value = Date.DayOfWeek.ToString();

				}

				

				else

				{

					dataGridView1[column+1,row].Value = String.Empty;

				}

				

			}

		}

	}

}


代码为MainForm.Designer.cs

{体C3}
所有最好的,
perić泽利科