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
A

adityap

@adityap
About
Posts
9
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Winform Control Event Handling
    A adityap

    Hi, I have created a control, and added event handling capabilty throught delegates. Now the problem here is, i want to use this control as a ActiveX control and i am unable to find a way to handle the events on the web page??? P.S. i have tried my control in windows application, it works fine! Also i have used delegates to expose my control's events for outside world, if you have a better( rather another) way i would love to see that. Thanks in anticipation:)

    C# com help question

  • Winform Control as ActiveX
    A adityap

    Hi, I have created a simple WinForm control (as a replacement of activex) in c#.net . I embedded it in my html page, it works fine. Now i have created a delegate to handle a event "xyz". Now this "xyz" event is called on the "mouseclick" event of my control (actually its one of the compenent i.e. textbox).

    In the class declaration.. public delegate void RecogniseCommandDelegate(); public event RecogniseCommandDelegate VoiceCommand; //refered to as "xyz" .... ..... private void txtUserText_MouseClick(object sender, MouseEventArgs e) { VoiceCommand(); //"xyz" raised }

    The problem now arises is how do i register this event handling in my html page, so that when "xyz" event is raised i perform some action on the web page????????? It could be using JScript or VBScript or ASP.NET or any thing, what i need is a working example of such senario.. If any body could help on this, i would really be greatfull. Thanks in anticipation. P.S. I used delegate because i couldnt figure out a way to diretly handle the mouseclick( or any other event for that matter) event. If any body can do it without delegate, that would be great too.

    C# csharp help question html asp-net

  • Error : Cannot write to a closed TextWriter
    A adityap

    I have tried putting Console.ReadLine(), but the error remains the same :sigh: And yes i am sorry for that ill-formatted code.. i'll remember to put

    next time..

    -- modified at 0:46 Tuesday 11th July, 2006

    C# help tutorial question

  • Error : Cannot write to a closed TextWriter
    A adityap

    Hi, I am getting the above mentioned error while excuting the following simple example ( relating to dispose and finalize). Exact output is also attached after the program. Can any body explain me the cause for this? Thanks a lot in advance //#PROGRAM using System; namespace test { //Base.cs public class Base : IDisposable { private bool disposed = false; private readonly int id; public int ID { get { return id; } } public Base(int theID) { id = theID; } public void Disp() { Console.WriteLine("You can run me after disposing{0}",id); } protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { Console.WriteLine("Base Cleaning up managed resources on {0}",id); // Code to clean up managed resources } Console.WriteLine("Base Cleaning up unmanaged resources on {0}", id); // Code to clean up unmanaged resources } disposed = true; } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ~Base() { //Following line gives error for object 2 Console.WriteLine("*** Finalize called on Base {0}", id); Dispose(false); } } //Derived.cs public class Derived : test.Base { private bool disposed = false; public Derived(int theID) : base(theID) {} protected override void Dispose(bool disposing) { if (!disposed) { try { if (disposing) { Console.WriteLine("Derived Cleaning up managed resources"); // Code to clean up managed resources } Console.WriteLine("Derived Cleaning up unmanaged resources"); // Code to clean up unmanaged resources } finally { base.Dispose(disposing); } } disposed = true; } } //Test.cs class Test { [STAThread] static void Main(string[] args) { Derived object1 = new Derived(1); Derived object2 = new Derived(2); object1.Dispose(); } } } //#OUTPUT Derived Cleaning up managed resources Derived Cleaning up unmanaged resources Base Cleaning up managed resources on 1 Base Cleaning up unmanaged resources on 1 An unhandled exception of type 'System.ObjectDisposedException' occurred in mscorlib.dll Additional information: Cannot write to a closed TextWriter. Unhandled Exception: System.ObjectDisposedException: Cannot write to a closed TextWriter. at System.IO.__Error.WriterClosed() at System.IO.

    C# help tutorial question

  • ListBox ValueMember
    A adityap

    This would work absolutely fine, but you did not get my problem I am displaying some value in the listbox and actually require some different value, say for e.g. i am showing names in the box whereas if the user selects a name i am retriving the corresponding employee ID for that name. Now this scenario is possible through ValueMember and DisplayMember property of ListBox. DisplayMember = name ValueMember = empId Now the code which you gave me works fine if i need to retrive the DisplayMembers from listbox.. My question though,here was i needed the ValueMembers to corresponding selection Thanks a lot -- modified at 6:14 Thursday 11th May, 2006

    C# database data-structures performance tutorial question

  • ListBox ValueMember
    A adityap

    Hi, Can we have a ListBox ValueMember Collection? If we have SelectionMode as MultiExtended, and we select more than one values in the listbox, then can we show its respective value member as we can show the SelectedIndices (Collection of selected index) If there is a way could you please post an example with it.. And if there is not then What are the alternatives (without using and temp array to kepp track of it..some memory mgmt is required here) Thanks a lot

    C# database data-structures performance tutorial question

  • Type.Missing and Missing.Value
    A adityap

    Hi, Can any one explain me the difference between Type.Missing and Missing.Value, if there is any? Where should we use either of them (if there are difference or otherwise)? Finally, Please explain what should be used while automating excel in the param to add method of workbook object. Thanks a lot

    C# question

  • Searching HUGE XML file
    A adityap

    Hi, I have a very huge XML file ( around 30 MB in size).. The problem is i need to search nodes( many of them, basically BFS) XML file contains data in linear fashion.. now searhing around 30,000 nodes takes long time... can any one suggest which class could i use here to obtain faster results.. i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose... probably some code snippets supporting your answer would be of great help:) Thanks techno_adi -- modified at 11:33 Thursday 20th April, 2006

    XML / XSL help csharp algorithms xml

  • Localization Issue
    A adityap

    Hi, I have many projects in my solution.. All have been localized ... The problem which i am facing is in one project, i.e. when i change the language for the application at run time.. every thing works fine except that none of the form under this project gets localized... ex: Solution Localization Manager Project 1 Project 2 Project 3 Project 4 Now forms of project 4 does'nt show up culture specific captions where as all other form does that fine!!! What is the cause of the problem and how could this be solved???? Thanks in Advance Aditya

    C# 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