controls

How do you create multiple versions of an ActiveX control?

Hopefully this is a straightforward question, but googling has proved fruitless (and frustrating, to say the least). Links to good documentation would be greatly appreciated. Here's the problem. We have a web application with an associated ActiveX control. (The control wraps a crufty old MFC application if it matters.) Moving forwar...

WinForm's CheckBox CheckedChanged vs. CheckStateChanged

WinForm CheckBox control implements both CheckedChanged and CheckStateChanged events. As far as I can tell both fire when the checked status of the checkbox is changed. CheckedChanged precedes CheckStateChanged, but other than that I see no difference. Am I missing something? Should one be preferred over another? ...

Creating controls in ASP with dynamic IDs

Hi, I'm creating a chat widget that will be dropped into CommunityServer. The widget works great, but I just discovered that if I drop two of these widgets onto the same page, only one of them works! And I'm quite certain the reason is because the chat window is defined in ASP, and now there are two instances of the chat window, with t...

.Net generate dropdowns that affect other dropdowns

Anyone know if the following is possible in .Net, I've commented on how difficult I would consider each element to do. An online shop that allows users to dynamically add products (easy) Within each product they can create options - dropdowns (relatively easy) These dynamically generated dropdowns can affect the product price (difficu...

Hiding all panels on a web content form within a master page

I'm trying to hide all panels on a page, when a button click occurs. This is on a web content form, within a master page. The contentplageholder is named: MainContent So I have: foreach (Control c in Page.Form.FindControl("MainContent").Controls) { if (c is Panel) { c.Visible = false; } } This never find any panels....

.NET Controls: Why aren't all calls thread-safe?

After exploding with excitement over learning about how to make thread-safe calls to Windows Form Controls, it got me thinking... Why aren't all calls to Windows Form Controls thread-safe? Can anyone explain why? I would think it would reduce a lot of confusion for users of those controls. ...

Controls resize based on screen resolution

I have panel control. More controls are in panel.I set the dock property for panel as 'fill' .The panel are resized based on screen resolution. but the controls remains same.The controls in the panel are not resized based on screen solution. i have more labels and panels and text-boxs and button in the same page. How to set the dock...

Dragging Controls on Form at runtime

Hi All I've just started using WPF. But I'm trying to add my code that (from Winforms) enables the user to drag any control whereever they wish at runtime. But I can't seem to get the current Location of the mouse... Eh? There is no Location for Mouse? :( ...

Panel in Windows Forms Application not clearing

I'm working on my project: [Beer Pong Management System][1], a Windows Forms application. I am currently trying to add a whole tournament mode to it. In a nutshell, I've created a TabControl, with the first tab page with the settings and setup and the second page the brackets. There is a feature for each of the match-ups, that once ther...

Programmatically Add Controls to WPF Form

I am trying to add controls to a UserControl dynamically (programatically). I get a generic List of objects from my Business Layer (retrieved from the database), and for each object, I want to add a Label, and a TextBox to the WPF UserControl and set the Position and widths to make look nice, and hopefully take advantage of the WPF Vali...

COMException in System.WIndows.Forms.dll with Interactive Brokers TWS API

Hi, I've been trying to run the sample project provided with the tutorial at stockbotprogramming http://www.stockbotprogramming.com/sharpcibtutorial1.php , but I keep getting a COMException every time I run the application. I have the TWS Client running and the sample VB projects provided with the API are able to connect just fine, but ...

Wpf template gallery

Hi! Does anybody know of a gallery of controltemplates, that I could use to learn more about what is possible with the different control types? ...

foreach Control ctrl in SomePanel.Controls does not get all controls

Hello, I have a panel with a bunch of labeles and textboxes inside of it. The code: foreach (Control ctrl in this.pnlSolutions.Controls) Seems to only be finding html table inside the panel and 2 liternals. But it does not get the textboxes that are in the html table. Is there a simple way to get all the controls inside of a panel re...

Find the focused control in a form (in .netCF)

I have a form that I want to know which control on it has focus. How can I do this? Best solution I have seen has me iterating all the controls on the screen. While doable, it seems like a lot of work just to know which control has the focus. ...

The ribbon control of Delphi 2010 has footer content in the application menu?

I'd like to put some buttons in the footer content like the image below. Is there a way to do this? ...

Detect changes to user input controls in Silverlight?

I have a childwindow with a number of Textboxes, Comboboxes, and DatePickers. I want to know if a user has changed any value in these (to know if I need to save to db) One way I could think of doing this are in the 'on chg' event handlers and set bool. But if a user changes the value, in say a combobox, then changes back to the origin...

Easy way to use Images in WPF

Hi All I've only just started using WPF. (I'm a WinForms guy), and from what I can see, trying to simply drag an image onto the Window is a huge PAIN. There seems to be no way where you can just select an option to tell it what picture to put indide the image control. I've seen so many sites within the last 10 minutes with atleast 10lin...

[winapi] Three questions about editbox ?

Hello! I have three questions about editbox control in WINAPI (i can't find information on msdn about this) 1. How to disable moving typeing cursor with mouse, arrows, backspace in editbox ? I want to make typing like in command line in dos, but with out backspace. Can I write some piece of text with red color, and another with blue ? ...

C# this.Controls.Remove problem

What is the problem with this code? for (int w = 0; w < this.Controls.Count; w++) { if (this.Controls[w] is TransparentLabel) { la = (TransparentLabel)this.Controls[w]; if (la.Name != "label1") { la.Visible = false; la.Click -= new System.EventHandler(Clicked); this.Con...

Iterating through controls on a Windows Form

I seem to have some weird issue going on that I am sure will turn out to be a simple thing. I have a Windows Form and on the form I have 1 panel called MainPanel and inside MainPanel, I got another panel with a button inside and a label that is inside MainPanel, but not in the second panel. 2 controls. What I am trying to do is copy all ...