it will best if you use event handler in Child Form and Call it from Parent Form. class FrmChild { public event System.EventHandler addData; ......... ...... } class FrmParent {..... private void btnSchduler_ClickEvent(......) { FrmChild obj=new FrmChild(); obj.addData +=new EventHandler(objServices_addService); obj.ShowDialog(); } private void objServices_addService(object sender, EventArgs e) { //write code to Add in Data Grid.... } } Sanjit.rajbanshi@wlinktech.com
Sanjib Raj
Posts
-
Sending data from a form to another -
Log Message display controlshould try to writing Log using Named Pipe and Display in Listview Control. thanks sanjit.rajbanshi@wlinktech.com
-
how to explorer Folder Option ,...(Urgent)i want to explorer Folder Option, Map Network Drive,Disconnect Network Drive, i use following code but not works? System.Diagnostics.Process.Start("explorer.exe", "Map Network Drive"); Sanjit.rajbanshi@wlinktech.com
-
How to get Status of Process (Urgent)how to get status of process for checking if the process status is running or not. Sanjit.rajbanshi@wlinktech.com
-
How to Display Data (Urgent)How to Display data from Child form to Parent Form Control. Sanjit.rajbanshi@wlinktech.com
-
how to minimize application in system tray?one way to do this like make Control Box false. then Create your own minimize box adding one button. and on Minimizebutton Click write this.Hide() Sanjit.rajbanshi@wlinktech.com
-
how to Open Folder Option,......i want to Open Folder Option,My Network Places, Map Network Drive, Disconnect Network Drive, Search Files and Folder. i use following code : System.Diagnostics.Process.Start("explorer.exe", "My Network Place"); but not Works? Sanjit.rajbanshi@wlinktech.com
-
how to make licence key in Set up projecti have Setup of Project. i want to make a licence key after installing the Setup project. After giving the right licence key, then project or exe file should Start. I have no idea about that. please give me some ideas. thanks. Sanjit.rajbanshi@wlinktech.com
-
how to read Edit, delete records from Datagrid control [modified]i want to Edit, Delete, Xml Records Displayed in Datagrid. Plz help me i am using code for Displaying Records in Datagrid like this. { DataSet ds=new DataSet(); ds.ReadXml(@"D:\schedulerFiles\Date.xml"); dataGrid1.DataSource=ds; dataGrid1.SetDataBinding(ds,"DateSchedule"); } -- modified at 3:17 Tuesday 10th April, 2007
-
How to Open Control Panel,Entire Network,Printer and Fax in Different processi have used System.Diagnostics.Process.Start("explorer.exe","Control Panel"); but not work. plz help me. Sanjit.rajbanshi@wlinktech.com
-
How to open MyDocument Explorer, My Network places Explorer in C#i have used System.Diagnostics.Process.Start("explorer.exe", "/e,/select,c:"); for Opening My Computer. it works. but i want to open My Doc, My Network place also. how it possible? Thanks. Sanjit.rajbanshi@wlinktech.com
-
how to access methods of Window Servicei am trying to access methods of windows Service from another project or Application is it possible? except Start, Stop method of Windows service. suppose in my window service i have method like this for Creating a folder in C: drive. // this service class one Method. public void mthCreateFolder() { //logic for creating folder } When i use System.ServiceProcess class using The name of the Service i can access Start, Stop, Restart Method of That Service. But now i want to Access method mthCreateFolder of that service. Plz help me? Sanjit.rajbanshi@wlinktech.com
-
How to communicate between two processi have a window service and window application two different projects. i am hendling a window service through window application for start, stop, Restarting the service. i am checking service using Timer in window Application for every 500 interval. but i want it without using Timer it should check the service status, if i stop service(in services) then it automatically show Stop in Window Application. Thanks Sanjit.rajbanshi@wlinktech.com
-
how to show (Application)Process in on Desktop [modified]i making an Windows Service Automatic Sheduler, i use following code in a class to run calc.exe, nodepad.exe,and other application or process, but the program appears or Run on background on WindowsTaskManager Process tab, not visible in the desktop. how to bring it to the desktop. code-------- ProcessStartInfo pInfo=new ProcessStartInfo(path); pInfo.WindowStyle=ProcessWindowStyle.Maximized; Process p=Process.Start(pInfo); code-------------- Sanjit.rajbanshi@wlinktech.com -- modified at 5:34 Friday 23rd March, 2007
-
How to create Inline function in C#.Plz give me idea to create inline Function in C#. Sanjit.rajbanshi@wlinktech.com
-
how to read Fast Large Xml FilePlz give me supar fast method for reading Large Xml File of 4MB to 10MB. i have used the following code but it is also slow for my Application. 1 st way-> FileStream sr=new FileStream ("C:\test.Xml",FileMode.Open); XmlTextRader rd=new XmlTextReader(sr); Whlie(rd.Read()) { // ----- // } Second way-> FileInfo sr=new FileInfo ("C:\Test.Xml"); XmlTextRader rd=new XmlTextReader(sr.OpenRead()); Whlie(rd.Read()) { // ----- // } Sanjit.rajbanshi@wlinktech.com
-
how to list network computer name, Ip in C#i want to list all Computer Name, and Ip Address for the Domin "WLINKTECH". i use the following code but get an error like this, so plz help me about the problem. -------------------- using System; using System.DirectoryServices; namespace IPAddressof_RemoteComputer { public class Class1 { public Class1() { // // TODO: Add constructor logic here // } public void getIpCName() { DirectoryEntry entry = new DirectoryEntry("LDAP://wlinktech"); DirectorySearcher mySearcher = new DirectorySearcher(entry); mySearcher.Filter = ("(objectClass=computer)"); Console.WriteLine("Listing of computers in the Active Directory"); Console.WriteLine("============================================"); foreach(SearchResult resEnt in mySearcher.FindAll()) { Console.WriteLine(resEnt.GetDirectoryEntry().Name.ToString()); } Console.WriteLine("=========== End of Listing ============="); } } } --------------- Error like this ------------------ An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.directoryservices.dll Additional information: The server is not operational Sanjit.rajbanshi@wlinktech.com
-
Plz help me on programmatically set NTFS file system folder permissionsi have programmatically set NTFS file system folder permissions by using Active Directory Service Interfaces in Microsoft Visual C#.the problem is that i give permissions through Mohana//administrator(Domin/User) to (C:\\Test) Folder. the program works but when i right click the test folder goto Security Tab it create another user (BUILTIN//BUILTIN)and give All permition to it. i want all permission to administrator. Plz help me. ...code.... using System; using System.Security; using ADSSECURITYLib; using ActiveDs; namespace SecurityFolder { public class clsSecurity { public clsSecurity() { } public void preformAction() { // Set to your domain name. // Set to the user account. SetPermissions("C:\\Test","MOHANA\\administrator"); Console.WriteLine ("Full Access control granted."); } public void SetPermissions(string vPath, String UserName ) { ADsSecurity objADsSec; SecurityDescriptor objSecDes; AccessControlList objDAcl; AccessControlEntry objAce1; AccessControlEntry objAce2; Object objSIdHex; ADsSID objSId; string mes; objADsSec = new ADsSecurityClass(); objSecDes = (SecurityDescriptor)(objADsSec.GetSecurityDescriptor("FILE://"+vPath)); //objSecDes=(SecurityDescriptor)objADsSec.GetSecurityDescriptor(vPath); objDAcl = (AccessControlList)objSecDes.DiscretionaryAcl; objSId = new ADsSIDClass(); objSId.SetAs((int)ADSSECURITYLib.ADS_SID_FORMAT.ADS_SID_SAM, UserName.ToString()); objSIdHex = objSId.GetAs((int)ADSSECURITYLib.ADS_SID_FORMAT.ADS_SID_SDDL); // Add a new access control entry (ACE) object (objAce) so that the user has Full Control permissions on NTFS file system files. objAce1 = new AccessControlEntryClass(); objAce1.Trustee = System.Convert.ToString (objSIdHex); objAce1.AccessMask = (int)ActiveDs.ADS_RIGHTS_ENUM.ADS_RIGHT_GENERIC_ALL; objAce1.AceType = (int)ActiveDs.ADS_ACETYPE_ENUM.ADS_ACETYPE_ACCESS_ALLOWED; objAce1.AceFlags = (int)ActiveDs.ADS_ACEFLAG_ENUM.ADS_ACEFLAG_INHERIT_ACE | (int)ActiveDs.ADS_ACEFLAG_ENUM.ADS_ACEFLAG_INHERIT_ONLY_ACE | 1; objDAcl.AddAce(objAce1); // Add a new access control entry object (objAce) so that the user has Full Control permissions on NTFS file system folders. objAce2 = new AccessControlEntryClass(); objAce2.Trustee = System.Convert.ToString (objSIdHex); objAce2.AccessMask = (int)ActiveDs.ADS_RIGHTS_ENUM.ADS_RIGHT_GENERIC_ALL; objAce2.AceType = (int)ActiveDs.
-
plz help me?How to assign read,Write,share Permition of Adminstrator Account to a to a certain Directory in C#.give me idea ? Sanjit.rajbanshi@wlinktech.com
-
Plz help mehow to create Create Windows User Account or Windows Administrator Account through C# programming. Sanjit.rajbanshi@wlinktech.com