Answer Questions
stick_thai Problem with inherits form
I am trying to modify my existing form to use a new base form. In my new base form, I have added the following property. <DefaultValue(False)> _ Public Property TrainingMode() As Boolean Get Return Me.trainingLabel.Visible End Get Set(ByVal value As Boolean) Me.trainingLabel.Visible = value End Set End Property I use the trainingLabel visibility to indicate whether my system is in training mode. In the base form designer view, I have set the trainingLabel.visible to false. The problem is those inherited form based on the previous base form will change the TrainingMode to true automatically after I rebuilt the base form. I don't know how to debug this problem. As all this happened during the design ti ...Show All
Enes Kabacaoglu 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 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 i'm wrong, that is not possible! However, I'll do some researching and get back to you i find anything. BTW, one other thing that i couldn't do with the property grid, is to change the proportions of the column widths, the area covered by the help text and commands text ... etc. You know, the internal dimensions of the property gid. This is one other thing that i think is not poss ...Show All
TryVoipandStuff Scroll event not firing paint event
The paint event won't fire whenever I scroll the pane control, even though I call Invalidate(). I have tried calling Refresh in the event, but to no avail. Am I missing something here using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Reflection; using System.Text; using System.Windows.Forms; namespace TestApp { partial class Form1 : Form { /// <summary> /// Required designer variable. /// </summary> &nbs ...Show All
Yong Hwee combobox display member is not working
hi this is the scenario. I have two tables with a relation. items and products. items has itemnumb (PK) and prodnumb (FK) products has prodnumb(PK) and prodname I want to make a form that would let me navigate through item elements, edit and store new ones (the usual stuff) the relation is established and I have it on a dataset (myDataset)with both tables. When exploring the dataset I can see item (child table) and product (parent table). When clicking on product I can see item inside product in the next level as the relation goes. The tutorial says that I just have to drag the elements I wish to appear in the form. I do so. As I don't need datagrid I select textbox for itemnumb and a combobox for prodnumb which is what I want. I drag the ...Show All
Corgalore RichTextBox question
I am using odbc driver to manipulate records to and from a Paradox database. In the Database I have two columns that are Paradox 5.0 memo fields, they have been formatted with a Rich Edit field in Delphi7 . I can view the data in the fields in my C# app in MSVS 2005 with a RichTextBox control except that the formatting shows in the text box as well as the data. Like this: {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}{\f1\fnil MS Sans Serif;}} \viewkind4\uc1\pard\lang1033\b\f0\fs16 3/4x3/8--63/4x4/78--One X Leather--One 1/2" wedge. Hook heels around instead of cutting off.\f1\par } Is there a way to get the richtextbox to process the formatting Thanks Jon (Moderator: Thread moved to thi ...Show All
Derson Andrade drawing tree view
i have a tree view that i can add child to its nodes. when i add a child with too many children to this tree view, during the addition of new node tree view keeps on blinking. i can prevent blinking by using a couple of lines as you can see below: this .treeView1.BeginUpdate(); // add new node to the tree view control this .treeView1.EndUpdate(); but as i havae noticed this will redraw the whole tree. I want a way to redraw only the node which user has selected to add child to it. The question is how can i do this Hi Try this TreeView t; t.Nodes[x].BeginEdit(); ---- t.Nodes[x].EndEdit(); Hope this will help -thanks Mahesh nope that doesn't work. ...Show All
Andy Britcliffe Adding controls to form
Is there a way to add controls to form from other class without creating a new instance of the form I needed to add a label and a button to the form without creating new form every time.And the second question is...how to save these controls in the form,i mean when user close the application and run it again the form should contain the controls which user is added to it las time,how can i to save the form and controls values when i close the application Really sorry for the bad english,that's not my mother language..... For example, you have a form with a button named "button1" on it, clicking the button you want to add controls to the current form, you can do in this way: private void but ...Show All
reichard cannot get the correct value after change the selected row
in a DataGridview, the default selected row is the 1st row (rows[0]) I use the following code to change the selected row : dataGridView1.Rows[3].Selected = true; then I use the following code to get the value : MessageBox.Show(dataGridView1.CurrentRow.Cells[0].Value.ToString()); However, it still return the value of the 1st row!!! The reason is the row header pointer won't change....why and how to solve it thanks. Hi Clement_kflee, You are assuming, quite understandably, that selecting a row is the same as setting the current row. However they are two separate mechanisms. Selecting a row is functionality specific to the DataGridView itself. Setting the CurrentRow is a matter of ...Show All
shakalama Freeze Panes For A Dynamically Created Datagrid
Does anyone know how to freeze the header row and one or more columns for a dynamically created datagrid. This is created in vb.net / asp.net I am also available through windows / msn messenger - paul.donaghy@hotmail.com - if anybody can help me and we can talk about my problem. All help appreciated. Thanks for info and reply. I would really need feature like this with a datagrid. I have managed to create a freeze header but only when the table property 'ShowHeader' is true, but this property has to be set to false so instead I would need to freeze the first row. This type of feature can be achieved but not sure how to do it. Anyone know how You can freez ...Show All
Umeshgopal drop down combobox via code
hi i need to open a combobox via code. how do i/ Private Sub myDGV_KeyDown( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) Handles myDGV.KeyDown If e.KeyCode = Keys.Enter Then If ( Me .myDGV.CurrentCell.OwningColumn.CellType.ToString = "System.Windows.Forms.DataGridViewComboBoxCell" ) Then 'ctype(me.myDGV.CurrentCell,DataGridViewComboBoxCell) 'code to open the combobox and display the values End If End If End Sub Private Sub myDGV_KeyDown( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) Handles myDGV.KeyDown If e.KeyCode = Keys.Enter Then If ( Me .myDGV.CurrentCell.OwningColumn.CellType.ToStr ...Show All
MeDave How to See custom properties of CustomColumn in Editor window
Hi, i'm trying to write a custom column to display text and image both. Image will also be clickable to use as a button. I write it and works, but at design time i can not apply its image properties(imageClicked, imageOver vs). Do i have to write (impossible) a new editor or is there an other way to see them. Also i wonder how to disable OnMouseDown event, because i want my image button not to do anything when i set a property called locked. I overcome as below private void dataGridView1_CellClick( object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) return ; if (dataGridView1.Columns[e.ColumnIndex].Name == "MyColumn" ) { DataGridViewCustomButtonCell buttonCell = ( DataGridVie ...Show All
leclerc9 How do I make a form read only (vb.net)
Hi, I'm aiming to create a form to display non editable information. I am aware that I can set the enabled property to false, however this greys out the information and I dont want this. Is there any way I can make the form (or the controls on it) read only Thanks Sorry for my ignorance (im new to .net!) but how do I use this code Do I need to create a class You can change it at run time too. in your code you have to set the ReadOnly property to true e.g. if your textbox name is textBoxFirstName then on view only condition you have to set following textBoxFirstName.ReadOnly = true Well, as your aim is to create form for only dis ...Show All
Michael_317 Hiding tab pages
I have gone through the threads available on this subject and have tried the suggested solution. But they don't seem to work. I have design my tab pages with the TabControl using the visual basic 2005 express. I have 4 tab pages on my application, each with a datagridview thing which have connections etc. coded for each. Is this the reason why the tabcontrol.tabpages.remove() way is not working or is it due to the limited capability of the IDE please enlighten this cofused and blurred student.... thank you. Ariff, Can you be a little more specific. When you say 'that didn't work either', does that mean that you get an error message of some kind Can you maybe also post a code example It makes ...Show All
fatquack ClickOnce - CrystalDecisions.CrystalReports.Engine.ReportDocument
Hi, I developed a large scale win form application that uses Crystal Reports (vs2003 cr version ) in .NET 1.1 and recently converted it to .NET 2.0. The problem is when ever a user opens a form that uses crystal reports I get the follow exception: ************** Exception Text ************** System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.Runtime.InteropServices.COMException (0x800736B1): Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50} failed due to the following error: 800736b1. at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End of inner exception stack trace --- ...Show All
mruniqueid ListView is not showing groups
I am using VS 2005 and trying to show some strings in ListView in Three groups. I have tried creating groups both by code and desingner. No one works. Can any one point out some reason. The ListView is using 'Details' style. But I have tried with 'List' style as well. yah .. I added the list view to the form controls... Are you pointing something else Have you tried Sean's code It is missing a crucial statement, what did you do to make it work Thanks for your help but the problem remains the same. I created the LV with the procedure you mensioned and then added groups and items. But still the items are being shown without any grouping i.e. they are shown ...Show All
