control

ASP.NET server control property issue(?)

I am working on some ASP.NET Server Control, and I have an issue. Maybe I oversee something, I don't know. Anyway: public string Name { get { String s = (String)ViewState["name"]; return ((s == null) ? String.Empty : s); } set { ViewState["name"] = value; } } protected override void R...

Multiple Modes for a Form or Control in a .NET Application?

Are there any opinions on whether or not it is bad design to reuse a Form or Control in a WinForms .NET application by giving it multiple modes? I often find myself wanting to do this. I'll have some UI that needs to be used in multiple places and instead of reusing the code, I'll give the form a mode that determines things like what tex...

Library or Code Snippet for AutoComplete in Text Control based on the previous user entered values

I'm looking for a library for Autocomplete support in text controls which remembers all previous entries of the user and provide auto-complete support for it. For example for "recent files" I use http://www.genghisgroup.com/ and it works great. Do you know something like that for this purpose? UPDATE : This is a .NET Winforms applicati...

How can I automate Winforms in .NET?

I want to get the ControlName of .NET properties in VB6 code, just like described in this article. But unfortunately, it doesn't work for me. I always got 0 for bufferMem. bufferMem = VirtualAllocEx(processHandle, 0, size, MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE) If bufferMem = 0 Then Error Err, "V...

Databinding a Custom Control

I have a Custom Control (Windows Form) that is a lookup text box. A property on the Control is Current Selection which is a Custom Object containing "Identifier", "Code" and "Description". This property is Databound using a BindingSource. Displaying the information works great. On the other hand regardless of whether I set the Update to...

Running Activex control and Maintaining security

Hi Techies, In my a web application, I have a part to invoke an activex control .The Activex control is available in all the client PCs who are accessing my web application from web server. But When trying to run this ActiveX control from the browser in client machine (using Wshell), It was not getting invoked since "Run Activex Control...

How can I get asp.net controls to generate W3c compliant html?

I recently ran some of my ASP pages through "HTML Tidy" validation and found that several warnings were generated due to HTML tags not being properly formed i.e. extra closing tags.On investigation it seems that the ASP Menu control which i am using as the left navigation bar is generating this invalid HTML. It seems that the HTML for th...

Why all text boxes won't select?

I have a form with a Tab Control that has 18 pages. When I click on a tab it opens the page and select a textbox on that page (txtTextbox1.Select()). This works for the first 8 pages but not for the remaining 10 pages. Although on these pages I can mouse click on the textbox, enter info, save then click my Add button that clears the text...

Control property not found in WPF, but present in VB.net WindowsForms

Guys, WPF project is not accepting this property definition when starting a thread. Anybody knows the equivalent of the following in WPF? Control.CheckForIllegalCrossThreadCalls = False Thanks in advance! ...

Scrollbar still is painted after it should be removed

I have the following custom control and can place on a form (with AutoScroll set to true and the control anchored left, top and right). If the form is too short for the control, the form correctly resizes the control (to make room for the scroll) and displays the scroll bar. When the control is closed using the close glyph, the control...

ASP.NET control does not render

I have an extremely simple control i'm trying to render which looks like this: using System; using System.Web; using System.Web.UI; namespace CORE.BusinessObjects.Web.Controls { public class TestControl : Control { protected override void Render(HtmlTextWriter writer) { writer.Write("Hello from TestC...

Calling my own event code and custom event code in c#

I have made a winforms application and in it i've implemented a custom richtextbox control. Now i'm refering it as a windows control (a dll file)in my project. In my program for the richtextbox i've written functionality inside it's textchanged event. Now i want to do some additional work which can happen only after the textchanged event...

ViewState and dynamicly removed controls

A ASP.NET page's ViewState seems to have troubles keeping up with dynamicly removed controls and the values in them. Let's take the following code as an example: ASPX: <form id="form1" runat="server"> <div> <asp:Panel runat="server" ID="controls" /> </div> </form> CS: protected void Page_Init(object sender, EventArgs e) { B...

A Scheduler framework for Audit - Balance and Control of the software processes

Hi all, I am looking for a scheduler framework which can provide the following functionality - 1. Audit of the processes - start time, end time and throughput of the process 2. Balance - if necessary schedule jobs according to the load 3. Control - when to run a job? like cron of Unix, helps us to schedule processes at the specified tim...

controlling execution of another process through c#

i have written a c program to which i pass in a script like code and it executes it and prints the results for me. some thing like if i send for i in 1 to 10 print i it'd create and run code which would essentially print values from 1 to 10. however i wanted to integrate step wise running of the code for which i added a functionality ...

ASP.NET: Everything on a page, or break into controls?

When you're making a page that is visually broken down into specific regions, do you break those regions down into controls, or do you put everything on the page and in one code-behind? If regions are separated into controls, how do you facilitate communication among the controls? By communication I mean simply exchanging data on the s...

Outlook navigation bar control for .NET application

Is there is an open source or free control like the Outlook Navigation control? I want to add one to my .NET application. Update1: I am not using WPF. I need control for windows form only and i am using .NET Framework 2.0 ...

ASP.Net FileUpload Control with Regex Validator postback problem

I'm trying to use a .Net FileUpload control along with a Regex Validator to limit filename to JPG, GIF, or PNG extensions. After postback, the filename is gone from the control (as expected), but this seems to cause the validator to fire and display its error text. Can anyone suggest a fix, or a better way? Thank you! ...

How do I find out which control has focus in .Net Winforms?

How do I find out which control has focus in winforms? ...

.Net Winforms Tell if Exit button was pressed

I'm using some controls that trap validation when anything happens--including when users press the exit button. Is there a way to tell if the exit button was pressed? ...