ListGroups Method  
 

Return a list of newsgroups available on the server.

Syntax

object.ListGroups( [LastUpdate] )

Parameters

LastUpdate
An optional string argument which specifies the date and time that the list of newsgroups were last retrieved from the server. If this argument is omitted, then the value of the LastUpdate property will be used. If the value is an empty string, all available newsgroups will be listed by the server.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The ListGroups method requests that the server return a list of available news groups. The OnNewsGroup event will be fired for each group returned by the server. When the last news group has been listed by the control, the OnLastGroup event will fire.

While the the newsgroups are being listed, the client cannot select a newsgroup or retrieve the contents of a specific article. The client should store those newsgroups which it wants to retrieve articles from, and then once all of the newsgroups have been listed, it can then select each newsgroup and retrieve the available articles from that group.

A program should use either the ListGroups method or the GetFirstGroup and GetNextGroup methods, but never in combination with one another.

See Also

GroupName Property, LastUpdate Property, GetFirstGroup Property, GetNextGroup Property, OnLastGroup Event, OnNewsGroup Event