Answer Questions
Tomay textBox Question
is there a way to allow only ' a-z A-Z 0-9 ][{}()-* ' characters to be typed into a normal textBox the MaskedTextBox wont work in the way that i want it too. Im using VC++ 2005 thanks Hmm. You have to pass the e->KeyChar as the first parameter of IsMatch method... Some kind of conversion will be required... Also, make sure you have assigned the textBox14_KeyPress handler to textBox's KeyPress event... Andrej thanks Andrej i will give that a try Andrej Tozon wrote: Hmm. You have to pass the e->KeyChar as the first parameter of IsMatch method... Some kind of conversion will be required... Also, make sure you have assigned the textBox14_KeyPress handler to textBox's KeyPress event... Andrej ...Show All
jhknys Two blank error dialogs running setup.exe
On running the setup.exe from my clickonce deployed application I am getting two blank error dialogs immediately. However, double-clicking the .application file runs my application with no problems. Does anyone know how to fix this Quite a few of our developers are experiencing this problem. setup.exe all it does is to check the pre-requisites. Do you have any pre-requisites If you have make sure you are not expecting the pre-requsities are not in clients GAC.. There is nothing in the temp directory. I don't think it gets as far as starting the installation. Delete the setup.exe from where Because I deleted it from the published directory and I am still having th ...Show All
-D- C# drag and drop between forms
I've been trying to figure out how to drag and drop between two forms (i.e applications in C#). I created two forms. One form with a treeview and the other form with a textbox. What I wanted to eventually accomplish was to be able to drag the node name from an item on the treeview (form 1) to the textbox (form2) Therefore, I created the first form with a treeview, a few nodes and the itemdrag event. I created the second form with the dragdrop event and dragenter event and the textbox to capture the node that was dragged over. private void textBox1_DragDrop( object sender, DragEventArgs e) { if (e.Data.GetDataPresent( typeof ( TreeNode ))) { ...e.Data.GetData( typeof ( TreeNode )); } } Is there ...Show All
pinoyz Adding DataSets To DataSource Pane
I have a really silly question. I have a VS2005 windows solution and most of my DataSets have disappeared from the DataSources Pane; though the DataSets are still in my Solution Explorer. How can I add the DataSets back to the DataSources pane Thanks, cj Ok, it appears that this was related to the duplicate connection string issue mentioned in this post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=921869&SiteID=1 I removed a duplicate connection string from ONE dataset and then ALL of my datasets reappeared in the DataSource panel. I've reconfigured the data source and any new dataset will not populate in the DataSource pane. ...Show All
Rajesh batchu How can i add a verb to a components designer from a different components designer
I need to add a designer verb to a components designer from a different components designer. This is what i am currently doing to add the verb and i am wondering if this would be the recomended way to do it. FlowLayoutPanel flp = this .DesignerHost.CreateComponent( typeof ( FlowLayoutPanel ) ) as FlowLayoutPanel ; flp.Dock = DockStyle .Fill; RootTableLayoutPanel.Controls.Add( flp ); RootTableLayoutPanel.SetCellPosition( flp, new TableLayoutPanelCellPosition ( column, row ) ); this .DesignerHost.GetDesigner( flp ).Verbs.Add( this .mergeCellsVerb ); Thanks do you encounter any duplicaes when another FlowLayoutPanel instance is created by this routine Do you mean dublicate verbs I ...Show All
Ido Ran Updating a databinding
Hello. I have a ComboBox binding a DataTable, when i changes the values in the DataTable ... i don't see the changes in the ComboBox. Why Too, i have several ComboBox binding with a BindingSource, and it binding to a DataTable, and when i changes(add or modify) values in the DataTable ... i don't see the changes in the visual components. Why :( Regards. Actually, all you need to do is an .EndEdit() DT.Rows.Add( new string [] {"new_id","new_name"}); DT.Rows[DT.Rows.Count-1].EndEdit(); Definitely better than an .AcceptChanges(). You could have reason, and the problem could be other code , please follow to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostI ...Show All
alphonso Printing a database
I would like to print all the tables in my database in my program which holds the databases and works with them, Any suggestions Thanks Anthony VS2005 is .NET 2.0, not 1.1. Anything in 1.1 code can usually be done in .NET 2.0 unless otherwise stated in the articles/documentation take a look at this: http://www.codeproject.com/vb/net/datagridex.asp its .NET 1.1 but should be the same for .NET 2.0, just changing the name of the components and its properties. Thanks for the link, unfortunately ive been there... I received this from a discussion on here...but it doesnt quite work...and another unfortunate fact is that im not a very skilled programmer. =( Im learning though. =) ' Dim line As String ...Show All
Jason Sacks - MSFT Converting Text to UPPER case in a datagridview control
Hi, I've tried everything but don't seem to be able to get this to work. The seniario is this. A user inputs some text in a cell of a datagridview control and I want the text to be converted into upper case before it is stored in the database. This data is a KEY field to a table. I've tried the format method of the defaultcellstyle and the onvalidate row, and cell events but can't seem to be able to figure this out. Has anyone ever needed to do this before And, would you mind tell me how to do it Thanks, Dave Thanks Ken :-) I do have a question if you don't mind. Does this only apply for a textbox What I mean is, the actual cell you see where you type in the data - is that a textbox co ...Show All
drew_p checkbox.text databinding?
one of the easiest way of binding data is to use a Binding source Dim mBindingSource As New BindingSource mBindingSource.DataSource = ' your datatable Now you can bind your controls properties to this binding sources datamembers Control.Databindings.Add( propertyName,dataSource,DataMember) Me .CheckBox1.DataBindings.Add( "Text" , mBindingSource, "Name" ) For more information check this article http://msdn2.microsoft.com/en-us/library/ef2xyb33.aspx I hope it helps, regards Ayhan im glad for this sample codes you have shared..but with my limited understanding of the language(vb.net) i would like to ask some questions such as where am i suppose to inser ...Show All
Marek Istvanek Control Arrays
I have a form with tabControl that has 5 pages. All the pages will have same controls. Is there a way i can define the controls on each page as an array, so that i don't have to access them by name such as txtName1.text, txtAddress1.text . I would like to access the controls in a loop as txtName.text (arrayindex), txtAddress.text(arrayindex). Thanks You are probably from VB6 :)! leave that old style and adopt the .Net way: This post must help you: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=822110&SiteID=1 Best Regards, This is most easily done through a UserControl. Add one to your project and rename it from "UserControl1" to "Page". Add the controls that you now place on ...Show All
SteveMcD how to call value of one form to another form
Hi I am a new bie to c# i am designing a c# window application.i have a login form. so how can i access thin login name or login id in all other forms. as their is nothing called as session or cache in windows applicaton. please suggest a suitable solutions. Waiting for the reply Thanking you if possible can u send me some code so that i can do it properly i am not able to do it... please help me if u can.. Thanking you well to make life easier, if you are going to be reusing the value on various classes, I would suggest to use a static class and set/get values from here. public static class Session { private static int loginID = 0; public static int ...Show All
Amimoller Writing event in Datagridviewcombobox?
Hi guys, Greetings! I'm creating a datagridview with a combobox column, is there anyway that I can write an event everytime the user choose from the combobox list and when lost focus on it I can control the value to set on the next column like if the user choose from the list as "Chocolates" I can set the value on the next column as "PCS" these values where from the table. I appreciate any help you can give to me. Thanks, Thank you for the reply guys. How about I have two combobox in my datagrid where the first one is the parent and the second one is the child, where if the user picks item on the parent it will enlist items on its child depending on th ...Show All
yuchuan checkbox control passing null value in datagridview
I have a checkbox in a datagridview and it is passing a null value instead of a false/0 when user doesn't click on it. How can I change it, so it passes a value. I already tried passing values explicityly through the bounddatacolumn properties in the datagridview... try DataGridViewCheckBoxColumn.ThreeState = false Have you modified the DataGridViewCheckBoxCell.ThreeState property Unfortunately none of the solutions suggested worked. Here is what worked for me: The value passed is not even null. there fore I had to convert to a string and then compare its length.. private void DGView_RowValidating(object sender, DataGridViewCellCancelEventArgs e) { int RowEdited = e.RowIndex; ...Show All
ReLoad Use Both Windows Installer and ClickOnce
From this link http://msdn2.microsoft.com/en-us/library/ms973805.aspx#clickoncevsinstaller_topic8 , I read the following, But I do not know steps/where to to create an Inifile. Please help me to create it . Thanks Use Both Windows Installer and ClickOnce Yes, that's right! You heard me correctly. Now that I've built a case for how different these two technologies are in their implementation, I am going to shake up your world by telling how you can use them together. Windows Installer provides advanced capabilities for interacting with the user during an installation. Oftentimes, this is a critical step in the deployment process. The ability of an installation to interrogate the target system to ensure that it meets the minimum req ...Show All
Zadoras Code generation for property 'Collection' failed.
I am getting a very annoying message from VS2005 – It started happening (I think) after I installed SP1. I have a UserControl that consists of other UserControls. My project compiles fine but when I try to change anything in the designer I get a message box that appears 10 or so times and appears to occur when attempting to save the UserControl class file. Code generation for property 'Users' failed. Error was: 'Type 'System.Windows.Forms.CurrencyManager' in Assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.' The property is on the top level UserControl that it is referring to is a generic IBindingList implementation and is marked as [Serializable()] an ...Show All
