text: Q:
  
  Get height or amount of lines of a text field
  
  rc = ws.DialogBox("SomeForm",True,True,,,,,,doc,True)
  
  I have a dialogbox with a text field on it. The problem is when a user types in too much text (too many new lines being added to the text field), it will go beyond the size of the dialogbox and will not be displayed anymore. The only solution so far is to reopen the dialog, which will recalculate the size of the dialogbox.
  So first I tried adding a vertical scroll bar:
  rc = ws.DialogBox("SomeForm",True,,,,,,,doc,True)
  
  This however adds a horizontal scroll bar too, which is totally unnecessary.
  The my next approach was setting the size manually using the WIN-API:
  Declare Function FindWindow Lib "user32" Alias "FindWindowA" (Byval lpClassName As Any, Byval lpWindowName As Any) As Long
  Declare Function SetWindowPos Lib "user32" (Byval hwnd As Long, Byval hWndInsertAfter As Long, Byval x As Long, Byval y As Long, Byval cx As Long,Byval cy As Long, Byval wFlags As Long) As Long
  Const SWP_NOMOVE = &H2
  
  Dim myhWnd As Long
  myhWnd = FindWindow("#32770", "Lotus Notes")
  SetWindowPos myhWnd, -1, 0, 0, 617, 311, SWP_NOMOVE
  
  This works fine, however I don't know when to execute it. Logically, this would have to run when a new line gets added in the text field, but I have no way to detect when this happens...
  So, is there any way to make my dialogbox dynamic in terms of size? I know I'm probably at a dead end here, but I figured asking is worth a shot :)
  
  A:
  
  Just change the text- field to be of type "Native OS style". Then you define a max height, and the Dialog becomes exactly the right size. The scrollbar then automatically appears in the Text- field, and the dialog does not have to change size.
  
  