got my answer...need to use 'api'
Declare Function ConfigurePort Lib "winspool.drv" Alias "ConfigurePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long
explanation
· pName
Points to a null-terminated string that specifies the name of the server on which the specified port exists. If this parameter is NULL, the port is local.
· hWnd
Identifies the parent window of the port-configuration dialog box.
· pPortName
Points to a null-terminated string that specifies the name of the port to be configured.
user get '0' (if cancel is pressed) or '1'(if ok is pressed) as return
[code]
Private Declare Function ConfigurePort Lib "winspool.drv" Alias "ConfigurePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long
Private Sub Form_Load()
MsgBox ConfigurePort(vbNullstring, Me.hwnd, "COM2:")
MsgBox ConfigurePort(vbNullstring, Me.hwnd, "LPT1:")
End Sub
[\code]
Thank you phpbeginners for the help...now i have been able to create the module class using Mscomm reference...
now am stuck with one more thing with Mscomm..need you r help..
we can do mscomm.settings = "9600,n,8,1" ....
but if i want something of sort
mscomm.settings = "br,pr,db,sb"
where br,pr,db,sb are values provided by user...as i dont want these values hardcoded...
Thanks in advance.