第一篇:edit_Control用法总结
///转载
Edit Control控件最常见的用法,一般有有以下几种:
1、显示默认的字符串;
2、接受用户输入的字符串。
3、作为密码框接受用户输入的字符串。
Edit Control对应的MFC类为CEdit类。而CEdit是继承自CWnd类的,所以也继承了来自CWnd类的GetWindowText()和SetWindowText()。其实从这两个函数的名字大家都可以看出来是做什么用的了。
我们来一步一步实现Edit Control控件的这三种最常见的用法。
首先,先建立一个项目,在VC++中选择MFC,选择MFC应用程序,并选择基于对话框的。项目完全打开后,我们可以看到默认生成的对话框,我们从工具箱拉一个Edit Control到对话框上。使用Ctrl+左键双击,创建一个和Edit Control控件的一个变量,也即一个CEdit类的对象。此处为m_edit.接下来我们可以在对话框的CXXXDlg::OnInitDialog()中添加代码。此处XXX是项目名称。在此函数中添加:
m_edit.SetWindowText(_T(“welcome to edit”));
然后我们调试程序,就可以看到对话框上面放置的Edit Control中显示了上述字符串的内容。其实这个函数很简单,只是一个需要设置的字符串。我们来看下关于这个函数的具体内容: CWnd::SetWindowText
void SetWindowText(LPCTSTR lpszString);
参数: lpsz指向一个CString对象或以null结尾的字符串,将被用作新的标题String 或控件文本。
说明:
这个函数将窗口的标题设为指定的文本。如果窗口为一个控件,则将设置控件内的文本。
这个函数使一条WM_SETTEXT消息被发送到这个窗口。
而我们要得到Edit Control控件中输入的内容的话,我们需要一个触发。此处我们以点击确定键为触发。双击资源中的对话框上的确定键,我们可以直接到达函数CXXXtDlg::OnBnClickedOk()的位置,然后我们可以在这个函数中添加如下代码:
CString lpszStringBuf;
m_edit.GetWindowText(lpszStringBuf);
MessageBox(lpszStringBuf);
这几句代码可以接受控件的文本内容,然后以一个消息的形式显示出来。我们也来具体分析下GetWindowText: CWnd::GetWindowText
int GetWindowText(LPTSTR lpszStringBuf, int nMaxCount)const;void GetWindowText(CString& rString)const;
返回值:
指定了要拷贝的字符串的长度,以字节为单位,不包括结尾的空字符。如果CWnd没有标题或标题为空,则为0。
参数:
lpszStringBuf 指向要接收窗口标题的复制字符串的缓冲区。
nMaxC指定了要拷贝的缓冲区的最大字符数目。如果字符串比ount nMaxCount指定的数目还要长,则被截断。
rString
说明:
这个函数将CWnd的标题(如果有)拷贝到lpszStringBuf指向的缓冲区或者目的字符串rString。如果CWnd对象是一个控件,则GetWindowText成员函数将拷贝控件内的文本(而不是控件的标题)。这个成员函数会向CWnd对象发送一个WM_GETTEXT消息。
其实这两个功能的实现都很简单,只是使用了一个函数就可以实现了。如果要是想做一个密码输入框怎么办呢?其实跟上面的比起来,只需要在Edit Control控件的属性中将Password的属性改为TRUE就可以了。怎么样,很简单吧,我们来试一试吧
用于接收窗口标题的复制字符串的CString对象。
MFC里面的EDIT Control控件的用法是怎么样的,1.怎么样才能赋值给EDIT Control控件并在EDIT Control控件显示出来;2.怎么取得EDIT Control控件的值并传递给一个变量?希望各位大侠帮帮忙!
//获得EDIT CEdit* pBoxOne;pBoxOne =(CEdit*)GetDlgItem(IDC_EDIT1);//付值
pBoxOne->SetWindowText(_T(“FOO”));//取值
CString str;pBoxOne->GetWindowText(str);
GetDlgItem(IDC_EDIT1)->SetWindowText(_T“FOO”);也可以
//取值
CString str;GetDlgItem(IDC_EDIT1)->GetWindowText(str);EditControl是在MFC对话框中最频繁的使用的控件之一 VC++2005提供EditControl的属性和控件事件操作简单方便
1只允许输入数字
如果设置EditControl中只能输入数字,在VC6.0中需要编写一个派生类来达到目的,而在VC++2005下只需要在属性对话框中将Number的属性值设 为True就可以了.2获取EditControl的内容 两种方法
第一种,利用MFC应用程序向导生成一个基于对话框的应用程序,从资源视图中选择该Dialog窗体,利用右侧的工具箱,向Dialog内添加一个
EditControl项,声明控件变量的类别为Value,变量类型为CString,变量名为m_sEdit_Content.CString m_sEdit_Content;CString s;UpdateData(true);s=m_sEdit_Content.GetString();MessageBox(s,_T(“获取编辑框的内容”),MB_OK);s.ReleaseBuffer();这样就取得了编辑框的内容
UpdateData(true);这句代码很重要,它的作用是将输入的数据装入EditControl对应的变量m_sEdit_Content中.由于MFC应用程序向导默认是使用Unicode库,所以MessageBox中的字符串需要用_T(),否则会出现const char[]转换LPCTSTR错误,如果不使用 Unicode库就不需要_T().第二种方法
声明控件变量的类别为Control,变量类型为CEdit,变量名为m_Edit_Content.代码如下(Unicode)CString s;s.GetBufferSetLength(1024);m_Edit_Content.GetWindowTextW(s.GetBuffer(),s.GetLength());MessageBox(s,_T(“获取文本框的内容”),MB_OK);s.ReleaseBuffer();如果不是Unicode下获取编辑框内容的函数就是GetWindowTextA 3将EditControl中的内容转化为整数
在限制编辑框只能数字之后,要将字符串转化为整数
声明控件变量的类别为Value,变量类型为CString,变量名为m_sEdit_Content.CString s;UpdateData(true);s=m_sEdit_Content.GetString();int n=_tstoi(s);s.ReleaseBuffer();
n就是所需要的整数
在VC2005下字符串转换成整数需要_tstoi这个函数
4限制编辑框的输入长度
声明控件变量的类别为Control,变量类型为CEdit,变量名为m_Edit_Content.在对话框初始化的地方写m_Edit_Content.SetLimitText(1);编辑框就只能输入一个字符了.1.设置edit只读属性
方法一:m_edit1.SetReadOnly(TRUE);
方法二:::SendMessage(m_edit1.m_hWnd, EM_SETREADONLY, TRUE, 0);2.判断edit中光标状态并得到选中内容(richedit同样适用)
int nStart, nEnd;
CString strTemp;
m_edit1.GetSel(nStart, nEnd);
if(nStart == nEnd){
strTemp.Format(_T(“ 光标在%d”), nStart);
AfxMessageBox(strTemp);
}
else {
//得到edit选中的内容
m_edit1.GetWindowText(strTemp);
strTemp = strTemp.Mid(nStart,nEnd-nStart);AfxMessageBox(strTemp);
}
注:GetSel后,如果nStart和nEnd,表明光标处于某个位置(直观来看就是光标在闪动);
如果nStart和nEnd不相等,表明用户在edit中选中了一段内容。获取edit一行内容:
CString str_data;int index=m_string.lineindex();int len = m_string.LineLength();m_string.GetLine(index,str_data.GetBuffer(len), len);str_data.ReleaseBuffer(len);如果想把编辑框的文本转化为int型,只需调用函数atoi,如下所示: int num = atoi(str_data);则num中保存的就是int型的数据。
获取鼠标双击CEdit的那行文字 void MyEdit::OnLButtonDblClk(UINT nFlags, CPoint point){ CEdit::OnLButtonDblClk(nFlags, point);
int nIndex = this->CharFromPos(point);int nCharIndex = LOWORD(nIndex);nIndex = HIWORD(nIndex);if(nIndex ==-1){ return;} CString strText;int nCharIndex = this->LineIndex(nIndex);
int nlen = this->LineLength(nCharIndex);this->GetLine(nIndex, strText.GetBuffer(nlen), nlen);strText.ReleaseBuffer();}
3.在edit最后添加字符串
CString str;
m_edit1.SetSel(-1,-1);
m_edit1.ReplaceSel(str);
4.随输入自动滚动到最后一行(richedit同样适用)方法一:(摘自msdn)
// The pointer to my edit.extern CEdit* pmyEdit;
int nFirstVisible = pmyEdit-> GetFirstVisibleLine();
// Scroll the edit control so that the first visible line // is the first line of text.if(nFirstVisible > 0){
pmyEdit-> LineScroll(-nFirstVisible, 0);}
方法二:m_richedit.PostMessage(WM_VSCROLL, SB_BOTTOM, 0);5.如何限制edit输入指定字符
可以从CEdit派生一个类,添加WM_CHAR消息映射。下面一个例子实现了限定输入16进制字符的功能。
void CMyHexEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags){
if((nChar > = 0 && nChar < = 9)||(nChar > = a && nChar < = f)||(nChar > = A && nChar < = F)|| nChar == VK_BACK || nChar == VK_DELETE)//msdn的virtual key {
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
}
6.如何使用richedit
添加AfxInitRichEdit();
CxxxApp::InitInstance(){
AfxInitRichEdit();.............}
AfxInitRichEdit()功能:装载 RichEdit 1.0 Control(RICHED32.DLL).7.如何使用richedit2.0 or richedit3.0
使用原因:由于RichEdit2.0A自动为宽字符(WideChar),所以它可以解决中文乱码以及一些汉字问题
方法一:(msdn上的做法,适用于用VC.NET及以后版本创建的工程)
To update rich edit controls in existing Visual C++ applications to version 2.0, open the.RC file as text, change the class name of each rich edit control from “ RICHEDIT” to “ RichEdit20a”.Then replace the call to AfxInitRichEdit with AfxInitRichEdit2.方法二:以对话框为例:
(1)增加一全局变量 HMODULE hMod;(2)在CxxxApp::InitInstance()中添加一句hMod = LoadLibrary(_T(“ riched20.dll”));
在CxxxApp::ExitInstance()中添加一句FreeLibrary(hMod);
(3)在对话框上放一个richedit,文本方式打开.rc文件修改该richedit控件的类名“ RICHEDIT” to “ RichEdit20a”.(4)在对话框头文件添加 CRichEditCtrl m_richedit;
在OnInitDialog中添加 m_richedit.SubclassDlgItem(IDC_RICHEDIT1, this);
8.改变richedit指定区域的颜色及字体
CHARFORMAT cf;
ZeroMemory(&cf, sizeof(CHARFORMAT));
cf.cbSize = sizeof(CHARFORMAT);
cf.dwMask = CFM_BOLD | CFM_COLOR | CFM_FACE | CFM_ITALIC | CFM_SIZE | CFM_UNDERLINE;
cf.dwEffects = 0;
cf.yHeight = 12*12;//文字高度
cf.crTextColor = RGB(200, 100, 255);//文字颜色
strcpy(cf.szFaceName ,_T(“ 隶书”));//设置字体
m_richedit1.SetSel(1, 5);//设置处理区域
m_richedit1.SetSelectionCharFormat(cf);9.设置行间距(只适用于richedit2.0)
PARAFORMAT2 pf;
pf2.cbSize = sizeof(PARAFORMAT2);
pf2.dwMask = PFM_LINESPACING | PFM_SPACEAFTER;
pf2.dyLineSpacing = 200;
pf2.bLineSpacingRule = 4;
m_richedit.SetParaFormat(pf2);
第二篇:Such用法总结
Such用法总结
such可以分为三种不同的词性。
一、形容词的用法
1.such做形容词,是最常见、也是最简单的用法,起到一种强调作用。
She's got such talent.她很有天赋。
We're having such a wonderful time.我们过得很愉快。
I've had such a shock.我大吃一惊。
Why are you in such a hurry? 为什么你这么匆忙?
2.注意上面的第二个例子,“such a wonderful time”。
通常情况下,如果such与名词之间还带有形容词,这时不提倡使用such,因为会引起歧义。而要说“so wonderful a time”或者“a time so wonderful”。
3.当句子末尾加上that引导从句,形成such...that结构时,表示因为前面提到的原因,引起了某种结果。
He speaks to me in such a way that I always feel he is insulting me.他总是用那种方式跟我说话,总是使得我觉得受到了侮辱。
It was such a boring speech(that)I fell asleep.这是个乏味的演说,使得我睡着了。
二、限定词的用法
4.所谓“限定词”,指的是对名词的涵义加以限制的词。又分为后对应限定和前对应限定两种。
5.前对应限定的such,指的是前面提到过的某一种类。
He noticed her necklace.Such jewels must have cost thousands, he thought.他注意到了她的项链。这一定值几千元,他想。
This isn't the only story of crulty to children.Many such cases are reported every day.这并非虐待儿童的唯一事件。每天都有许多类似案例被报道。6.后对应限定的such,指的是后面将要提到的某一种类。通常使用such...as/that...的结构。
Such a disaster as this had never happened to her before.以前她从未遇到过这样的灾难。
The knot was fastened in such a way that it was impossible to undo.这个结打得很牢固,根本解不开。
Such advice as he was given proved almost worthless.他得到的那些建议,被证明毫无价值。
He's not such a fool as he looks.他并非看上去那样蠢。
注意,规范的用法是,这时应避免使用such...that,而只使用such...as,方便与前面的第3点相区分。
三、代词的用法
7.such做代词的时候,也分为前指代和后指代两种。
8.前指代的意思是,指代前面提到过的某个人或某件事。通常,这时指代的是前面整句话的涵义。
Cricket was boring.Such was her opinion befor meeting Ian.板球很乏味。遇到Ian之前,她一直这么认为。
She's a competent manager and has always been regarder as such by her colleagues.她是一个能干的经理。同事们一直这样看待她。9.后指代的意思是,指代后面提到的某个人或某件事。这时通常采用such as to do sth或such that的结构。
Such is the influence of TV that it can make a person famous overnight.这就是电视的影响,它可以使人一夜成名。
The pain in her foot wasn't such as to stop her walking.她脚上的痛,还没有到妨碍走路的地步。
The damage was such that it would cost too much to repair.损害很严重,要用很多钱才能修好。
四、词组 such as 和 as such
10.such as可以连在一起,作为词组使用,意思是“比如、就像”,同like类似。Wild flowers such as orchids and primroses are becoming rare.像兰花和樱草花那样的野花,越来越少见了。
Large and important projects such as this one often take years to develop.类似这一个的大型重要项目,需要好多年才能发展起来。
11.词组as such通常用在词尾,其实只是代词用法的一个引申,或者表示“像看上去那样”。
If this is not genuine champagne, it should not be labelled as such.既然这不是真的香槟酒,就不应该这样标识。
The new job is not promotion as such but it has good prospects.新工作并非真的升职,不过前景不错。
第三篇:there be用法总结
1.基本结构
There be + 主语 + 地点/ 时间状语。如:
There is a computer in the room.房间里有一台电脑。
There are two TV plays every evening.每晚有两场电视剧。2.主谓一致
要采取就近一致原则,和靠近be 的主语一致。如:
There is a pen, two rulers in the box.盒子里有一只钢笔,两把尺子。
There are two boys and a teacher at the school gate.门口有两个男孩,一个老师。3.主语后的动词形式
在there be 句型中,主语与动词是主动关系时用现在分词;是被动关系时用过去分词。如:
There is a purse lying on the ground.地上有一个钱包。
There are five minutes left now.现在还有5分钟。4.反意疑问句。
反意疑问句应与 there be 对应,而不是依据主语。如:
There is a radio on the table, isn't there? 桌子上有一台收音机,是吧?
There are more than fifty classes in your school, aren't there? 你们班有50多名学生,是吧? 5.there be 与 have 的替换
there be 表示所属时可与 have 替换。
There is nothing but a book in my bag.= I have nothing but a book in my bag.包里只有一本书。6.there be 后接不定式时常用主动形式表示被动意义。如:
There is a lot of work to do.有许多工作要做。
注意:当该句型主语是 something, anything, nothing 等不定代词时,后面的不定式用主动形式或被动形式,意义各不同。
There is nothing to do.没有事可做。
There is nothing to be done.没有办法(束手无策)。7.与其它词连用,构成复合谓语。如:
There may be a rain this afternoon.今天下午可能有雨。
There used to be a cinema here before the war.战争之前,这儿有一家电影院。8.变体
there be 结构中的 be 有时可用 live, stand, remain 等代替。如:
Once there lived a king who cared more about new clothes than anything else.从前有位国王喜欢新服胜过别的任何东西。9.习惯用语
There is no good /use(in)doing sth.做某事没有好处/用处;There is not a moment to lose.一刻也不能耽误。例如:
There is no good making friends with him.和他交朋友没有什么好处。
He is very ill.Send him to hospital.There's not a moment to lose.他病得厉害,把他送到医院去,一刻也不能耽误。
there be与have的比较
■不同之处
一、用法不同
there be 表示某个时间或地方“存在”某人或某物,而have表示主语“拥有”某人或某物,作宾语的某人或某物属主语所有。
二、结构不同
there be + sb./sth.+时间/地点(副词或介词短语);sb./sth.+ have +sb./sth.else There are some children in the garden.花园里有几个孩子。She has three cars.她拥有三辆汽车。(汽车是属于她的)■相同之处
1.表示某物体在结构上“装有”“配备有”“固有”时,两者均可用。如:
A clock has a round face.= There is a round face on a clock.钟面上有一个圆型的钟盘。
Each house on the street has a small yard.= There is a small yard in each house on the street.这条街旁的每栋房子都有一座小花园。
2.当have表示“包括”时,可以用 There be 替换。如:
A week has seven days.=There are seven days in a week.一周有七天。
3.当 have 表示“存在”时,可以用 There be 替换,如(www.teniu.cc): Our village has only one street.=There is only one street in our village.我们村里只有一条街。
This country has rich resources, such as oil, coal and iron.=There is rich resources, such as oil, coal and iron, in this country 这个国家有丰富的资源,如石油、煤和铁等。
第四篇:it 用法总结
It的用法总结
在英语中,it有许多不同的用法,它既可以用作代词(如人称代词、非人称代词),也可以用作引导词(作形式主语或形式宾语),还可以用来构成强调句型。
1.it用作代词
(1)用作人称代词 在句子中作主语或宾语;指前面已经提到过的事物、动物或人,且it指特定的事物;如果指前文中提到的事物中的任何一个,用one。one可以与any, each, every, not等连用,但one不可代替不可数名词。
—Where’s your car?
—It’s in the garage.你的汽车在哪儿呢?在车库里。(指代物品your car)Did you hit it? 你打中了吗?(指代事件)The baby cried when it was hungry.这婴儿饿时就哭。(指代婴儿,尤指性别不详或无所谓时)
—Who is that? —It’s me.是谁?我。(指一定情景中所确定的人或事物,此时相当于指示代词,代指this和that,有时也指人)—What’s this?
—It’s a box.这是什么?一只箱子。
(2)作非人称代词 表示天气、日期、时间、温度、距离、价值、路程、度量、自然现象与环境等。也可模糊地指一般情形或上文的部分或整个意思。译成汉语时,it通常不一定译出来。
It’s a long time since they left.他们走后很久了。It’s two miles to the beach.离海滨有两英里远。
That’s just it—I can’t work when you’re making so much noise.原因就在这里——你弄出这么大的声音,我工作不了。
另外,需要注意两点:
(1)“It’s time…”后面可以接不定式和介词短语表示“是做„„的时候了”。如: It’s time for supper.It’s time to have supper.(2)“It’s time…”后面还可以接一个从句,但是从句中的谓语动词一定要用过去式即虚拟语气,如:
It’s time we had lunch.是我们吃饭的时候了。
It’s time we started.是我们该出发的时候了。
2.it用作引导词
(1)作形式主语
由动词不定式、动词-ing短语或名词性从句担任主语的句子,常用it来作形式主语,而把真正的主语放在句子的后面。
It’s not easy for us to learn English well.[句型为: It +be+形容词+(for sb.)to do sth.] It’s foolish of you to say that to her.[句型为: It +be+形容词+(of sb.)+to do sth.] It’s no use/good/help…sleeping too much.(句型为: It +be+名词+doing)It’s important that we be there on time.(句型为: It +be +形容词+that从句)
It’s high time that Tom went to school.(句型为: It +be +time +that从句,从句中的动词用过去时)It was the second time that he had telephoned me that day.[句型为: It +be+ the first(second, third)time +that从句](that从句中动词用完成时)
It was arranged that they should leave the following winter.(句型为: It +be+过去分词+that从句)It appears that the two leaders are holding secret talks.(句型为: It +不及物动词+that从句)
(2)作形式宾语
当宾语是动词不定式、动词-ing短语或名词性从句时,而宾语后又有宾语补足语,则需用it作形式宾语,将真正的宾语放到宾语补足语的后面。用于这种结构的动词有:feel, find, think, make, consider, take等。
Marx found it important to study the situation in Russia.马克思发现研究俄国的形势很重要。
I find it strange that she doesn’t want to travel.她竟不想旅游,我觉得很奇怪。
I’ ll make it clear to you that failure is the mother of success.我要告诉你们失败是成功之母。
3.it用在强调句型中
英语中,为了突出句子中的某一成分,达到强调或使人特别注意该成分的目的,人们常用“It is/was+强调对象+who/whom/that….”句式把整个句子分割成前后两个部分,使之各自有自己的谓语动词,中间由that或who/whom连起来成为一个新句子。除强调人时用who, whom外,其余情况都用连词that。被强调的对象仅限于句子的主语、宾语、宾语补足语和部分状语(包括状语从句),即除谓语和定语以外的句子成分。这部分状语主要包括地点状语、由before, when, after, not until等引起的时间状语从句、由because, because of引起的原因状语、由by引起的方式状语等。
当被强调的对象是人时,可用who, whom或that,其余情况一律用that;当被强调对象在从句中做主语时用who/that,当被强调对象在从句中做宾语时用whom/that。
原句:My father did the experiment in the lab yesterday evening.昨天晚上我父亲在实验室做实验。
It was my father did the experiment in the lab yesterday evening.昨天晚上是我父亲在实验室做实验。(强调主语)
It was the experiment that my father did in the lab yesterday evening.昨天晚上我父亲在实验室里做的是实验。(强调宾语)
It was yesterday evening that my father did the experiment in the lab.我父亲是昨天晚上在实验室做实验的。(强调时间状语)
It was in the lab that my father did the experiment yesterday evening.我父亲昨天晚上是在实验室里做这个实验的。(强调地点状语)
另外,再注意两点:
(1)强调句如果还原成陈述句的话,句子成分是完整的,如果不完整,那必然是别的从句而不是强调句。
It was the town where we lived for three years.此句是定语从句,因为还原以后的句子为: We lived the town for three years.缺少介词(in the town), 而It was in the town that we lived for three years.这就是一个强调句了。
(2)强调中心也可以是疑问词,这时要将疑问词置于句首,构成一个特殊疑问句。Why is it that you want to leave so soon? 你到底为何这么早就要走?
It用法大总结(中)
4.It is important(necessary, right, strange, natural...)that...该句型和上一个同属一个句型。由于主句中的形容词不同,that 后的从句中要用虚拟语气(should + 动词原形),should 可以省去。建议记住该句型中的形容词。It is important that we(should)learn English well.It is necessary that he(should)remember these words.It is strange that he should have said those words.5.It is said(reported, learned…)that …
该句型中的it 仍是形式主语,真正主语是 that 引导的主语从句。该结构常译为“ 据说(据报道,据悉……)”。
It is said that he has come to Beijing.It is reported that another man-made satellite has been put into orbit 6.It is suggested(ordered, required...)that...该句型和上一个同属一个句型。主句中的过去分词是表示请求,建议,命令等词时,that 后的从句要用虚拟语气(should + 动词原形),should 可以省。常译为“ 据建议;有命令……)”。It is suggested that the meeting(should)be put off.It was ordered that we(should)arrive there in two hours.7.It is a pity(a shame...)that...该句型中,that 后的从句一般用虚拟语气(should + 动词原形),should 可省去.表示出乎意料,常译为“竟然”。没有这种意义时,则不用虚拟语气。
It is a pity that such a thing(should)happen in your class.8.It is time(about time , high time)that...该句型中that 后的从句应该用虚拟语气,值得注意的是① 常用过去时态表示虚拟.② 有时也用should + 动词原形,should 不能省。常译为“是(正是)……的时侯……”。It is time that children should go to bed.= It is time that children went to bed.9.It is the first(second …)time that …
该句型要和上一个句型区别开来。该句型中的 that 从句不用虚拟语气,而用完成时态。至于用什么完成时态,由主句的谓语动词的时态决定。如果是一般现在时,后面从句用现在完成时态;如果是一般过去时,后面从句则用过去完成时态。该结构中 that 可以省去;it 有时用 this 替换,常译为“是第一
(二)……次……”。It(This)is the first time I have been here.It(This)was the first time I had been here
一、人称代词1,it的最基本用法是作代词,主要指刚提到的事物,以避免重复: ①They watched the train until it disappeared in the distance.2.,也可以指动物或婴儿(未知性别的婴儿或孩子): ②Is this your dog?No, it isn’t.③They got a baby and it was a ten-pounder3.,也可指抽象事物或指抽象环境和情景: ③I hate it when people talk with a full mouth..
二、.非人称代词
1.it有时并不指具体的东西而泛指天气、时间、日期、距离、价值、度量、温度、环境等: ⑴.指天气:It is a lovely day, isn’t it?
⑵.指时间: It was nearly midnight when she came back.⑶.指日期:It is April First today.⑷.指距离:It is some 3000 kilometers from Beijing to Guangzhou.⑸.指价值:It is three dollars.⑹.指温度:Today it is 30 degrees centigrade.三、其他用法1.在句子的主语不太明确时充当主语,表示谁在做某事:
①Who is it there? It's I(me/you/he.....).②I thought it was Mary, but it was not she.③Her face lighted when she saw who it was.2.泛泛的指某件事:(有时泛指一般情况)①It doesn’t matter.②It is a shame, isn’t it?③How is it going?(情况怎样)④It says in the newspaper that......3.it用在一些词组中,it 没有特别的意思 The last train's gone.Come on, we'll foot it.(来,咱们步行吧。)
四、作形式主语,替代主语从句,动词不定式,或动名词短语: 1.作形式主语替代主语从句⑴It is clear(obvious,true,possible,certain....)that 从句 常译为"┅清楚的(显然的,真的,可能的,肯定的...)"
It is very clear that he’s round and tall like a tree.= That he’s round and tall like a tree is very clear.⑵It is important(necessary,right,strange,natural...)that 从句 常译为┅是重要的(必要的,对的,奇怪的,自然的┅).that 后的从句中要用虚拟语气(should + 动词原形),should 可以省去,建议记住该句型中的形容词。①It is important that we(should)learn English well.②It is necessary that he(should)remember these words.⑶It is said(reported/ learned/believed/thought/known/told/hoped.....)that 从句 常译为"据说(据报道,据悉...)"。①It is said that he has come to Beijing.②It is reported that another earth satellite has been put into orbit.⑷It is suggested(advised/ ordered / demanded/ insisted/ commanded...)that 从句.that 后的从句要用虚拟语气(should + 动词原形),should 可以省;常译为"据建议;有命令...)①It is suggested that the meeting(should)be put off.②It was ordered that we(should)arrive there in two hours.⑸It is time(about time,high time)that从句(虚拟语气:动词用过去时did)① It is time that children went to bed.② It is time you bought a new car.③ It is(high)time you made up your mind.⑹It is the first(second...)time that从句(从句用现在完成时 have done)It was the first(second...)time that从句(从句用过去完成时had done)常译为"是第一
(二)...次..."。
It is the first time I have been here.= This is the first time I have been here ⑺It is a pity(a shame /an honour/a good thing/a fact,/a surprise/...)that从句.that后的从句一般用虚拟语气(should + 动词原形),should可省去.表示出乎意料,常译为"竟然"。没有这种意义时,则不用虚拟语气。①It is a pity that such a thing(should)happen in your class.这种事竟然发生在你们班 上,真是遗憾!②It is a pity that he is ill.他生病了,真遗憾!⑻It happens(seems,looks,appears)that从句.常译为 “ 碰巧„,似乎是„,看起来„” ①It happened(so happened)that he met his teacher in the street.碰巧...②It seems that he will be back in a few days.看来... 2.作形式主语替代不定式 ⑴ It is kind(of sb.)to do sth.不定式的逻辑主语是由 of引起,主句中的形容词必须是能表示逻辑主语特征的褒义或贬义形容词。常见的词有:bad,brave,careless,clever,cruel,foolish,good(好心的),honest,horrible,kind,lazy,modest,naughty,nice(有教养的),polite,rude,silly,stupid,wise,wrong(错误的)等。这个句型可以改写为:sb.is kind to do sth.。如:It is kind of you to say so.= You are kind to say so.⑵It is necessary(for sb.)to do sth..不定式的逻辑主语是由for引起,主句中的形容词通常是表示重要性,紧迫性,频繁程度,难易,安全等情况的中性形容词。常见的形容词有:important,necessary,natural easy,safe,common,normal,hard,difficult,dangerous,unusual,rare,impossible,pleasant 如:It is important for her to come to the party.= It is important that she(should)come to the party.⑶It takes sb....to do sth.常译为"做...要花费某人..."。如:It took thousands of people many years to build the Great Wall.3.作形式主语替代动名词短语It is no good / no use / useless doing sth.常译为 “┅有好处或没有用” ①It is no good learning English without speaking English.②It's useless trying to argue with Shylock.五、作形式宾语,代替不定式,动名词短语或宾语从句。We think it important to learn a foreign language.该句型中的it 作形式宾语,该结构中常用的动词有:think, believe, make ,find consider, feel; 如:We think it our duty to clean our classroom every day.He felt it important learning English well.They found it difficult that they would finish their work in two days.The Internet makes it easier for companies to keep in touch with customers.六、.it的重要句型 1.强调句型: It is/was + 被强调部分 + that 从句(被强调的主语如果是人,that可以由who换用)①It was about 600 years ago that the first clock with a face and an hour hand was made.②It was they that(who)cleaned the classroom yesterday.③It was in the street that I met her father.④It was yesterday that I met her in the street.⑤It is you that /who are wrong.特例:It is not until + 被强调部分 + that...该句型也是强调句型。主要用于强凋时间状语,译成汉语"直到...才...",可以说是 not...until...的强调形式。It was not until she took off her dark glasses that I realized she was a famous film star.= Not until she took off her dark glasses did I realize she was a famous film star.= I didn’t realize she was a famous film star until she took off her dark glasses.
第五篇:AS用法总结
龙文学校1对1英语辅导教师发现近几年高考试卷中有关as一词的题目出现过很多次,其中as或是最佳选项,或是干扰项,或是题干中的关键信息点,涉及到as作为连词、介词、关系代词、副词以及习语等各种用法。所以龙文学习校英语辅导教师结合高考真题将as的用法归纳如下:
一、用作连词的as
1.引导时间状语从句,表示“当……的时候”,其用法与when和while类似。例如:As a child(When he was a child), she was sent to six different schools.此用法中as多表示从句与主句动作同时进行,意为“一边……一边……”,一般不与状态动词连用。例如:She sang songs as she did her homework.as 还可以表示一动作紧接着另一动作发生,说明另一动作的结果,有“随着……”的含义。例如:As time went by, we found he was an honest man./As he grew older, he lost interest in everything except gardening.例1 It wasn’t until nearly a month later________ I received the manager’s reply.A.since B.when C.as D.that
解析:本题的as中与when一起作为干扰项,容易使考生往时间状语从句上思考,事实上本题是强调句,正确选项是D。
2.引导原因状语从句,表示“由于,因为”,相当于because, 但通常置于句首。例如: As he is a qualified doctor, I trust his advice on medical matters.例2 _____ modeling business is by no means easy to get into, the good model will always be in demand.A.While B.Since C.As D.If
解析:本题中as干扰性很强,很多考生误以为是原因状语从句,但仔细分析不难发现正确答案应是A(while表示“只要”)。
3.引导让步状语从句,通常可与although或though通用,但语序不同,although或though用于句首,as用于倒装结构。例如:Young as I am, I already know what career I want to follow./Although(或Though)I am young, I already know what career I want to follow.as 表示让步用于倒装结构,通常将从句的表语、状语或动词前置。如果表语有冠词a/an, 需去掉。例如:Great scholar as he is, he is lacking in common sense./Much as I like you, I couldn’t live with you.例3 _____ he has limited technical knowledge, the older worker has a lot of experience.A.SinceB.Unless C.As D.Although
解析:as 虽然有引导让步状语从句用法,但本题不是倒装结构,故正确答案应是D。
4.引导方式状语从句,表示“如,像”。例如:When in Rome, do as Romans do./Do to others as you would have others do to you.例4 We wanted to get home before dark, but it didn’t quite ________ as planned.A.make outB.turn out C.go onD.come up
解析:本题考查动词词组辨析,题干中的“as planned”给同学们提供了重要信息,答案选B。
5.固定句型:“主句,as +be/do+主语”表示“也一样”。例如:She’s unusually tall, as are both her parents./He’s a doctor, as was his wife before she had children.二、用作介词的as
1.表示“如,像”。例如:They got united as one man./She spoke of me as her dearest friend.2.表示“作为、当作”。例如:As a League member, you should think more of others.3.与某些动词搭配,表示“把……当作……”,如:look on…as…, regard…as…, treat…as…, consider…as…, think of…as…, see…as…等。其中consider…as…中的as可以省略。as与famous或known搭配,表示“作为……而出名”。
例5 Linda worked for the Minnesota Manufacturing and Mining Company, ________ as 3M.A.knowingB.known C.being knownD.to be known
解析:如果熟悉be known as这一短语,运用有关非谓语动词的常识,可选出正确答案B。
三、用作关系代词的as
1.引导限制性定语从句,先行词前通常有as, so, such, same等修饰语。例如:He will marry as pretty a girl as he can find./My hometown is no longer the same as it used to be./As many people as are present will be given a present.在此种用法中,同学们要注意与结果状语从句的区别。比如:A: The teacher asked us such a difficult question that none of us could answer it.B: The teacher asked us such a difficult question as none of us could answer.A句为结果状语从句,而B句则是定语从句。
2.引导非限制性定语从句,用来指代整个主句(即先行句),表示“这一事实,那一情况”。从句可以位于句首、句中或句末。例如:We stand when the national anthem is played, as is the custom.例6 ______ I explained on the telephone, your request will be considered at the next meeting.A.When B.After C.As D.Since
解析:根据句意,选项C是正确答案。as表现的正是本点所讲用法。
四、用作副词的as
修饰形容词或副词,表示程度,意为“同样地”。例如:He swims fast, but I swim just as fast.但它通常构成表示比较的结构“as„as„”,“not as„as„”。此结构中第一个as是副词,第二个as是连词。否定结构中的副词as可以由so代替。as„as possible /one can也属于此用法。例如:It is generally believed that teaching is as much an art as it is a science.五、用在习语中的as
由as构成的习语很多,常见的有:as soon as “一„„就”,引导时间状语从句;as/so long as “只要”引导条件状语从句;as if/though “好像,仿佛”,引导方式状语从句或表语从句;as to/ as for “至于,就„„而言”;as much/many as“多达„„”;as/so far as “就„„的限度”;as a result,as a result of “(由于„„的)结果”;as a matter of fact“事实上”;as well “也、还”;A as well as B“不但A而且B”;as it is“照现状看,看样子”,等等。这些习语在高考中可能经常遇到,在高考题中有的作为正确选项,有的作为干扰项,有的出现在题干,值得同学们认真掌握。例如:
例9 I would like a job which pays more, but ______ I enjoy the work I’m doing at the moment.A.in other wordsB.on the other hand C.for one thing D.as a matter of fact解析:选项D极具干扰意义,但进一步研读会发现本题中的两个分句表达了一件事的两个对立面,故选B。
例10 ——People should stop using their cars and start using public transport.——______.The roads are too crowded as it is.A.All right B.Exactly C.Go aheadD.Fine
解析:本题选项中虽没有as内容,但题干中的as it is却是解题的关键信息,正确选项为B。
以上所总结的是as一词的主要用法及在高考卷中的具体应用,可以看出它词性多,词义广,用法灵活。龙文学校辅导教师希望同学们在复习中一定要理清思路,抓住重点,应用时仔细分析上下文,弄清逻辑关系,才能作出正确选择。