I have windows application in C#.Net2010.. i have added griview with some Comobobox and CheckBox columns.. I have set some rows Readonly in GridView for some data related issue.. now when event user select some value from combobox column and press enter and if next row is readonly i want to set ...
I want to have a custom CheckBox in C# that has a gradiant backgronud on it. I overrided OnPaint(PaintEventArgs e) as below: Graphics g = e.Graphics; base.OnPaint(e); //// Fill the background ...
I have a few different methods which connect to a remote host, send a message, get a reply, and use the information. this has worked fine until i use two methods in the same instance of my connection class. in the example where i'm getting the error, i run the ...
I am trying to get Information of the selected ContactItem in Outlook 2010. Such data as: "Name, CompanyName, Adress" etc. pp. I need this Information to be loaded into my WinForm and be shown as TEXT in a couple of Labels on the Form. The Wordprocess is as follows: Right Click ...
I'm programming IDE/interpreter/debugger for various esoteric languages. I would like to be able to bold one character at a time, in varying places (depending on code flow), for the debugger. I'm using WinForms for that. So in short, I would need to be able to bold one character of the ...
I am using threading in my code , thread are created using function: private void InitializeBackgoundWorkers() { for (int f = 0; f < maxThreads; f++) { listBox1.Items.Insert(0, "Starting Thread : " + (f + 1)); ...
Is there a way to cache the results of a MySQL query, specifically a data-reader? I have some mundane queries that really only need to be performed once when the application is loaded, then each form can use the cache values instead of querying the remote server. At present my method is ...
One year after a similare question has been posted on SO. Generic Windows Form Template Do you know if there're a better way to make a windows form generic, here's what I'd like to do: public partial class EntryPointEditForm<T> : Form where T : ICriteriaObject<T> {} But an error is thrown telling me ...
I wrote a code that whenever the user picks a value from the drop-down comboBox, their choice becomes the first item (index 0) of the collection. Example BEFORE [_ MyComboBox _][v] |Dog |Tree |House ...
I have an application that holds an image in a picture box. When you press ctrl+C it copies the image to clipboard. I use a thread to perform the actual clipboard operations. protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.C)) ...
In the picture above, there is a line for y = 0 (marking the x-axis). There is none for x = 0 (marking the y-axis). How do I get one to appear at x = 0? I've tried... MyZedGraphObject.ZedGraphControl.GraphPane.YAxis.IsVisible = true; MyZedGraphObject.ZedGraphControl.GraphPane.YAxis.Scale.IsVisible = true; Neither seem ...
I have a third party ActiveX control that I am embedding in a form. The control's class implements IDisposable. My question is should I manually call the control's dispose method either in the form closing event or go into the designer and edit the form dispose method to call the ...
How can i write a program that reflects a text that is in a text box to a data grid? Ex: You write something in a textbox (textBoxURL.Text) and it automatically reflects the text to a datagrid (row.URL). Here is a piece of my code: DsVersions.ASSEMBLY2Row row = dsVersions.ASSEMBLY2.NewASSEMBLY2Row(); row.URL = textBoxURL.Text; If any ...
I have been tasked with changing the text of a button in a window. I don't have and cannot access the source code as it's owned by a company we have a paid subscription with. How can I change the button text with no source code? I'm ...
I need to ask input from another form that is open all the time. I have handlers for the inputchanges but I would need to stop method during it. Closing the first form would not be ideal. ...
What i have now: my app in C# is half-transparent, and does not catch winapi events - every click, drag etc is catch by underlaying window, which is separate app (like webbrower). I use this to overlay information on top of what browser shows. This is my code for ...
PrinterSettings.FromPage = 1; PrinterSettings.ToPage =2; Whenever i send any range for ToPage as 2, when i check it always has its ToPage to 99, any thought? PrintDialog PrintDialog1 = new PrintDialog(); PrintDialog1.AllowSomePages = true; PrinterSettings.FromPage = 1; PrinterSettings.ToPage =2; also when i debug, i see ?PageSettings.PrinterSettings.PrintRange SomePages {2} instead of AllPages, so the printrange is setting the property for ...
I'm working on a winform application which creates directories and copies files to the user's local machine at runtime. My question is: Can my application create and copy files to the user's local machine even if he doesn't have administrative privileges? If not, how can I do that? Thanks EDIT: I'm asking ...