Software Development Network Logo
  • Audio and Video
  • IE Development
  • Microsoft ISV
  • Visual C#
  • .NET Development
  • VS Team System
  • Visual C++
  • Game Technologies
  • SQL Server
  • Windows Vista
  • Smart Devicet
  • Visual Basic
  • Visual FoxPro
  • SharePoint Products
  • Visual Studio

Software Development Network >> Windows Forms

Windows Forms

New Question

reusable menus
Threading Problem
Control dynamically added to panel is not generating events
Problems modifying context menu on the fly
minimize, maximize, and close button image...
Delete a row programmatically in DataGridView
Unable to maintain Viewstate when child controls events are fired
certificate needed for Intranet Clickonce?
Change the default install directory
how to add value in combobox and checkedlistbox

Top Answerers

vbnetdiscuss
dsula
Nkenta
Nallasivan
Eeraj
Jon Watte
Animatrix
MMCompton
Helge Norvang
xird
sitemap
Only Title

Answer Questions

  • Kira_26 How to get the date form the datetimepicker to textbox

    Hi I have a datetimepicker control in windows form (VB.net or VS 2005). and a textbox control. My question: When select the date from the datetimepicker the selected date should be display in the textbox. Advance thanks private void dateTimePicker1_ValueChanged( object sender, EventArgs e) { DateTime date = this .dateTimePicker1.Value; this .textBox1.Text = date.ToString( "yyyy-mm-dd" ); } Hi I am using VB.net or VS 2005 and found the solution as follows Datetimepicker1.Format = DateTimePickerFormat.Custom Datetimepicker1.CustomFormat = "yyyy-MM-dd" Textbox1.Text = Datetimepicker1.Value The above works fine. I have different question now. The forma ...Show All

  • Dan Lukinykh Formatting Rows in Datagrid based on data in the coresponding row of datatable

    I want to format Rows in my Datagrid based on data in the coresponding row of its datatable (including columns in the datatable which are not displayed in the Grid). I have set up a DataGridTextBoxColumn class and it works. My problem is in the eventhandler that decides which colours to use I have the following code dgrid.CurrentRowIndex = e.Row 'select the row of the datagrid that is being formatted 'Now get the coresponding row in the source datatable Dim bm As BindingManagerBase = dgrid.BindingContext(dgrid.DataSource, dgrid.DataMember) Dim dr As DataRow = CType (bm.Current, DataRowView).Row 'now based on data in the row of the datatable (not necessarily displayed in the datagrid) format the row If dr.It ...Show All

  • 黃泓量 Jeremy Wong How can make one cells value changed with other cell value same time in DataGridView ?

    In DataGridView control , there are more than 3 cell in a row, like int i = invoiceDetailsDataGridView.CurrentCell.RowIndex; DataGridViewRow row = invoiceDetailsDataGridView.Rows ; row.Cells .Value = Convert.ToInt32(row.Cells[3].Value) * Convert.ToDecimal(row.Cells[4].Value) - Convert.ToDecimal(row.Cells[5].Value); how can i make the Cell .value changed with the Cell[3].value changing same time i can make Cell .value changed by leave the current cell (Cell[3]) and click other cell of the DataGridView. I want all the values changed at same time with out exit the current editing. I searched many times in this forum, but didn't find any advice worked. I tried a lot events of DataGridView to make ...Show All

  • Jpmon1 ListBox Problem

    Hi All: i hope to help me. i have a List Box which i fill it by the DataSource. when i try to set the SelectedValue, i got this message: "Undefined Value" and i cant set the selected value. but if i put a break point on the line which set the selected value and enter on the ListBox items by the QuickWatch, then close the Quickwatch, i get the true selected value and the ListBox working fine. is there anyone have an idea Thanks very Maybe you can implement the Format event to handle the null value in the data source. And make sure that the selectedvalue can be changed to string value. Hi all: thanks for your help. i think this was a part of the problem. but it solved now. thanks for you Would yo ...Show All

  • gwong685 String Collection Editor error: "Constructor on type 'System.String' not found"

    VS 2k5, 2.0.50727. Using a PropertyGrid to try and edit an object that has a collection of strings. I'm trying to get this to work, but I'm having absolutely no luck. There's tons of people who are having the same problem, and most questions are answered with the same solution; however this solution does not work for me. I've created a sample program that replicates the error. To get this error, create a Windows Form app in C#. Add the following class to the project : public sealed class StringCollectionFailure { private StringCollection fail = new StringCollection (); private string name = string . Empty; public string Name { get { return name; } set { name = value ; } } public St ...Show All

  • Dimitri Clement Databinding question

    I have a table that is a child of a parent table. Meaning the child table has a column containing the ID of the parent. I'd like to know if its possible via bindingSource to be able to get information of the parent via the ID in the child table without programming anything. I know that a parent-child is possible via bindingsource pointing on the relation. but i'd like to do the reverse. getting information of the parent with an ID present in the child table. Thanks, Getting information of the parent with an ID present in the child table maybe can achieved by T-SQL. SELECT ParentTbl.* FROM ParentTbl inner join ChildTbl on ParentTbl.ID=ChildTbl.ID WHERE ChildID = i was wondering if it could ...Show All

  • dhoops How can I draw a circle (ellipsis) at design time ?

    How can I draw a circle (ellipsis) at design time In Delphi and VB6 there is this option. What about vs 2005 Add a new class to your project, paste the code shown below. Build. Drop an Ellipse from the top of the toolbox to your form. using System; using System.Drawing; using System.Windows.Forms; public class Ellipse : Panel { protected override void OnPaint(PaintEventArgs e) { e.Graphics.FillEllipse(new SolidBrush(this.ForeColor), new Rectangle(0, 0, this.Width, this.Height)); base.OnPaint(e); } } I think only nobugz really understood my question (all the other solutions are runtime solutions, not design-time.....). I want only to be able to drop and adjust an eclipse (in fact a lot o ...Show All

  • Laurent Kempé print panel

    How can I print a panel in windows form which include many other controls regards Isn't there a printpage dialog in the toolbox Try it. How more you try, how better you get You can draw the panel into a bitmap, then draw the bitmap onto the paper. Something like this: Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim bmp As New Bitmap(Panel1.Width, Panel1.Height) Panel1.DrawToBitmap(bmp, New Rectangle(0, 0, Panel1.Width, Panel1.Height)) e.Graphics.DrawImage(bmp, 0, 0) End Sub Keep in mind the DrawToBitmap function has some caveats. Caveats th ...Show All

  • sagepe binding a key to a button

    Hello again everyone, Is it possible to bind a key to a button in C# For example in my windows application whenever I press the "left" key buttonLeft will behave like it is pushed. I tried it but cannot achieve. Also I tried to add the keyDown and keyPressed event handlers to my main form but nothing happens when I press a key. Easy : void moveLeft() { this.Left += -11; } void moveRight() { this.Left += 11; } void moveUp() { this.Top += -11; } void moveDown() { this.Top += 11; } private void Form1_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Left: moveLeft(); break; c ...Show All

  • Agostino Marottoli Dataset

    How to navigate through the relational dataset in vs 2003 and How to update and inserte into parent table from in the textbox there id did't bind in textbox (auto increment) At the same time how to update and inserte into child table from in the datagrid there id didn't bind in datagrid similarly how to delete both parant and child table corresponding datarows Please help me. I don't quait catch your mean very much. If you want to konw more thing about ado.net.I hope the articles below will help you. http://www.functionx.com/vbnet/databases/Lesson04.htm http://www.vbdotnetheaven.com/Uploadfile/ecabral/InsertMaster-DetailDataVB11072005065614AM/InsertMaster-DetailDataVB.aspx AJaidas: I apologi ...Show All

  • m.schlestein Threading, Binding

    Could someone tells me how can I update a List (of objects) from thread other then control's thread. I have a DataGridView bound to the list and when I update the list from other thread I got 'InvalidOperationException': Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on Regards, Vasil The code is very trivial. From other thread I do this: MyObjectList.Add(New MyObject) So, I update list from other thread and exception comes up. Maybe I should do this update using Invoke method on DataGridView Hi. I've got a solution to update dataobjects/databound controls in multi-threaded environments. My threads fir ...Show All

  • grsgrs Tab Controll

    I hope this is in the right area. If I have a set of tabs on a page, and one of those tabs, has a set of tabs displayed on it. is there a way that I can make one certain sub tab the default tab, so that when the partent tab is clicked, it will be the tab displayed by default The way it currently is, if the tab has not been selected, it will display the first tab, but if a tab has been previously selected, then it will come back to that tab when the parent tab is selected again. Hope that made sense. Thanks Tom Let's suppose you have two TabControl controls t1 and t2 where t1 has 2 TabPage controls p1 and p2, t2 is in p2 and has four pages p3, p4 , p5, p6. Now if you want sa ...Show All

  • bishoycom Problem with startup form.

    Hi, I have a problem in my project. ie.. In my project I've 4 forms And its a windows Appln. When i set Form 3 as startup form, And after clicking F5, It will shows me the 1st form as startup form. What could be the reson Please send me a solution. Im using Microsoft visualstudio 2005 VS 2005 Hi, Are you developing in VS Express edition or VS 2005 Bhanu. ...Show All

  • rpreston How can I change the size of Mouse pointer from csharp code?

    Hi All, Please let me know ,how can I change the size of Mouse pointer.I know there are some functions some where in a dll.But cant fifure out . Thanks in Advance. Joy Hi, Thanks for the explanation. Is there any method to does this programmatically Is it possible to make these changes through programmatically If so what is the method need to use.. Thanks for your time. Hi Joy, You can't enlarge a cursor, you just select another cursor that is made from a bigger image. Windows keeps a variety of cursors in various sizes in the c:\windows\cursors folder. The Mouse applet in Control Panel defines several cursor schemes. You can find out what cursors each scheme uses by reading the HKEY_LOCAL_MACH ...Show All

  • MMMalik Use Selected Property

    I added a row to the DGV. What are the commands for moving Focus to the new row If I want to move focus to another row in the DGV what must I do I'm using vb.net primarily and I also know C#. It is just simple: // C# code: YourDataGridView.Rows[rowindex].Selected = true; Hi Matty, Your recommended "Current cell" property is helpful for me. It's quite working and helpful for me. Can you check the following "Thread" which is related to my problem. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2710215&SiteID=1 My datagridview calculations are after "Cell-Validated" event and moreover the column index number i ...Show All

192021222324252627282930313233343536

©2008 Software Development Network

powered by phorum