? | 这是我找到的一个vb的程序,我想把它转成c#,但是我不明白里面的一句话,哪位可以给我解释解释吗? '--- module --- Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Const WM_USER = &H400 Public Const EM_GETPARAFORMAT = WM_USER + 61 Public Const EM_SETPARAFORMAT = WM_USER + 71 Public Const MAX_TAB_STOPS As Long = 32 Public Const PFM_LINESPACING As Long = 256 Public Type PARAFORMAT2 cbSize As Long dwMask As Long wNumbering As Integer wEffects As Integer dxStartIndent As Long dxRightIndent As Long dxOffset As Long wAlignment As Integer cTabCount As Integer rgxTabs(MAX_TAB_STOPS - 1) As Long //这句是什么意思呢? dySpaceBefore As Long dySpaceAfter As Long dyLineSpacing As Long sStyle As Integer bLineSpacingRule As Byte bOutlineLevel As Byte wShadingWeight As Integer wShadingStyle As Integer wNumberingStart As Integer wNumberingStyle As Integer wNumberingTab As Integer wBorderSpace As Integer wBorderWidth As Integer wBorders As Integer End Type '--- form --- '设form上有: 'richtextbox(rt) 'commandbutton(command1) Private Sub Command1_Click() Dim pf2 As PARAFORMAT2 Dim retval As Long rt.SelStart = Len(rt) pf2.cbSize = LenB(pf2) pf2.bLineSpacingRule = 3 pf2.dyLineSpacing = CLng(500 * Rnd) + 500 pf2.dwMask = PFM_LINESPACING retval = SendMessage(rt.hwnd, EM_SETPARAFORMAT, ByVal 0&, pf2) End Sub 上面的代码指定500到1000twips随机行距 用em_setparaformat+PARAFORMAT2可以很灵活的设置格式, 指定行距主要靠bLineSpacingRule跟dyLineSpacing这两个数据成员 具体信息msdn里有 |

我是初学者,还望各位多多指教啊!