Assuming that you have a good COM reference to the SAP.BAPI.1 DLL...
Something like this should do it:
private void Form_Load(){
SAP.BAPI.1 oConnect = new SAP.BAPI.1();
oConnect.Connection.ApplicationServer = "132.186.124.31";
oConnect.Connection.System = "00";
oConnect.Connection.User = "9999amk";
oConnect.Connection.Password = "AartiK";
oConnect.Connection.Client = "800";
oConnect.Connection.Language = "EN"
//Check if the connection was succesfully established
if(!oConnect.Connection.Logon(0, bSilentLogon)){
System.Windows.Forms.MessageBox.Show("Connection failed");
} else {
System.Windows.Forms.MessageBox.Show("Connect successfull");
}
}
-
Peter