Answer Questions
MadMojo1 C# How to make a form click-thru-able (hard to explain in one line!)
Hi, I was considering making a cursor replacement application in C#. To do this i made a form with a PictureBox and a Timer. The Timer would synchronize the form's position to the cursor coordinates. The form was using a TransparencyKey and was TopMost. However, when I click anywhere, the form handles the mouse event, meaning that I can't do anything with the computer other than click on the cursor (not really that useful!!).... how can I make it so that clicks "go through" the form OR! Is there some way in C# of drawing images, etc. beyond the form's surface Thanks in advance! - Javawag I neglected mentioning that part, because it's kinda tricky.... To Handle it, we need a bit more infor ...Show All
Predator14567 auto repair problem
I created a project which include many files (about 3500). It seems works fine for a while after being installed. However, now there is a client report every time he tried to run the program from the desktop icon (or icon in program folder). The program tried to start the auto recover processes. I checked his installation folder, the executable files are same as before For further check, the desktop icon has a newer date Could that be the reason However, my local testing machine doesn't have the auto repaire problem even the icon has a newer date too So my question is: 1. What's possible reason for this 2. Does the icon get a newer date everytime it was run 3. In what cases other than file missing, the recover process ...Show All
Paul Hacker How to make verical scrollbar in gridview wider
Hi, I need to make vertical scrollbar in gridview and combobox wider because I am building a touch screen application. Any help or links will be appreciated. Could be for table PCs where you can have both standard win apps and proprietary app running. Hi, If what you're asking for is about ASP.net, then this forum is not the most appropriate one. If you what you're saying is about DataGridView, then there is no direct support for this modification. I'm afraid you have to subclass the datagridview. Fortunately, there is a protected property named 'VerticalScrollBar' which gives you more control over the scrollbar. Hope this helps. how exactly do you mean ...Show All
Bjørn Liene Gundersen request password before installatio process
Hello, I wrote some windows forms applications. I would like to include a password or key request before the application got installed onto the user's computer. any suggestion Hi don, Quick question... what deployment model are you targeting Are you using a VS installation package Installsheild ClickOnce Thanks! Well there is a Customer Information dialog you cvan add to the UI sequence, a canned dialog that lets the user put in a serial number. Unfortuanately there's no way to verify it in the UI sequence with code - you'd verify it with a custom action, but these run when the installation is just about finished. The PIDKEY property is where it's stored. I am using windows installer ...Show All
suds143 Drawing on[/underneath!] Controls
Is it possible to draw a line as shown in the pic on a single form The line in the image is drawn on a second form which is transparent so form1 is visible. So why does my line control cover the listbox class Line : Control { Pen _Pen; Line() { this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.BackColor = Color.Transparent; } public void SetBounds(int Width) { _Pen = new Pen(new SolidBrush(Color.Red)); _Pen.Width = Width; this.Location = new Point(0, 0); this.Height = Form1.ClientRectangle.Height; this.Width = Form1.ClientRectangle.Width ...Show All
Ganeshkumar S Databinding question
I have a table that is a child of a parent table. Meaning the child table has a column containing the ID of the parent. I'd like to know if its possible via bindingSource to be able to get information of the parent via the ID in the child table without programming anything. I know that a parent-child is possible via bindingsource pointing on the relation. but i'd like to do the reverse. getting information of the parent with an ID present in the child table. Thanks, anyone i was wondering if it could be done without coding. Only using the designer with bindingsource. Like when you have a parent-child relation. you can use the bindingsource to point on the relation i ...Show All
Bilal Haidar - MVP throwing exception in gui thread from worker threads
Hi all, I have an application which has one or more worker threads... The worker threads might throw exceptions which I want to catch in the gui thread. At first, I've tried launching the exception from the GUI thread, but even that didn't work properly (because of the message pump, the application was crashing before I could catch it, see http://support.microsoft.com/default.aspx/kb/324653/en-us). I solved it by setting up a handler for Application.ThreadException and inside, I just re-throw it (so it runs through the call stack, passing the ShowDialog calls). This works well, if I'm only on the GUI thread. However, the exceptions might occur mainly on the worker threads. So I did another test: in Main, just before Application.Run, I star ...Show All
abyuwe Dataview row Filter issue
When we use something like this to filter the dataview we get some error.....what could be the reason... filter=" [FieldName] LIKE 'adfasdfsd*asdfasdfasd%' "; dataview.RowFilter= filter; Could anyone explain the reason why * char is treat in special manner...... it act as a wild character if we simply do filter=" [FieldName] LIKE '*%' "; dataview.RowFilter= filter; it doesnot display entry starting from * , rather it display all the data without any filter applied. Eagerly waiting for the reason..... Thanks in advance... Ok got that * meaning.......... however why is it displaying a pattern invalid error and is there any method so that i can make search for those string that contains * characte ...Show All
Mark See Datagridview and checkbox
Hi all. I have bound a datatable to a datagrid. One of the columns is named "Select" and is a boolean. When i bound this to the grid it is displaying a CheckBox. Nice :-) But if i try to build the datagrid before it is bound to the datatable the column "Select" is not displayed as a CheckBox. Why What do i have to do to get the "Select" displayed as a CheckBox */Code when datagrid is buildt */ column = this .dgvContrprodProduct.Columns.Add( "Select" , "Select" ); this .dgvContrprodProduct.Columns[column].DataPropertyName = "Select" ; this .dgvContrprodProduct.Columns[column].ValueType = typeof ( DataGridViewCheckBoxColumn ); this .dgvContrprodProduct.Columns[col ...Show All
boran_blok_edan Delete menustrip item
How can I delete a particulat item from main MenuStrip. I would like to restrict access to particular area's application, doing that base on menu items available base on user's level. thanks in advance for your help, Edward Deleting a item from a MenuStrip requires you knowing which item it is that you want to nuke and can be as easy as: menuStrip1.Items.Remove( this .toolStripMenuItem1); Does this put you on the right path Another thing you might consider is just disabling that item: toolStripMenuItem2.Enabled = false ; I think you can also set the Available property to remove the item from the list without having to remove it from the Items collection as in: myMenuItem.Avai ...Show All
RichCa AcceptButton problem
I have a dialog window with some buttons. Button2 is my CancelButton and have the DialogResult set to Cancel. Button1 is my AcceptButton but I have set the DialogResult to None because I don't want this button to close the form. I only want it to be affected every time I hit the ENTER or RETURN key. When I click another button on the form and after that hit the ENTER key, the AcceptButton is not affected. How do I get it to allways be affected when I hit the ENTER key I read something about using eventhandlers for keyUp events for other buttons to "guide" the keystroke back to button1_click event handler. Do I have to make keyup eventhandler for every other button on the form to make ENTER key allways affect button1 or ...Show All
Sunny Jung Getting a value from a control at another form
Hi My problem: lets suppose that we have a form called Form1 and has a textbox control called textBox1 and another form called Form2 that has a label control called Label1 and I want to set the content of Label1 with the same content of the textBox1 in Form1 what is the suitable code for such a purpose. Thanks Thank you very much for your effort it works now in VB6 it was more easier it was, but this maybe be because .net is full OOP and more powerful thanx any way Hi, create a property in Form1 that allows you to get the textbox value i.e. class Form1 : Form { private TextBox textBox1; public string CurrentText { ...Show All
Senthil.P Bind label to property of collection using BindingSource
I have a form that has a BindingSource which is a list of expenses. It's a custom class and has a property called Total, which loops through all the items and adds up all the costs. I can't seem to bind this property to a label I have in the form. Is there any way to do this ...Show All
Candela Docking Forms in a App
Hi, I'm starting an App using C# + Windows Forms .NET. I decide build a GUI with docking forms like VS .NET use. I found docs/info about how to face this kind of Apps, but i'm not sure what's the proper way to develop this kinds of App. I hope your comments/suggestions/tips... all are wellcome ^_^. Thanks !!! Your info was useful. Thanks Both. :-D You can use an old project of mine from a few years ago called the 'Magic Library', it's a free set of controls that includes a docking system. It includes the full source code and examples and is free for use even in commercial applications. You can download it from here... http://www.dotnetmagic.com/downloads/MagicInstall1 ...Show All
Hipolito Lopez InvalidOperationException on BindingSource.AddNew
I am trying to handle the Enter key in a datagridview. Everything works fine until I try to call AddNew on the BindingSource to add a new record and then I get an InvalidOperationException with the message "Operation is not valid due to the current state of the object.". I am new to databinding and I am not sure what the error means. Thanks for your help using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Form1 : Form { Grid grid; BindingList<Dummy> bindingList = new BindingList<Dummy>(); BindingSource bindingSource = new BindingSource(); ...Show All
