还是用chr(13)吧
找string里面chr(13)的个数,然后分割

解决方案 »

  1.   

    chr(13) + chr(10) 回车和换行符
      

  2.   

    我试过了,可以用chr(13)进行判断!
      

  3.   


    vbLf、vbCrLf都表示换行
    但vbCr——chr(13)只表示回车,不表示换行对于文本框
    发送EM_GetLineCount消息可以得到行数
    发送EM_GetLine消息可以得到一行的内容
    EM_GETLINECOUNT
    An application sends an EM_GETLINECOUNT message to retrieve the number of lines in a multiline edit control. EM_GETLINECOUNT 
    wParam = 0; // not used; must be zero 
    lParam = 0; // not used; must be zero 
     
    Parameters
    This message has no parameters. Return Values
    The return value is an integer specifying the number of lines in the multiline edit control. If no text is in the edit control, the return value is 1. QuickInfo
      Windows NT: Requires version 3.1 or later.
      Windows: Requires Windows 95 or later.
      Windows CE: Requires version 1.0 or later.
      Header: Declared in winuser.h.
    EM_GETLINE
    An application sends an EM_GETLINE message to copy a line of text from an edit control and place it in a specified buffer. EM_GETLINE 
    wParam = (WPARAM) line;          // line number to retrieve 
    lParam = (LPARAM) (LPCSTR) lpch; // address of buffer for line 
     
    Parameters
    line 
    Value of wParam. Specifies the zero-based index of the line to retrieve from a multiline edit control. A value of zero specifies the topmost line. This parameter is ignored by a single-line edit control. 
    lpch 
    Value of lParam. Pointer to the buffer that receives a copy of the line. The first word of the buffer specifies the maximum number of characters that can be copied to the buffer. 
    Return Values
    The return value is the number of characters copied. The return value is zero if the line number specified by the line parameter is greater than the number of lines in the edit control. Res
    The copied line does not contain a terminating null character. QuickInfo
      Windows NT: Requires version 3.1 or later.
      Windows: Requires Windows 95 or later.
      Windows CE: Requires version 1.0 or later.
      Header: Declared in winuser.h.