Answer Questions
Whoisit Designer can't load form - "could not load type ...from mscorlib ....due to value type mismatch"
Hi, I'm getting the classic pink error banner when trying to view most of the forms in my solution in VS 2005. Everything was working OK up to yesterday when installed SQL Server 2005 SP1 (which installed a new copy of the .NET framework) and also installed Team Explorer. Tried re-loading everything from source control etc but no solution as yet. These forms were originally written in VS2003 so have the forms designer code embedded. A couple of forms added in VS2005 don't exhibit the problem. Any solutions or workrounds gratefully accepted ! Typical messages in full Could not load type 'System.Runtime.InteropServices.ClassInterfaceType' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934 ...Show All
Gooseman1977 I can't get Timer to work...
I am using a timer in a form to make progress in a progressbar. I want the progressbar to complete in 10 seconds so I sett Maximum to 10000 and Minimum to 0. I init Value to 0 allso. private : System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { this ->smoothProgressBarControl1->Value = 0; this ->myTimer->Interval = 1; this ->myTimer->Enabled = true ; } private : System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) { if ( this ->smoothProgressBarControl1->Value < 10000) { this ->smoothProgressBarControl1->Value++; } else { this ->myTimer->Enabled = false ; } } Now there is 1000 miliseconds on 1 second so there should be 1 ...Show All
GregRyanLorenz Create icon?
Hi I have a picture (.png) that I want to convert to an icon. This icon should support 16x16, 32x32, 48x48 px. The icon is for my form... It should be possible to have a more detailed icon when viewing thumbnails in explorer (I think it is 32x32 and 48x48 then ) How do I create this icon in .NET Is there a tool built in Kind Regards The .ico file type is a special Windows file type. You will not find any good converters for free, just really basic ones. I suggested Photoshop because it is a powerful digital imaging application despite its price. When you do find something that converts your image to all those sizes, you need to make sure that your image is bigger or as big as the biggest size you are go ...Show All
LiL_X Scroll the datagrid to a particular row
Hi, I have a problem with the vertical scrollbar. I would select a row in datagrid and update it.When I reload the datagrid with data, the selection would be to the first row.I could clear this problem with the 'NavigateTo' property, but , the vertical scroll bar is still at the same position as initially. How can i program the vertical scroll bar to move to row thats required. A code sample is more than appreciated. Thanks You may try us ethe CurrentRowIndex member to set the row you want visible. I used it but of no use. The pointer is pointing to the set row but the Vertical scroll bar is not moving to the required row.Here, i need to move the vertical scroll bar. Please help on it ...Show All
GWILSON1981 Save File Dialog. (I have code, just need a little help fixing)
Hey, Ok, so I did the save FIle dialog code and it works fine. But I can't figure out how to amke it so thta is will save the contents of the current page in the webbrowser. Here is the code: private void savePageToolStripMenuItem_Click( object sender, EventArgs e) { Stream myStream = null ; SaveFileDialog saveFileDialog1 = new SaveFileDialog (); saveFileDialog1.InitialDirectory = "c:\\" ; saveFileDialog1.Filter = "Webpage Html (*.html)|*.html|Text File (*.txt)|*.txt" ; saveFileDialog1.FilterIndex = 2; saveFileDialog1.RestoreDirectory = true ; if (saveFileDialog1.ShowDialog() == DialogResult .OK) { try { if ((myStream = saveFileDialog1.OpenFile()) != nu ...Show All
IamHuM INI files
Hey, I searched MSDN for this but I could not find anything on it... How do you have the program recongnize a .ini file I have called it load.ini and this is what it is inside of it: [firstload] firsttime = 1 I am trying to make it so that in the Private Sub Form_Load it will look for the ini file and read it, is firsttime = 1 then it is going to open up a dialog, otherwise it will do nothing, I can do all of that, I just need to know how to have it find the ini file... I placed the ini file in the project's folder... Thanks :) EDIT: I get the same errors when I try to use the code as well. EDIT2: I read an article earlier but can't seem to find it. Anyhoot it talked abo ...Show All
Daikoku datagrid prob.
how can i place a combo box in a datagrid control. i wanna sample code. combobox in 1 colomn and checkbox in another colomn, rest of the colomns are left for the data input. any one yr given solution doesn't helped me out, i need some more assistance. please help !!! i m using visual studio .net 2003 and there is no such class DataGridViewComboBoxColumn in system.windows.form what should i do now Hi, Use a DataGridBiewComboBoxColumn and a DataGridViewCheckBoxColumn. Check the sample here: http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx If you use the VS designer, you just hav ...Show All
Martin Hart Turner How to make a Control inherit the Form backcolor or properties (i.e. font etc)
Hi folks, I would like to know if anyone knows how to make a Custom control inherits the form,upon which it gets dropped, properties like the backcolor, font etc.... By inherits I means will have its own property assign with the current value of the form property. e.g. Control.Font = Form.Font; Also, I want to have the control set up its property at construction time (when the control get constructed - so that it has the same backcolor (in this case ) then the form) Cheers. Seve True transparency is tricky and expensive. Check out this thread for an example. It already works that way. If you don't set the BackColor or Font properties in the constructor or with the designer, ...Show All
elfenland StyleGuidelines/Best Practices for WinForms
Hi- I am fairly new to the Windows Application Development (as I always worked on the Web Applications) and are there any style guidelines available, best practices specific for Windows Application Development I will be using VS.NET 2005 for this applicaiton. Please advise. Thank you. Prabhu From your words, you're a good developer, you're always trying to comply to the rules, aware of the standards. But I doubt that there are white books there stating the industry standards for building windows applications. Maybe the books e.g. Writing Secure Code, something like that may help. Sorry, I should have been clearer in the original request. I am indeed following specific coding guidelines and a well organized projects a ...Show All
Blackice Save from a Datagrid to .TXT
Can anyone help me to save information from my datagrid to a .TXT file. I am populating the datagrid with information from a SQL query that I already have set up. All I need to do is to save the information to a .txt file now. Thanks Hi,Lawrence007 I write the following code for you information using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using System.IO; namespace WindowsApplication1 { public partial class Form8 : Form {   ...Show All
Alex Dresko &#40;MVP wannabe&#41; Printing DatagridView
Hi, I'd like to print only certain columns of a DataGridView. How would something like this be done I couldn't find any code examples. Thanks Ok i have managed that too. If anyone will run into similar problem here is a way to set it right. In while loop in posted code you must set Do While nRowPos < DataGridView1.Rows.Count - 1 you must delet -1. It should look like this Do While nRowPos < DataGridView1.Rows.Count. Then it will work just fine. Great code indeed. Thank you... VB-Bandit, The code above creates the PrintDocument now all you need to do is use it, the following code with give you a print preview! Dim dlg As New PrintPreviewD ...Show All
hailong1977 Customizing DataGridView Selection Behavior
I'm currently trying to use a datagridview to allow the user to select multiple items from a table. While the multiselect functionality will work for what I want. I would prefer to have the program only change the selection of the current cell when a cell is clicked. Or to basically have the program act as if the user was always holding down the Ctrl key for selection purposes. Additionally, I would prefer if I could also restrict selection based upon the value in the cell being selected. Looking around the net, I found vague references to being able to disable the ordinary selection behavior. However I have not been able to find any information on how to actually do this. If anyone knows how to do this, could they point me in ...Show All
milicica Tutorial loader UI/Code
I'm working on a small smart client program that checks a few things on a workstation to assist local IT techs supporting the networked workstations. The smart client is written in C# 2.0 on the .NET 2.0 framework. Basically, when run, it gathers a bit of information about the PC that a tech would be interested in (such as MAC/IP/Gateway address, drive space, etc). It also runs a few ping checks for various network resources. Anyway, I'm looking to enhance the application by building tutorials into the utility. Allowing the users to click a button and get a list of tutorials on things such as setting up a printer, email, etc... The UI I planned was a left column that would hold a listbox of all the tutorials. When a user clicks the tutoria ...Show All
Pockey Convert in xml file
Before inserting data in database how can i convert in xml and then insert in database and whenever read from database convert in xml and then show in gui form Try the WriteXML() Command in DataSet . hths, James This covers many topics...and it sounds like you have a learning curve...Examples are some of the best way to learn. Check out some of the VB/C# examples for the basic operations or some more robust examples as found in the Starter Kits . Also there are 101 Samples for Visual Studio 2005 which is a robust, initial development tasks to more involved tasks for winforms, web development etc. ...Show All
pwhitaker Getting current row values from my BindingSource in C# VS 2005!!!
Hello, How can i get a current row values from my BindingSource. I have a DropDown List that points to a view, and I set a column of my view to be displayed in my DropDown list and another column as it's value. I need to display another column of my view in a ReadOnly TextBox right near my DropDown list. Thanks so much in advance, Mathew Dear Bonnie Sorry for the delay. Thanks for your time. 1) The reason for not to use concatenation is I want to see them separately not stuck together. Of course, I know that I can simulate it to seem like 2 separate columns, but I was just curious if it can be done (using property sheet or code) in C# VS2005 or not. 2) I would like to correct your c ...Show All
