Answer Questions
Mathew1972 SetColumnValueAtRow passing currency manager, row number and button text in v1.0 not working in 2.0
Got my original code from http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnwinforms/html/datagridcolumnstyle2.asp public class DataGridButtonColumn : DataGridColumnStyle { private void DataGrid_MouseUp( object sender, MouseEventArgs e ) { ... // check to see if the cursor is within the bounds of the button if ( cursorRect.IntersectsWith( buttonBounds ) ) { object ds = this.DataGridTableStyle.DataGrid.DataSource; string dataMember = this.DataGridTableStyle.DataGrid.DataMember; // retrieve the currency manager object from the form's binding context CurrencyManager cm = ( CurrencyManager ) this.DataGridTableStyle.DataGrid.BindingContext[ ds, dataMembe ...Show All
CScs Windows does not recongize that i just insatlled a new program.
I'm writing up a setup application, and when I install the exe file, Windows does not reconginze that I just installed a new program. Do I need to create a registry file If I do, does anyone know how to create one and what do I need to put in there in order for Windows to reconginze that a new program has been installed. Thanks, Brandon well yes of course, if you wrote the program yourself you have to do everything the way an installer does so Windows can register the new program you have installed - just copying files from one place to another is not an installation - its just a file copy. You will have to find out what registry keys, files etc... are used in order to notify Windows of an installation of a program. I ...Show All
pbairoleto How to show the changed Text while loading?
Hi! at time-consuming processing in reading data etc, how to show a Label such as loading into the following codes, the character "Loading" cannot be seen. private void loadDailyButton_Click(object sender, EventArgs e) { titleLabel.Text = "Loading"; da.Fill(ds); titleLabel.Text = "Loaded!"; } what code do I have to insert here Thank you! The answer of you two might be very useful for me. I will try it. tkerns answer is absolutely the correct approach, but you could also put txtLabel.Refresh() after setting the text to "Loading". Look at using the BackgroundWorker class to perform time ...Show All
BobConsultant Using Font Dialog to change font
Hey, how would I make it so that one you select a font in the font dialog the font in the richtextbox changes to that font here is what I have so far: fontDialog1.ShowDialog(); Thanks:) Hi, try it with the following code: fontDialog1.Color = richTextBoxCtrl1.ForeColor; if (fontDialog1.ShowDialog() != DialogResult .Cancel) { richTextBoxCtrl1.SelectAll(); // If you want all text with that color richTextBoxCtrl1.SelectionFont = fontDialog1.Font; richTextBoxCtrl1.DeSelectAll(); // If you want all text with that color } Andrej ok thanks :) ...Show All
QWERTYtech How to improve performance of datagridview
Hi All, In my project i have made one monitor for showing current price and all market,its related to share bazar, for that i used datagridview and i m binding data with datagridview every second. but i faced problem with flikering in datagridview. so plz help me who to remove flikering. I used Datasource property for binding data depends how many records you have to display - ive never had any flickering going on but could be related to several other things, such as different events implemented by yourself whilst databinding to do some other things. how many records are you typically trying to bind Hi ahmedilyas at a time i am tring to bind 200 to 300 records I have c ...Show All
andyedw Change form size on maximize
Hi, currently my when i maximize my applicant the form stays the same size. Is there ayway that it could dynamicaly change sizes as I change the main window size like maximize Thanks When I maximize the window it does maximize. But the contents inside do not. How can I code it so that the contents change according to the size of the window How do we set up the form's size by percentange The anchor property would be part of what i am looking for. Let say there is a form inside the window, if I maximize the window I want the fields to increase accoridingly. Anchor your controls on the form to opposite sides..ie top ...Show All
CruzPedro Need help about Prequiest
Hello, i am new to creating setup and installation using Visual Studio 2005. actually my applications is built on C# 2.0 but it uses MSDE 2000. i don't know how to add prequiestry of that MSDE 2000 into my project. let me explain whole scenario please. i need to first install .NET Framework 2.0 ( it can be included using Properties of Project ) Second, MSDE 2000 Third i need to run some scripts and start MSDE 2000 services, and also do some Database Operation. and then after my application. How may i do that please help me. Thanks in advance. ...Show All
IS dude datagridview
hi, i have a datagridview(vid=sual basic 2005 and sql server 2000 thru dsn im working). i want to 1)display data from a table to datagridview 2) add new rows 3)delete 4)update. i added a datagridview and added 15 columns to that ans set name and columnheader for each. i also want some of the columns to be calender etc...(i added genericdatagrid user control.dll) i have the following code in the form load but no data is coming. can u please help con.ConnectionString = "dsn=alphasql" con.Open() da = New OdbcDataAdapter( "Select * from Company" , con) 'da.SelectCommand = New OdbcCommand("Select * from Company", con) da.Fill(ds, "Company" ) DataGridVi ...Show All
ivanchain Adding Record to Details Table
Hello, I have a form showing information from two tables which are related one-to-many as Master-Detail records (as in Customer-Order relationship). Information is shown in two DataGridView controls, bound to the underlying database tables via BindingSources by dragging & dropping in Visual Studio. I wish to write some code which adds the first Detail record to the database whenever a new Master record is created. Can anyone help with: Which event on which object is best to attach to How one finds the key value (and possibly other contents) of the new Master Record being created so one can add it to the Detail record How to create and add the Detail Record (allowing for the fact that the Maste ...Show All
Sachin Saxena IsFileGroupDownloaded Problems
I not sure if anyone has experienced this before, but when I have the following code deployment.IsFileGroupDownloaded ("groupName"); if a customer doesn't run the area of code that requires the group to be downloaded, the click once app will re-download the group again. Version 1) Customer runs IsFileGroupDownloaded("groupName"); group is Downloaded Veriosn 2) skipped running IsFileGroupDownloaded("groupName"); Customer doesn't use part of software that needs the downloaded group. Version 3) Customers runs IsFileGroupDownloaded("groupName"); and click once Re-Downloads TIA Patrick Not sure if this has been noticed.. any ideas if this is really an issue ...Show All
Tom Rixom DirectoryInfo.Exists error
DirectoryInfo . Exists (myDir) give exception if I run the exe though a mapped drive, what might the problem be What might the exception message be I tried, but It works fine all the time. Will you please post more information BTW, the Exists is a property of DirectoryInfo class What's your envirnoment I tested on .NET Framework 2.0 in VS2005 ...Show All
UmerTahir Extending DataGridViewTextBoxColumn to DataGridViewHtmlColumn
I'm tring to create a better way to present data in data columns. I've decided to extend the d.g.v.TextBoxColumn, although perhaps I should be using a higher level base class. The fist thing I've decided to support are newlines or [br] ( breaks ). this done, Im not sure the best way to calculate row height, or how to effectively set it. I've tried inside the overridden Paint method to set [ this.DataGridView.Rows[ index ].Height ], but it doesnt seem to be affecting anything perhaps I have to change a related flag so the problem, is that I now have a multiline text column that is cutting off the text because the row height is not appropriatly set. any help is greatly appreciated! -stellar ...Show All
rdrunner40 Read text file
I have a vb script in a excel file which will read data from spreadsheet and generate a text file. Then I use vb.net (stream reader.readline) read this text file. The problem is the text file generated by excel script contains some special characters such as " c" , " R ". These special characters are ignored by the vb.net. Does anybody know why and how to work around the problem Further test, if I use streamwriter generated a second text file, and then cut & pasted all the content from the first text file to the second one. Then streamreader can read all text. Thanks Ying Hi, It probably has to do with the encoding of the file. Here's a link to more informat ...Show All
Andrew Buyan How to determine a control design mode?
Hello, how can I determine whether my control is in a design mode or not Let's say I want to have the background color blue in designer and red when my application is running. I know there is a "DesignMode" parameter for Component objects, but for Control Thanks :) Hey, you could obviously use the DesignMode of the parent form of the control. Otherwise you could create a custom control and with its code define its behaviour in DesignMode by calling this.DesignMode. ...Show All
Andre's datarelation and dataview
Simple q regarding .net 2003 I got several tables A master and e few details/child tables add datarelations to it and bind it to controls... so far so good Now i wan't to filter/search the mastertable, Sound easy but when i use a dataview i lose sync with the detail/child tables Remco well yes but this was not the original question though was it I am having the same problem. Hopefully the following example will help people understand what we're trying to do.... Consider you have a DataSet which is made up of Customer information and related Orders, that is, one dataset with 2 distinct tables, "Customers" and "Orders". We create a DataRelation ...Show All
