Answer Questions
Jon Abbott Recovering Designer Info after Hard Drive Problem
I was working on a project with 7 forms when I had a hard drive problem. I was able to recover most of the source files, but when I try to open the forms in the Designer, I get the message "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" "Either VCProject or VCCodeModel is not ready yet. Please close designer and try again." This error does not show up in other projects that were not affected by the crash. Is there any way to recover the information that Designer needs to show the Forms short of recreating them Thanks. I figured it out! For th ...Show All
Dhaval Patel .net 2.0 programmatically add a row in datagridview
Hello, I display all the data in a datagridview programmatically. The grid is non editable. When I click on a ADD button, it will dynamically add a ROW. The question is that : - how can I move the current record pointer to the new added row - how can I allow the new row for editing but other can't Please give me a hand and very thanks. Best regards, Eric Hi, Thanks for your answer but it not solve my problems: "this.theDataGridView.Rows[this.theDataGridView.Rows.Count].Selected = true" It only select and highlight the row but the ROW header pointer still keep at the previous row. If I click at the new row the pointer will move there. "this.theDa ...Show All
mfroster Check if theres update by HTML or other
Sorry but i didnt new what topic titaly to type ..so no kill me plx :P alright i need some idea or example that i can cehck if there are new updates and if app is out of date like..... maybe there is some HTML parameter that the app can check if its not same it'll say new update ... or some other way...is there such thing thx ahead html is just a webpage stream, its "meaningless" in a sense. you could connect to the FTP Site and see for the latest application version either by reading a textfile or seeing if there is an updated app there that exists when you can download. I believe ClickOnce is what you maybe after but im not sure. If you are using ClickOnce, you can configure the appli ...Show All
Ed Hintz Using URLEncode in a Windows Form
Hello Everyone and thanks for your help in advance. I am writing a screen scraping application using a windows form. I need to process the __ViewState in order to get it to work properly and it looks like it needs to be URL encoded. However, I cannot seem to access the URLEncode method from the Windows form. I have imported System.Web into the project and I have also tried things like System.Web.HttpUtility.UrlEncode but I receive the erro message that HttpUtility is not a member of System.Web. Indeed, intellisense does not give me that as an option, but I can figure out why. Any help on this would be greatly appreciated. Hi, System.Web should do fine. Did you add the reference to System.Web.Dl ...Show All
spar108r WaitCursor and the TextBox
Hi, I have a WinForm application built in VS.NET 2003. The user enters the data on the form and clicks the Submit button to do some processing and the results are displayed in a multiline textbox. I am setting the form Cursor to Cursors.WaitCursor when the user clicks the button and then back to Cursors.Default when the processing is done. While processing, whenever I hover my mouse on the multiline textbox, it is not showing the HourGlass but it is showing on the other areas of the form. How do I make the HourGlass appear on the textbox also Do I have to set it for all the textboxes manually and then back to default after processing Any help is appreciated! Thanks Basani Basani wrote ...Show All
Mongsreturn Textbox as Label
Which Properties do I have to set how, to use a TextBox as Label I want to just display data, the user must not change it. When I use a TextBox and .Enabled = false. The appearance will change and the Field aren't that readalbe because to forecolor and the backcolor change to a very similar color. If i use "ReadOnly" = true, the user may focus the TextBox - but i don't want to and CanFocus is just a getter If i use a Label instead of Textbox, the border-color is different to the TextBox. So I want I TextBox, not focusable, with Black Fore-Color (ControlText) and Gray Background. I didn't find a solution for this. Plz Help! Hello All. tkrasinger: Have you tried setti ...Show All
graymon Order of event
What is the order of event after the valuechanged in a combo box or datetime picker in the valuechanged event , i wanted to check if the input in valid or not if not, i will assign the value to the default but it happens in this valuechange and it will have infinite looping. regards Alu Try something like this: private bool mUpdating = false; private void comboBox1_ValueMemberChanged(object sender, EventArgs e) { if (mUpdating) return; try { mUpdating = true; // Restore default if necessary... } finally { mUpdating = false; } } You should not rely on the order of events unless the events are specified as occurring in a specific order (such as BeginSomething, EndSomething). The order ...Show All
Deuce BOI How do I get the number of lines in a text file without already knowing how many there are or its contents?
Visual C# 2005 The topic title is pretty self explanatory. I want to create a method that will read a text file and return the number of lines in the text file. I need a method that can be implemented in plain code and inside its own function. I am combining this with another method I have to get a list of commands, which should be easier than using a dictionary array/collection. Any help is appreciated. Thanks. If its a standard text file, a brute force but easy way would be to use a StreamReader and the ReadLine method and count Copied (then modified) from VS2003 help: (should be same in 2005 I would think) int lineCount; using (StreamReader sr = new StreamReader("TestFile.txt")) { String ...Show All
doener Loop capture image and generic error occured in GDI+
I've application to capture video of image and grab the still image. It runs well untill I put loop to regrab the still images many times automatically.. and the error (generic error occured GDI+) happend. For your information, I also run different code of application that have similar function which to capture the image repeatedly that I found from internet. However, it give the same error message. I think maybe I've to setup something in the configuration but I still blur about it. I'm using C# Express edition. Could anybody help me please... Hi GavH, Thanks alot.. Finally, the program can loop. However I not use timer for delay as u suggest. I was use sleep. And it works. However there are two major problem comes ...Show All
a n d r e w DataGridView: Multiple column headers
Hello - Does anybody if it is possible to add multiple column headers to a datagridview For Example: _________________________________________________________ | Kilometers | Summer | Winter | |--------------|--------------------|--------------------| | From | To | Weekday | Weekend | Weekday | Weekend | |-------|------|----------|---------|----------|---------| | 0 | 25 | $150 | $170 | $170 | $190 | |_______|________________________ ...Show All
spshah PropertyGrid and ListBox
Hi All Can someone show me an example of how to place a "ListBox" property within a PropertyGrid I am working on visual studio 2005. srinivasa rao thanx ambursa it worked perfectly but i need a "listbox or a checked listbox" where in i can select multiple items in the list. For that i was trying in the code bx.SelectionMode = SelectionMode .MultiSimple; the above line of code doesn't make any sense and i also want to know what the items we have selected from the list. Changing the order by which properties within a category is displayed is doable, however, changing the order of categories, well as far as i know and please anybody correct me if ...Show All
GunaChinna cust_id column to hide in gridview
I am working on a web project to display data in a gridview and I would like to hide the cust_id column in the grid, which is index [3]. I have an Edit (index[0], and two Template columns (index [2] and [3]). The first field being displayed is the cust_id (index[3]). Here is the code I have and the error message I receive is " Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" protected void Page_Load( object sender, System. EventArgs e) { //calls the dgResults_DataBound method to hide the cust_id column dgResults.DataBound += new EventHandler ( this . dgResults_DataBound ) ; } protected void dgResults_DataBound( object sender, EventA ...Show All
deji101 You cannot drop an item onto a button on the taskbar.
You cannot drop an item onto a button on the taskbar. However, if you drag the item over a button without releasing the mouse button, the window will open after a moment, allowing you to drop the item inside the window. I get this messege when i try and drag and drop some of my controls with my panel container any help on how to fix this yes, I think it is by design. but What's your problem Could you be more specific ...Show All
jwraith OpenFileDialog throws ThreadStateException
Hello. I have converted a C# project from VS 2003 to 2005 and am now continuing to work on it. It all seems to work fine, the some small issues could be solved very quickly. I have also converted the project files design manually to VS 2005's, with Form.Designer.cs files and a Program.cs containing the static Main() function. I've copied the code partially from other solutions newly created with VS 2005 so that it's complete. Now I wanted to use an OpenFileDialog in my application but as soon as it is to be displayed, it throws a ThreadStateException telling me I should add the STAThreadAttribute to my "main function". (Not the exact wording, that's in German. You can google that wording very easily.) But the initial Main functio ...Show All
Sam Jost MSDataSetGenerator failed
Working with TableAdapter and MSDataSetGenerator and having recurring problems with an error: "The custom tool 'MSDataSetGenerator' failed. Failed to generate code. Object reference not set to an instance of an object." This error is intermittent and occurs when adding an Insert query. Sometimes, especially after rebooting, I can create the query and it all works. I can then go back to add another query and I get the error. The designer.vb file is deleted as it tries to regenerate. If I comment out the <DbSource> ... </DbSource> XML in the xsd file for the queries and 'Run Custom Tool', the designer.vb file is regenerated fine. Activate the commented out query again and I get the error again. If I have s ...Show All
