Answer Questions
dagjo Unable to see windows form in designer view
HI I have a windows application developed in VS2003 , now i need to migrate to VS2005. After successful conversion, My application is running fine as before. But i am unable to open any form in designer view. The error message I am getting is: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Hide at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at Microsoft.VisualStudio.Shell.Des ...Show All
Suren Reddy A DetailsView Control for Winforms?
Hello, I have gotten spoiled by the new DetailsView control for ASP.Net 2.0 which encapsulates all of the dirty work needed to switch between viewing, inserting, updating, and deleting for a databound object. Now that I am working on a Winforms application I'm trying to figure out the best practice for handling these rather common tasks. I dislike the look and feel of "in place" editing on the grid view control. Do you typically create seperate forms for inserting/updating/viewing Do you group these items into different panels or group boxes and then play the "hide the unused control" game Do you simply use the same form for these actions and simply disable the textbox (or other editing controls) for view m ...Show All
bslim Colour Control Lag Problems
I have a user control, which is mad up of 216 checkbox (button appearance) to represent each web safe colour. Each has a event to relay the fact it has been clicked so can change the colour of whatever. The problem is when the control is displayed there is a big lag / slow down effect in the application. I wouldnt have thought 216 buttons/ checkboxes is that many to display on a screen each with a listener. But it appears so. Any ideas on what this could be Am i cgoing to have to come up with another way The only other way i can think of would be to draw 216 rectangles separately and go down that route. Only problem is i cant see how i would be able to show a selected colour by depressing it. Is the route to take Thanks ...Show All
directSH Small accounting application Big headache (SAAB-H)
Hello, This is part of a small database EntryForm. 9 TextBoxes: 1,2,3,Sum1 (all decimal(6,1), -- V1, V2, V3, EA, VTotal (all smallmoney) , --- EA (smallmoney). Three calculations: Sum1=1+2+3, V1=EA*1, Vtotal=V1+V2+V3. The order of the TextBoxes is 1-EA-Value1, 2-Value2, 3-Value3, Sum1-ValueTotal. The Sum1 and ValueTotal should be always updated regardless in which field the user choose to start entering data. The reason for the If, Else or If ElseIf statements is to always have some values in the TextBoxes. Note: All the TextBoxes.Text was stripped away to see better (1 is 1TextBox.Text, etc) Questions: How to initialize the Form without Fill (it always brings up the first record -eve ...Show All
Sen_p_kumar Windows Form - Set form size
Hi , I am using VB 2005 Is there any way to set the size of the windows beyond the screen resolution. e.g 3000 x 3000 . I have tried to set it but it keeps changing back to the maximum size of the screen resolution. Thanks Okay, on the high-end PC the scrollbars won't show. On a normal PC, the form will still be usable. As long as you use AutoScroll. Hi Geert, Thanks for your reply . Can you show me how it is done as I have tried it me.width = 3000 me.height = 3000 Not working Hi, The reason I want to do this is becuase my other pc can set to 3000 x 3000 set of the form and because of the high end gra ...Show All
ryan.rogers I've a problem in reading the exact value of a checkboxcell in datagridview.
I'm using C# - 2005 After checking or unchecking any particular checkboxcell, I'm not getting the exact boolean value, instead, I'm getting the older value. What I observed is, I've to click on some other cell and then, I can read the exact boolean value of that cell. Plz. help me with this issue. Best Regards Trinadh P. This is normal/natural since when you are editing that cell, its in edit mode and won't "commit" changes until you move away from that cell. You would have to either use EndEdit or click on some other cell To use End Edit: this.theDataGridView.EndEdit(); this will end the editing mode of that cell and commit changes to that editing cell Thank you Ahmed :) Sim ...Show All
daytonboi DateTimePicker focus on the day part
I am building a form for rapid data entry with keyboard only. the second control is a DateTimePicker and as is it will focus on the month whenever the control gets the focus. I tryed to SendKey({Left}) in the Enter event, but it is not working right most of the time. Is there a way to make it first focus on the month part Hi, Register the LostFocus event as - private void NoKeyUpDateTimePicker_LostFocus(object sender, EventArgs e) { DateTimePickerFormat fmt; fmt = this.Format; if(fmt == DateTimePickerFormat.Short) this.Format = DateTimePickerFormat.Long; else this.Format = DateTimePickerFormat.Short; this.Format = fmt; } Hope this is what u want... After a while it turns out that whenever ...Show All
cdmsarathy Fliping a label control like apple(mac) date dashboards
I saw a date dashboard controler on a apple computer and want to create the same type of controller using .net for the windows. On Apple computer when you click on the Clock control it will filp the clock and allow you to enter different time zone and area. I am trying to create the same type of control. How can i flip a label control so that i can add button and text box to the label controls to ask some user inputs. Thanks in advance Hi, bestin It seems that you can do it with the panel. For example when user click the panel and a textbox displays, that can be implemented like this: panel1.controls.add(new textbox()) (in the click event of the p ...Show All
vish2007 sorting a sortedlist
Hi All, I have a problem in my windows application with C#.net. I have around 50 Id and Name pairs and need to sort them after putting into a SortedList. In my data, ID is not unique. SortedList< object key, object value> So I can't put ID in place of Key( Key must be unique in sortedlist). I have created a class with Id and Name variables, passing the object in place of value, and some integer index in place of key. Now the Question is, how to sort the SortedList on ID. Please me help out, Thanks. One of the constructors of the SortedList take a IComparer as an argument. You can use this to sort the list. Keep in mind if the icomparer returns a 0 you will get an error about adding a ...Show All
David Luu Datagridview::copy row including hidden column to another datagridview
I have SourceDGV whose Column1 I hide programmatically. How can I dragdrop copy SourceDGV's selectedrow including the hidden column to TargetDGV and keep that Column1 hidden on TargetDGV Thanks for any help ! Please can you show me some pseudo code to dragdrop selected row from SourceDGV to TargetDGV by setting the datasource Naga, Thanks very much for your reply. This code works great with on a button click but I'm having difficulty implementing it using drag drop from SourceDGV to TargetDGV. Assuming that my SourceDGV is set to fullrowselect and I am dragging/dropping 1 single row at a time, Could you show me some code to implement that ...Show All
tm9t9 Master/Sub Forms
Hello All, Does anyone know how to replicate the look and functionality of an MS Access Master/Sub Form By this I mean not to simply invoke two DataGridViews, but to have the master section displayed with textboxes and comboxes etc while the Sub-form is displayed as a DataGridView... Any ideas Cheers sfx1 Thanks for your reply, Remco. Actually, I found a great article in help that explains what I was trying to achieve... ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_fxmclictl/html/c5fa29e8-47f7-4691-829b-0e697a691f36.htm i assume you use a dataset make a relation in your dataset parenttable - > childtable bind your textboxes etc to the ...Show All
Mahesh Gaware Getting the MSI Package Path from a custom action
Hello, I need to add licensing functionality to a MSI Package. The package should be shipped together with a license file which will be evaluated by a custom action. The problem is that the current directory in the custom action seems to be the system32 folder. Does anybody have an idea how to access the folder where the MSI package actually is situated from the custom action Thanks in advance Gerald There is a walk-through that talks about how to use CustomActionData: http://msdn2.microsoft.com/en-us/library/9cdb5eda.aspx . For example, in your installer class's Install method you would have something like: MsgBox(Me.Context.Parameters.Item("source")) And the CustomActionData property i ...Show All
kennm Customer Name in Registry
I am using Visual Studio .Net 2003 Setup and Deployment Project I have a Standard Customer Screen in the User Interface Menu Can we save the Customer Information in Registry / .INI file TIA There's no real "guide" to all the public windows installer properties, those are dynamically created. We haven't written a doc for the ones the Visual Studio setup projects usually uses or creates. What you can do is run an installer with verbose logging, then view the properties used during the install. run: msiexec /i mysetup.msi /l*v mylog.txt Then, read mylog.txt and go to the end, the proerties and their values are listed. The ones Windows Installer always creates are documented at: http://msdn.microsoft.co ...Show All
VenkatB Overriding behaviour of control box buttons
Hi there, I have a dialog that I basically want to stay "open" all the time - though its visibility can be toggled through an option in the "Windows" menu of my main form. The problem I'm having is that clicking the X in the control box at the top right of the dialog causes it to be closed and disposed. Is there any way to override this behaviour I've tried overriding the OnClosing, OnClosed, OnFormClosing and OnFormClosed methods, but to no avail. I don't really want to hide the control box. Never mind, found the solution myself. Needed to set e.Cancel to true in the override for OnFormClosing :) ...Show All
Ravidhari String to Formula?
I have a formula saved as a string, e.g "180/2+15" How can I process this formula to find the result (105) I would use the Microsoft Script Control to perform the calculations. Here is an example . The following is based on the assumption that your formula is always the same. I'm not aware of anyway to convert a string representation of an operator to an actual operator. You need to manipulate the string with the string object's SubString and IndexOf methods and save each number in a separate string object. Once you do that.. you'd need to convert each one to an integer and store each in separate integers. Then add them. See: http://msdn2.microsoft.co ...Show All
