-
- MaskedTextbox and allowing only valid int input
by D-S
- 3 Replies
- Last post
by Zhi-Xin Ye - MSFT
- I¡¯m trying to setup a MaskedTextbox on a form to allow for only valid int input, but can¡¯t seem to get something that I¡¯m happy with. What I need is that the user enter something that¡¯s entirely numeric (no decimals or negative signs), a minimum of 1 digit and a max of 4 digits. I¡¯ve set the following properties: Mask=¡±0000¡±; ResetOnSpace=false; TextMaskFormat=MaskFormat.ExcludePromptAndLiterals;,
-
- CheckedListBox DataSource property
by Gil Strauss
- 3 Replies
- Last post
by Ken Tucker
- Hello
As mentioned in the documentation, it is not recomanded to used the DataSouce, DisplayMember and ValueMember properties. Does anyone have an idea why
Thanks,
Gil
-
- DataGridView Scrollbar
by Voldy
- 5 Replies
- Last post
by Jez Heaton
- Hi, I have a datagridview control on a form that contains lots of rows populated from an SQL database (done in code in a grid refresh subroutine). I have a timer control that updates the grid every 10 secs. The problem I have is that if I am in the process of scrolling down the grid and the timer event fires off a grid refresh, the grid resets the grid location and scrollbars. What I want to be ab
-
- Parent, child forms check if open or closed
by RainX
- 3 Replies
- Last post
by nobugz
- Hi all, I'm new to c# and currently working on a project containing mdi forms. This is how the project is layed out. Parent form is called Street_Index. This contians a menu strip which can open 2 different forms. * Street_Search * Office_Search Within the Street_search form there is a button that i click that returns the results in another form called Search_Results. Search Results contain
-
- Suddenly I'm getting this error: The form referred to itself during construction from a default instance
by Louise Boulton
- 4 Replies
- Last post
by Louise Boulton
- Hi,
I'm getting the error below when I try to run my project. It's never happened before, and I don't understand what's caused it.
Can anyone help please
Thanks,
Louise
System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: The form referred to itself during construction from a defaul
-
- datagridview - testing values of an unbound column
by dotolee
- 2 Replies
- Last post
by Zhi-Xin Ye - MSFT
- Hi there.
I have a datagridview that I populate via a table adapter and everything is working just fine. Now i'd like to give the user the option of:
selecting multiple records in the grid by checking a checkbox. this checkbox is available for each row of data and i created it by adding an unbound column.
What i'd like to do is enable a button on the same form only if one or more
-
- how to host different controls in the same column in DataGridView control
by iammadhu
- 2 Replies
- Last post
by claesp
- Hi,
I am trying to create a datagridview. And in one column i want to have different type of cells (hosting different editing controls). For example, in the same column first cell shall host a combo box control, second cell shall host a text box control, third cell shall host DateTime picker control, another with Colorpicker control, etc.
if i follow the host controls in windows fo
-
- Removing multiple items in a ListView "at the same time"
by SeeSharp
- 1 Replies
- Last post
by nobugz
- Hi all,
Suppose we have 5 items in the ListView: "Alpha", "Bravo", "Charlie", "Delta" and "Echo". When we execute RemoveAt(0) followed by another RemoveAt(0), the first two items got removed. If we execute RemoveAt(0) followed by RemoveAt(1), "Alpha" and "Charlie" got removed.
What I want to achieve is: I can multi
-
- How to lock a control on a design form
by Larry Smith
- 2 Replies
- Last post
by Larry Smith 999999
- Hi there,
I've created a design form at runtime using "System.ComponentModel.Design.DesignSurface" and cousins. I now want to lock individual controls on the form depending on conditions. I know I can do it this way:
TypeDescriptor.GetProperties(myControl)["Locked"].SetValue(myControl, true);
but this seems irregular. Is there a more mainstream way or is this it. Thank
-
- DataGridView ImageCell Description
by akin_l
- 2 Replies
- Last post
by Zhi-Xin Ye - MSFT
- Hi,
I have a dataGridView control on the form and it is not data bound. I
have an image cell(whenever required) which is needed to display
the image as a thumbnail. I want to display a description next to the
image. I have tried using the 'Description' property, but it doesnot
seem to work. I don't have an image column. I just create an image
cell when needed.
Thanks!
-
- Usefullness of any event
by Miyamoto M
- 10 Replies
- Last post
by Steve Py
- Hi all,
Visual Basic was released in the 1990's and immediately became hugely popular in corporate America because its new Event Driven design allowed programmers to deliver huge financial value to organizations.
Event D riven is a key concept there, it seems to me.
I have a theory today, as follows, for Windows Forms 2.0:
THE VALUE OF AN EVENT TO A PROGRAMMER IS USUALLY INVE
-
- column caption
by msksurfer
- 1 Replies
- Last post
by Ken Tucker
- i'm trying to use the column caption but it didn't work. i'm currently using microsoft visual studio .net 2003. i check the online tutorials and did the same, but the caption never turn up at the datagrid. can anyone advise me on this below is my codes. another issue is that, is it possible to change the colour of columns with using tablestyle
count = Db.Observation;
counter = 1;
-
- How do I reference a control's properties?
by Vhradice
- 8 Replies
- Last post
by Vhrasice
- I am new to VC++ but not to programming.
I am trying to change the Text property off a textbox when I click a button. However I cannot determine the proper syntax to reference the text field.
Form name - Form1
Textbox name - Textbox1
Button name - Button1
In Button1.Click I tried the following - all of which fail compile
Form1::Textbox1->Text = "Hello World" ; /* er
-
- Record Locking and Transactions in Strongly Typed Datasets
by SiN!
- 9 Replies
- Last post
by Rong-Chun Zhang - MSFT
- Hi,
I have a form with 4 tables displayed in different tabs, all coming from the same dataset. Here's part of the Form.Load event so you know what I mean:
Code Snippet Me.taPaymentsApplied.Fill(Me.DsPaymentProcessing.PAYMENT_APPLIED) Me.taNewPayment.Fill(Me.DsPaymentProcessing.PAYMENT, Me.txtCardID.Text) Me.taExistingPayment.Fill(Me.DsPaymentProcessing.EXISTING_PAYMENT, Me.txtCa
-
- hide and show a process???
by James0886
- 7 Replies
- Last post
by ecko007
- Hi all. How can i make a process (server.exe) hide and show with a button while is running thx in advance.
-
- TreeView Comtrol: Add buttons to nodes in TreeView control
by Frank0824
- 1 Replies
- Last post
by Zhi-Xin Ye - MSFT
- I am now using TreeView in my web page. I want to add some buttons next to some of the nodes in the treeview. The button should be aware of the value of its corresponding node in the tree.
Is there any good way of doing this Thanks!
-
- Access Denied Reading Registry
by everettj1
- 5 Replies
- Last post
by everettj1
- Hello. I have been searching everywhere for an answer, but can not find any information on this topic. My problem is that I built an application using the VB. NET 2005 VS compiler and writing my application using VB. NET 2005 (Framework 2.0) language/architecture and every time I try to read HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services key, I receive an Access Denied error. So my question
-
- How do I Find The Product Code?
by rbearry
- 1 Replies
- Last post
by David Guyer MSFT
- This is driving me crazy and it must be simple. I am trying to find the product code so I can author manifests for installing MSDE. How do I find product codes for things I want to install I must be missing something easy. Do we just make them up For example here is the product code for SqlExpress ProductCode="Microsoft.Sql.Server.Express.1.0"
-
- Menustrip reading XML
by artificer
- 4 Replies
- Last post
by steveareno
- Is there any way to bind the menustrip control to a XML file so it loads its items on runtime similar to the TreeView on ASP.NET
-
- Can we Add ListItem objects to ListBox ?
by ranadheer mac
- 8 Replies
- Last post
by Matthew Watson
- Dear friends
i have basic doubt that is
can we add ListItem's to ListBox (or) is ListItem's are only for ListView
any suggetions
Thanks
Ranadheer
-
- Using the Windows password in my application
by Kevin Tory
- 1 Replies
- Last post
by nobugz
- I have a WinForms C# application for which I currently have two methods of login - either the user enters their password when they log in, which I store in my SQL 2005 db encrypted, or I just let them in based on their windows login id.
In both cases I do not ask for a username, I get this from their Windows network login. What I would like to do is something that I have seen other applicat
-
- Bring to Front Form Problem
by Abou
- 5 Replies
- Last post
by nobugz
- Hello, I have the following problem: I have a main form that has some children forms which each one is shown like childForm1.Show(mainForm); It seems that i cannot bring the main form in front of a child when both of them are opened. Does it exist a way to achieve this Thanks in advance for any comments.
-
- How do I allow the user to enter a negative number in a column on a grid with validation?
by Coleby
- 2 Replies
- Last post
by Coleby
- This is my 1st C# VS proj and I'm having some difficulty validating data entered on a column.
HEre's the code.
if (dgExtents.Columns[e.ColumnIndex].Name == "Sequence" ) //number is currently < 300
{
dgExtents.Rows[e.RowIndex].ErrorText = "" ;
int newInteger;
if (dgExtents.Rows[e.RowIndex].IsNewRow) { return ; }
if (! int .TryParse(e.Formatted
-
- Programatically trigger keyboard shortcut
by flipdoubt
- 1 Replies
- Last post
by nobugz
- I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to programatically trigger this behavior in certain circumstances. Any ideas
-
- Dump controles to image /saving to image
by Yorthen
- 2 Replies
- Last post
by nobugz
- I have a SplitContainer with two custom controls in it, what I'd like to do is to dump the whole thing to an image, like if you take a screenshot and cut away all but the SplitContainer. I've read somewhere that you could do something like this by creating an image and the get an Graphics object from the image and let the controls draw on that. I understand that since the SplitContainer is a stand