I have a range object which I use to append text to the end of a rich edit
control.
The problem is that the scroll bars do not appear once the text overflows
the window.
If the window is manually resized, the scroll bars show up and everything
works form that point on.
Any have any suggestions as to how I can resolve this problem?
Eli
Luis Ugaz - 02 Oct 2003 20:53 GMT
All classes can have application settings in their own
config file.
This article explains how:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?
txtCodeId=277&lngWId=10
In DotNet we now have Configuration Files.
This are XML files that can be changed as needed
without recompiling the application.
There are four different kind of configuration files:
- Machine Configuration Files
- Application Configuration Files
- Security Configuration Files
- ASP.NET Configuration Files
The Application Configuration File is to compare
with an INI file. With one big difference that
you only can Read settings, but not Write settings!
Writing has to be done manualy.
To use a configuration file you must add an
'Application Configuration File' to your project.
In the Visual Studio Environment this can be done by
right clicking the project, choose 'add new item'.
Then look for the item 'Application Configuration File'.
This will add an 'App.Config' file to your project.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>
To add your own settings, you must add a section
called 'appSettings'.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
</appSettings>
</configuration>
Here you can store your settings as key/value pairs.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Test1" value="This is the value of Test1" />
<add key="Test2" value="This is the value of Test2" />
</appSettings>
</configuration>
!!! BEWARE.......THE TEXT IS CASE SENSITIVE !!!
'appSettings' is not the same as 'appsettings'
Notice the captial S.
A runtime error will occure if you make a typing error.
An VB.NET example to read from the Configuration file.
Imports System
Imports System.Console
Module Module1
Sub Main()
Try
Dim config As Configuration.ConfigurationSettings
' Read the key:Test2
WriteLine(config.AppSettings("Test2"))
' To read all key's
Dim key As String
For Each key In config.AppSettings.AllKeys
WriteLine(key & " -- " & config.AppSettings(key))
Next
WriteLine("")
Catch ex As Exception
WriteLine("")
WriteLine(ex.ToString)
Finally
Read()
End Try
End Sub
End Module
>-----Original Message-----
>I have a range object which I use to append text to the end of a rich edit
[quoted text clipped - 11 lines]
>
>.