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

Aryadip

@Aryadip
About
Posts
82
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Windows Forms Tab Control
    A Aryadip

    Hi all, I'm trying to select a tab from the windows form's standard tab control on right clicking of mouse button. The mouse event args gives me the location of the mouse pointer. But the tab control doesn't expose any method or property to get the tab on which my mouse pointer is hovering. Has anyone of you faced similar problem like this ? Or atleast it will be nice if anyone can show me a pointer towards solving this problem. Hoping to hear from you guys... Thanks and regards,

    C# winforms help question

  • integration with VS.NET 2003
    A Aryadip

    hi everyone, I've written a small application for my company and now would like it to integrate with VS.NET 2003. In the integration part, what I specifically want is to have a menu item placed in the context menu of solution explorer such that whenever the user right clicks on any .cs or .vb file, "Open with myApp" comes as a menu item in the context menu. Can anyone guide me with this? How should I go about doing this? I have seen many applications doing the same, that means this is possible. Some code snippet will be highly appreciated. thanks in advance... Cheers !! and have a Funky day !!

    C# csharp visual-studio tutorial question

  • customizing VS.NET 2003
    A Aryadip

    hi everyone, I've written a small application for my company and now would like it to integrate with VS.NET 2003. In the integration part, what I specifically want is to have a menu item placed in the context menu of solution explorer such that whenever the user right clicks on any .cs or .vb file, "Open with myApp" comes as a menu item in the context menu. Can anyone guide me with this? How should I go about doing this? I have seen many applications doing the same, that means this is possible. Some code snippet will be highly appreciated. thanks in advance... Cheers !! and have a Funky day !!

    Visual Studio csharp visual-studio tutorial question

  • Messaging with HTTP support
    A Aryadip

    Hi, As you all know MSMQ 3.0 supports HTTP messaging. Now it takes the Queue Path in the form : DIRECT=HTTP://localhost/msmq/private$/MyQueue where localhost represents the machine or site name, msmq represents the virtual directory name , private$ tells that the queue is a private Queue and MyQueue is the Queue name. We can use "system.Messaging" namespace to send and receive message from "MyQueue" over HTTP. By default MSMQ HTTP takes msmq as the virtual directory and gets created when you install MSMQ with HTTP support. MSMQ documentation says that we can change the Virtual directory if we want to by configuring MSMQ using IIS. The exact sentence is quoted below : "Destination queues for HTTP messages are opened using direct format names that include the URL address of the target computer, the virtual directory name, and the queue name separated by slashes. The default virtual directory name is msmq, but Message Queuing can be configured by IIS to use a different virtual directory. " Now there are 2 parts in my Question... 1) How do you configure MSMQ using IIS to use a different Virtual Directory 2) how to use "System.Messaging" namespace of .NET framework to send a message over HTTP using different virtual directory name (the problem is if you specify anything other than "msmq" in the URL the MessageQueueException is thrown with Invalid Format Name as the error text) E.G. : DIRECT=HTTP://localhost/msmq1/private$/MyQueue where msmq1 is the new virtual directory configured for MSMQ Hope my Question is clear enough... hoping for a positive reply... regards, Aryadip. Cheers !! and have a Funky day !!

    C# help csharp dotnet windows-admin data-structures

  • Registering File Types
    A Aryadip

    Hi, I guess you are asking how to register a new file type during setup of an application. What I know is if you are making a deployment package for your project then you can do customization on registering new file types with extension and even define custom action on the same. To do that, in your setup and deployment project use the "File Types Editor" which is the 3rd ICON on the top bar of solution Explorer window. For more information on how to go about it in the editor please refer to the following URL : Setup and Deployment Customization Hope itz useful... regards, Aryadip. Cheers !! and have a Funky day !!

    .NET (Core and Framework) csharp question

  • How do I create a shortcut on the startup menu for a visual c++ .net app?
    A Aryadip

    Yeh, Tom is quite right... after creating the folder , on the right hand panel right click and select "Create Shortcut". Gave a name to the shortcut and set itz properties e.g. "WorkingFolder" and "Target". In target set the exe name. In working folder navigate to the "Application folder" and set it. For placing an Shortcut on the desktop the same needs to be done under the "Users Desktop" node. Note : Right click on the "File System on Target Machine" select "Add Special Folder" and you will find more idea about where all you can place files or shortcuts during setup or do more customization. regards, Aryadip. Cheers !! and have a Funky day !!

    .NET (Core and Framework) c++ question csharp css workspace

  • textbox control with multi colored rows
    A Aryadip

    hi, The code below demonstrates one possible way of doing what you have requested... Label l1 = new Label(); l1.Text = "Hi there"; l1.Width = richTextBox1.Width; l1.Location = new Point(0,0); l1.BackColor = Color.AliceBlue; Label l2 = new Label(); l2.Width = richTextBox1.Width; l2.Location = new Point(0,l1.Bottom); l2.Text = "Howz life"; l2.BackColor = Color.Beige ; richTextBox1.Controls.Add(l1); richTextBox1.Controls.Add(l2); hope this helps you or atleast gives you an idea... this has what occured to me... regards, Aryadip. Cheers !! and have a Funky day !!

    C# help

  • Converting an array list to double array
    A Aryadip

    hi, your question is not clear. I don't understand what exactly do you want... Well here are the 2 possibilities that I can think of... 1st Possiblity : If you require a specific Array of type object from the arraylist then you may use a similar code as below string[] s = new string[10]; s[0] = "Aryadip"; ArrayList al = new ArrayList(); al.Add(s); string[] ss = (string[])al[0]; MessageBox.Show( ss[0] ); 2nd Possibility : You require the full arraylist content in an array...in other words the array representation of the arraylist. Now the complexity is the arraylist elements are arrays Then the resulting array will be double dimentional... The code to retrieve the same is : string[] s = new string[10]; s[0] = "Aryadip"; ArrayList al = new ArrayList(); al.Add(s); string[][] ss = (string[][])al.ToArray(s.GetType()); MessageBox.Show( ss[0][0] ); Now tips for your code : DataReader is returning you an object array. After adding that object array to arraylist(like you did) you can get them back by using one of the methods mentioned above(replace string with object). In the Individual object arrays that you add to the arraylist... if all the values are of type double then you can safely typecast with double array. In case you are not sure or the object array contains values from different datatype then first obtain the object array by using one of the above methods and then use "Convert.ToDouble()" method to convert the specific array element to double value.Please refer to code below to get a better understanding... object[] s = new object[10]; s[0] = "Aryadip"; ArrayList al = new ArrayList(); al.Add(s); string[][] ss = (string[][])al.ToArray(new string[10].GetType()); MessageBox.Show( ss[0][0] ); Hope this helps you... if I have gone into wrong track... then sorry for that... regards, Aryadip. Cheers !! and have a Funky day !!

    C# question data-structures

  • How to build my own database?
    A Aryadip

    hi, You can build your own database using datset object. Create a table and clolumns as you require and then populate the dataset as and when required with the necessary data. You can persist the dataset as an XML file and reinitialize it by reading from XML file. In dataset it is possible to run a "select" query and retrieve the data like anyother databases. If your database is simple name-value collection then you might think of using or extending HashTable class... Hope this answers your query. regards, Aryadip. Cheers !! and have a Funky day !!

    C# database tutorial question

  • How to Access Dynamicaly created controls
    A Aryadip

    Hi Naresh, Checkout your previous request... I have been late but have answered your query to the best of my knowledge... regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET csharp asp-net design tutorial question

  • How to access dynamically created controls
    A Aryadip

    Hey Naresh, Sorry for the late reply... had a chance to see ur query in my mail box today... Well... your code won't work in the postback situation simply because during postback you are restricting the creation of the page controls by the "if(this.PostBack)" condition. In simple language if I try to write your code... then it means...: If a postback happens then just initialize the variables and if the postback has not occured then call "SetPage" method. Now this statement simply demonstrates that SetPage won't be called when a postback is happening...right??? So to access the controls of the page after the postback you need to call the SetPage Method like below (I'm copy-pasting a snippet from your code... check out the comments for my modifications...itz the Page_Load delegate function) private void Page_Load(object sender, System.EventArgs e) { if(this.IsPostBack == true) { tot1 = (int.Parse(Request["dpersonsid"])); tot0 = (int.Parse(Request["dpid"])); if(tot1 <= 1) { tot2=int.Parse(Request["rent1"].ToString()) ; } else {//tot2 = int.Parse (areader["CoupleRent"].ToString()) ; tot2=int.Parse(Request["rent2"].ToString()) ; } int tot3 = (tot0)*(tot2); this.total.Text ="" ;// tot3.ToString(); TextBox1.Text = tot3.ToString(); setPage(); //<------ I have changed here ...aryadip } else { setPage(); } } Remember a basic funda... whenever you are handling a server side code... the page is re-processed and resent to the client browser for display... and thatz the reason why you need to readd the controls on the page during postback... in otherwords during postback Page_Load is first called andd then your event delegate. Hope this solves your problem... and at the same time I'm clear on the point... and hope I'm not too late... regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET csharp asp-net tutorial

  • Design Time Run time
    A Aryadip

    hi, Your question is not at all clear... can you be clear in your requirement... Well... herez my guess... you have 6 textbox on your web form which you have added at design time... Now at run time you want the objects of these textboxes in an array... if it is so... then all you need to do is : ArrayList txtArray = new ArrayList(); txtArray.Add(txt0); txtArray.Add(txt1); . . . txtArray.Add(txt5); TextBox[] textColtn = (TextBox[])txtArray.ToArray(new TextBox().GetType()); Hope I have solved your problem... regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET design question com data-structures help

  • display user name
    A Aryadip

    hi, As I have told you earlier, the code won't work if you have given your site anonymous access. Your site needs authentication mode as "Windows Authentication". To Enable it... Open IIS console... Navigate to the Virtual folder of your application. Right click on the virtual folder and select "properties" Go to "Directory Security" Tab Click on "Edit" of "anonymous asccess and authentication control" section. You will get "Authentication Methods" window. The top most authentication method is " Anonymous" and the buttom most is "Windows Authentication". All you need to do is UNCHECK anonymous and CHECK "Windows Authentication" and restart your application.. I mean make a fresh request from a new instance of browser... I guess this time you will get it right... regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET help

  • display user name
    A Aryadip

    Hi, You can use "this.User.Identity.Name" to get the name of the Windows User making the request for the page. This will return the username as [Domain or Machine name]\UserName If you now want to remove the domain or machine name then you need to do some string manipulation. Note : This property won't work when you are running the site with authentication mode as anonymous. regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET help

  • comparing dates
    A Aryadip

    hi, Checkout the following link to get the javascript function for comparing dates...In the site you will also find a demonstration of the code online. Click here Hope this helps... Regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET csharp javascript asp-net help

  • need experts help
    A Aryadip

    Hi, In C# you can use WinInet.dll directly by using DllImport command. C# gives you facility to use any Win32 dll in itz code. The code for using winInet.dll is : This code is used for declaring the method : [DllImport("wininet.dll", CharSet = CharSet.Auto)] public static extern bool InternetGetConnectedState(ref uint ulFlags, uint ulReserved); Well I nedd to find out about broadcasting of IPs... will let you know shortly... regards, Aryadip. Cheers !! and have a Funky day !!

    ASP.NET help question

  • Linking of 2 to 3 WebForms
    A Aryadip

    hi, Ur Q : How to Call WebForm using DropDownList? Ans : If I have understood your query... then the answer is you need to handle "SelectedIndexChanged" event of the DropDownList. From the "sender" parameter you can get the selected Item. Based on the item selected you can redirect the page to a different web form using "Response.Redirect()" method. ur Q : How to Enable/Disable RadioButtonList in a certain senario: 1. You are in a current WebForm (Set As Start Page) default. 2. A certain RadioButtonList with (yes/no) choices will enable/disable a certain RadioButtonList in another WebForm that is part of the project. Ans : Well, this Q is bit unclear... r u planning to show the second page on the change of the radio button or r u planning to first select the radio button and then click a button say "Next" button to go to the next page??... Anyways... let me give you the hint of handling the senario... If you are planning to handle the Radio button click event... then you need to handle "SelectedIndexChanged" of RadioButtonList. On click you need to identify which radio button is clicked and either you append the value to the querystring or store it in a Session variable. And then redirect to the next page using "Response.Redirect()" method. In the Page_Load of the next page extract the value from querystring or Session variable and then with a simple if or switch enable or disable whatever control you want to using itz "Enabled" property... eg : RadioButton1.Enabled = false; Hope this solves your problem... regards, Aryadip. Cheers !! and have a Funky day !!

    C# help tutorial question

  • Regular Expressions
    A Aryadip

    hi, You may try out this site... It was a good collection of regular expressions... itz a library kinda stuff... I have found it very helpful... Regular Expression Library regards, Aryadip. Cheers !! and have a Funky day !!

    C# csharp regex

  • How can I effectively access the object collection of form1 to another form in WinApp Project?
    A Aryadip

    hi, no need to declare another object of the parent form... look at my previous code carefully... I have set the value of the second form textbox in the click event of childForm and then instead of closing the second form I have hidden it...has come back to the parent form and then accessed the second form value from the parent... Please go thru the code carefully to understand what I'm saying... read the Click events carefully... regards, Aryadip. Cheers !! and have a Funky day !!

    C# csharp question visual-studio

  • How can I effectively access the object collection of form1 to another form in WinApp Project?
    A Aryadip

    hi, look what you can do in this senario is : On the button click event (before showing the 2nd form)... Store the value of the textbox in a public variable... Pass the object the the parent class to the 2nd form thru constructor In the 2nd form use the parent form's object to access the public variable of the parent. Now to access the textbox of the 2nd form from the parent: declare a public variable in the 2nd form and set itz value with the text box value... In the parent form you already have the object of the send... bcoz you r showing the 2nd from the parent... So use the object to access the public variable of the 2nd form... for example: // the parent form class parent : Form { // public variable in parent form to hold the textbox value public string textVal = ""; ... ... // button click event delegate in parent form private void button_click(...) { // store the textbox value in the public variable textVal = textBox1.Text; // instantiate child form with parent object in the constructor childForm form2 = new childForm(this); // showing the child form as modal dialog form2.ShowDialog(); // after dialog is closed accessing the textbox value of the child form MessageBox.Show(form2.textValChild); // destroying the child form form2.Close(); } } // the child form class class childForm : Form { // public variable in the child form to store the textbox value of the child public string textValChild = ""; private Form objparent = null; // child form constructor with the parent form object public childForm(Form parent) { this.objparent = parent; } ... ... // in the button click event delegate private void Textbox2_Click(...) { // displaying the parent form textbox value MessageBox.Show(this.objparent.textVal); // storing the child form textbox value this.textValChild = TextBox2.Text; //hiding the child form... don't close otherwise itz object will be destroyed this.Hide(); } } Hope this helps you... regards, Aryadip. Cheers !! and have a Funky day !!

    C# csharp question visual-studio
  • Login

  • Don't have an account? Register

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