Answer Questions
Paulustrious (VS2003)Owner Drawn Listview Item Height
How do you set the item height of an ownerdrawn listview in 1.1Framework Our target framework is 1.1. I know that ownerdrawn listview is available in 2.0, but we are not currently keen to moving to 2.0 as of now because of business reasons. I need to create a listview with variable item height in report/detail view. What message should I send to set the desire height of the listview item. Just to set the general item height will be a start. Has anyone done this My custom listview is an implementation of virtual listview. The listview doesn't really have an item collection. Most drawing are done using the API calls. For some reason even when the MEASUREITEM event is ca ...Show All
Tom_Liu DataGridView Refresh issue
Hi I currently have a dataGridView that is responsible for displaying all of the data from a table within my database. Whenever the table is altered thru another form, the changes doesn't get reflected in the dataGridView until I close and reopen the program. I tried to use the Refresh() method but it seems the compiler does not detect anything new to redraw. I also tried to Invalidate() and redraw the grid, but that doesn't work either. Does anyone have any idea on how to refresh a dataGridView Thanks for your time in advanced. Hi, I found the same problem of refreshing, and this solution worked fine for me. The problem is that when refreshing, after comming back from the child form, the cursor i ...Show All
fripper Inheriting the windows form from another windows form
I'm trying to inherit one windows form (inheritForm) from another windows from (baseForm). I want to override the the baseForm's some events with the inheritForm events (let's day I want to override the form_click event). Can we really do this. I mean does the design of .net framework 2.0 support this If yes, it'd be gr8 if you can post few lines of code. Thanks, Vivek I followed ur method but i got this error Warning 1 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: Form2 --- The base class 'Test1.Form1' could not be loaded. Ensure the assembly has been referenced and that all project ...Show All
dwloeb77 Embedding Open File dialog
Hi, i want to add an open file dialog control to my program. But want it to be seen always, not close after DialogResult. Is this possible If you are using FrameWork 2.0, it should be possible this .openFileDialog1.FileOk += new CancelEventHandler (openFileDialog1_FileOk); void openFileDialog1_FileOk( object sender, CancelEventArgs e) { string name = this .openFileDialog1.FileName; e.Cancel = true ; } e.Cancel = true will not allow the dialog to be dismissed. Not without jumping through some creepy hoops. OpenFileDialog.ShowDialog() disables your other forms. You could possibly avoid that by calling ShowDialog() in another th ...Show All
Tejas34 Databinding to Combobox Error! Help Please
Dear All, I have problem with following code : Private Sub frmProdDataEntry_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles MyBase .Load Dim Categories As TechManagement.DBComponents.ProductDB = New TechManagement.DBComponents.ProductDB cboCategory.DataSource = Categories.GetProductCategories End Sub When I run the application, following error message appears:- An unhandled exception of type 'System.Exception' occurred in system.windows.forms.dll Additional information: Complex DataBinding accepts as a data source either an IList or an IListSource Thanks a lot in advance Dear Prasant, Thanks a lot. it is working PublicFunction GetProduct ...Show All
gafferuk Label within a label? C# and .NET
Hi guys. I have an interesting issue. I have labels created dynamically at runtime in my app, and placed in a flow panel. What I need is for some of those labels to have an extra label with a single digit placed in one corner. What I have so far done is created a class which derives from a label AND has a label in it. i.e. class Slide : Label { public Label l_IndexLabel; public Slide() { l_IndexLabel = new Label(); } public void SetUpSlide() { l_IndexLabel.Text = this.Tag.ToString(); l_IndexLabel.Size = new System.Drawing.Size(10, 20); l_IndexLabel.BorderStyle = BorderStyle.FixedSingle; l_IndexLabel.Location = new System.Drawing.Point(this.Right - 10, this.Top + 20); l_IndexLabel.Show(); l_IndexLabel. ...Show All
Spicer650 Initialise a cell in a new row
Hi there When a user creates a new row in my datagridview, I'd like to initialize one of the cells to a pre-determined value, programatically. I tried using the UserAddingRow event, but it seems to change the row after the row that is being edited. Ideally, I would like to initialize the cell before the new row is visible. Any thought welcome. Cheers Dave Hi, Perhaps you could try the DefaultValuesNeeded event of the DataGridView. Here's a sample from MSDN: private void dataGridView1_DefaultValuesNeeded(object sender, System.Windows.Forms.DataGridViewRowEventArgs e) { e.Row.Cells["Region"].Value = "WA"; e.Row.Cells["City"].Value = "Redmond"; e.Row.Cells["PostalCode"].V ...Show All
nbrege How can we achieve Scroll lock type functionality in text box Or Richtextbox (c#)
I have a multiline textbox/RTB where text is appended every 20 ms. I want to copy some text in between and see what i have received. But whenever I click on RTB, It scrolls to down and I am not able to copy related text. So How can I achieve scroll lock functionality. I want the same behaviour as dot net IDE output window where text keeps on appending but whenever we want to copy it allows us to do. I was just messing around with stuff in VS2005 and the output window doesn't do what you say. When new text is added the output window automatically scrolls to the bottom. Which would be the same as using AppendText() on a textbox. I understand what you want, but I don't know of a way (if there even is a way) to do what you want. EDIT Ok ...Show All
jb2178 Shortcut keys
hi all, is there anywhere where i can find a consolidated list of shortcut keys for all (or some) of the tasks in Visual Studio 2005. I am keen to learn them in order to speed up my programming. what do you think about this Hi, here's quite an extensive list of Visual Studio (default) shortcut keys: http://msdn.microsoft.com/library/default.asp url=/library/en-us/vsintro7/html/vxurfvisualstudio70defaultshortcutkeys.asp Hope this helps, Andrej ...Show All
Yogesh Ranade WebBrowser - setting value for "type=file"
I'm using the VS 2005 control System.Windows.Forms.WebBrowser. I want to be able to set the value for a text area that indicates a file to be uploaded, where type=file HTMLInputElementClass iElement = (HTMLInputElementClass)element.DomElement; if (iElement.type.ToLower() == "file") { if (iElement.name == name) { iElement.value = text; Application.DoEvents(); ok = true; break; } } iElement.value is still null after the assignment. Help. Thanks for the reply, but that doesn't work. Here is the html: < td class = 'innerintformfield' > < in ...Show All
laja Binding array into datagrid column
Dear All, I have a dynamic array generated. So what I want to do is to keep the array as part of a grid column. I cant afford to put each of the array value as individual row as this list will be a long one. So I am doing grouping and keeping the all the ID into an array and later I want to store this array as column value. So how can I store an array as a datagrid column Hi, Exactly you got me right. Ok let me explain the data is just simple numbers. So let say for row 1 the array is consist of IDs 1,2,3,4 and row consist of IDs 2,3 and row 3 consist of IDs 4,5,6,7,8,9 etc. So how can you help me on this. Thanks. Hi, Ok let me explain to u in simpl ...Show All
jdonahue1971 Sporadic Failing of ClickOnce Launch
Background: I have used Boostrape Manifest Generator to create my own bootstraper that installs some prerequsites and instead of trying to launching my .application to install my clickonce application launches .appref-ms. I do this to insure that my clickonce application will be installed for FireFox and Netscape users. It works like a champ most times but I'm getting sporadic reports of it not working on IE browsers. Users report it looks like the browser window opens and closes. Naturally, I asked the user to turn-off pop-up blockers / firewall but that didn't work. Any suggestions on what might be causing this or ways to track it down TIA. ...Show All
ssboyz Changing DataGridViewButtonColumn's Button Text Per Row
I have an unbound DataGridViewButtonColumn and I want to change the text on each button(each row) during the load of the grid or on specific event. How can i do that thanks Shaul there is no way for doing this please help DataGridViewButtonColumn btnCol = new DataGridViewButtonColumn (); btnCol.Name = "btn" ; this .dataGridView1.Columns.Add(btnCol); for ( int j = 0; j < this .dataGridView1.Rows.Count; j++) { this .dataGridView1[ "btn" , j].Value = "btn" + j.ToString(); } ...Show All
lawlessSaturn DataGridView Sorting ????
I have a GridView i am populating the same dynamically....By adding colums and rows. Like DataTable dt = new DataTable (); dt.Columns.Add( "ProjectName" ); dr = dt.NewRow(); .... So in the design view this ProjectName is not visible..i need to enable sorting. So how do i do it. You can call the DataGridView.Sort() method: My_DGV.Sort("MyColumn", ListSortDirection.Ascending); You can also use a DataView to mantain sorted the view, put it like DataGridView.DataSource. http://msdn2.microsoft.com/en-us/library/system.data.dataview.aspx Regards. Suppose i want to sort the Grid when we click on the Coulmn header is there any way ...Show All
Butters_Stotch i am using .NET framework 1.1 so can i add combobox in datagrid?
can anyone tell me that how to add the combobox in datagrid moreover i am using .net framework 1.1. thanks Windows forms faq sample . VB-Tips has a few samples. ...Show All
