Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

telha

@telha
About
Posts
11
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • X509Store from file
    T telha

    Can you provide some more details that what else you wanna do? X509Certificate class is used to read a certificate like: X509Certificate cert = X509Certificate.CreateFromCertFile(PathToCertificate); If you have a certificate file with extension .cer you can read it's contents through the object of X509Certificate. MakeCert is a utility with .Net Framework to create a Certificate. There are other encryption libraries available that you can use to provide a private/public key pair for creating your certificate....? Whereas the X509Store is used to manage the certificates...

    Muhammad Talha

    C# algorithms cryptography tutorial question

  • bit parameter problem
    T telha

    Well I guess you can make a check like: bool myBool = comp.value==1?true:false

    Muhammad Talha

    C# database help csharp tutorial question

  • Hashtable v.s. Dictionary
    T telha

    Well MSDN states that Dictionary(Of TKey, of tValue) is a new class in v2.0. but further explains that the Objects used as Key are required to have an implementation of Equality Comparer, IEqualityComparer whereas in HashTable the objects used as Keys are required to override the IHashCode Provider interface or Object.GetHashCode method. Internally HashTable uses the Dictionary object as its Key/Value pair but hashtable is faster in retrieval. Rest of the details are well explained in MSDN.

    Muhammad Talha

    C# question

  • Which Event is Fire !
    T telha

    Well I guess a simple solution to the problem would be to declare a public event (say OnEditFormClosing) and when you create an instance of the Form2 (the Image Edit Form), register that event (Handler of the event) in Form1 (Original Form). Now when you close Form2 (Edit Form), handle its 'Close Event' and from there Invoke the event (OnEditFormClosing), this will notify your Form1 that Form2 closed, as a result you can refresh the image in picture box may be by reloading or whatsoever procedure you adapt. Regards

    Muhammad Talha

    C# question announcement

  • how to add new windows service by using C# code
    T telha

    Well I also looked a sample on Code Project for this which calls the InstallUtil utility through code, I guess if you search this site for Dynamic Windows Service Installer, you will come across that.... anyway the code is as: using System; using System.Diagnostics; using System.Net; using System.IO; namespace ServiceInstaller { /// /// /// public enum WindowsServiceAccountType { LocalService, NetworkService, LocalSystem, User } /// /// /// public class WindowsServiceInstallInfo { #region "FIELDS" private System.String _windowsServiceName; private System.String _wsDescription; private readonly string _windowsServicePath; private readonly string _windowsServiceAssemblyName; private WindowsServiceAccountType _wsAccountType; private readonly string _wsAccountUserName; private readonly string _wsAccountPassword; #endregion #region "CONSTRUCTOR" /// /// /// /// Path to folder where Windows Service binary is located. /// Windows Service Assembly Name. /// Windows Service Account Type.(not user type) public WindowsServiceInstallInfo(string windowsServicePath, string windowsServiceAssemblyName, WindowsServiceAccountType wsAccountType) : this("", windowsServicePath, windowsServiceAssemblyName, wsAccountType) { } /// /// /// /// Name of the windows service. /// Path to folder where windows service assembly stored. /// windows service assembly name. /// Windows service account type (not user type) public WindowsServiceInstallInfo(string windowsServiceName, string windowsServicePath, string windowsServiceAssemblyName, WindowsServiceAccountType wsAccountType) : this(windowsServiceName, "", windowsServicePath, windowsServiceAssemblyName, wsAccountType) { } /// /// /// /// Name of windows service.

    C# csharp tutorial

  • how to add new windows service by using C# code
    T telha

    Well there are certain ways to add a service to your windows registered services. 1) You can use the InstallUtil tool that comes with the .Net Framework;Go to the Visual Studio Command prompt and there type InstallUtil Path-to-Assembly-to-be-installed-as-service This is a manual procedure. 2) Create a new setup project using the Visual Studio Setup Wizard and then under the "File System Editor" add the output (the assembly that you want to install as service", after this go to "Custom Actions Editor", you will see four folders there, 1- Install, 2- Commit, 3- Rollback and 4- Uninstall, right click on Install and click on "Add Custom Action" from the resulting menu, under the result dialog, locate the application folder and locate the assembly of the service that you just added in Application Folder, double click on this assembly. Now when you run the setup project, the service will be added to your windows services if everything goes well. For both the procedures, you would need to go to windows services console and start the service manually.

    Muhammad Talha

    C# csharp tutorial

  • Windows Service Account
    T telha

    I had a situation where I had to write a Windows Service which runs on a computer which is part of a network, the service runs under Local System account and starts another application upon its startup. Now the problem is that when I log on into that system hosting service using a remote desktop connection, I don't find the application started by the service, but when I connect to that system into the windows current session using "mstsc /console" command on command prompt, the system shows me the application started by the service. Regards, Talha

    Muhammad Talha

    C# sysadmin hosting help

  • Pausing thread untill asynchronous operation finishes.
    T telha

    Another simple way is to use Thread.Join() method.....

    Muhammad Talha

    C# csharp html com question career

  • problem with richtextbox Keypress Event
    T telha

    The delegate that handles the event raised has the invocation list of the methods to be called. It could be a reason that the code where the event is registered is called twice in the code execution, so check that out; the statement '+=' should be called only once when the form is loaded and the controls are created and added to it.

    Muhammad Talha

    C# question help

  • TextBox validating e.cancel=true does not cancel button event
    T telha

    The event order is Validating, Validated and lost focus. So before you click on the button, the text box events are fired. You must use the validating event of the text box and use a flag on behalf of that to execute the button click.

    Muhammad Talha

    C# csharp question

  • File Creation Time
    T telha

    I have situation in code where I have to deal with the File Creation Time. I have used System.IO.File class to check for the existence of the File and then deleted it, then in another function created the File using FileStream Class with FileMode.Create and CreateNew Parameter. File is delete in both cases from disk, (as it shows in the folder - with FileInfo and System.IO.File) but when the File is created again with FileMode.Create and FileMode.CreateNew, it has the older creation date i.e. the date of the deleted file. Can anyone help on this with a thorough and solid answer?

    Muhammad Talha

    C# architecture help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups