第一篇: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);
第二篇: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一詞的主要用法及在高考卷中的具體應用,可以看出它詞性多,詞義廣,用法靈活。龍文學校輔導教師希望同學們在復習中一定要理清思路,抓住重點,應用時仔細分析上下文,弄清邏輯關系,才能作出正確選擇。
第四篇: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.tmdps.cn): 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 這個國家有豐富的資源,如石油、煤和鐵等。
第五篇: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.新工作并非真的升職,不過前景不錯。