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

Software Development Network >> Windows Forms

Windows Forms

New Question

adding 10,000 rows into a DataGridView takes 10 seconds
setup project
Migrating application from Access/SQL to C#/SQL - Combo box issue
How to update UI thread from worker thread
Move borderless Form problem
databinding and custom controls
How to iterate through Windows Forms list box
Mouse Click Event
Clickonce from CD
Detect .NET Framework

Top Answerers

Roman Nurik
BenMo
watch is
Dvlnblk
Al-Arabi
RyanB88
Lars E.Nes
MaliciousGeek
Edentheguy
MagedSalah
Extensible Markup Language (
Only Title

Answer Questions

  • yuryvn Is it possible to pass the results of a databind to a textbox control?

    Hello, I have the following databinding that pulls data from a SQL 7.0 server database... txtComments.DataBindings.Add("Text"), DS, "tblTable.Comments") I have an Outlook Module that I would like to send the comments from my txtComments control into the body of an email as such: oComposeEmail.body = frmMain.txtComments.text The problem that I am facing is that my textbox control, txtComments I can see is populated with data on my form, but when I go to pass the .text properties to my email function, it is empty. I have tried, txtComments.Text = txtComments.DataBindings.Add("Text"), DS, "tblTable.Comments").ToString The value of txtComments.Text shows as "" wh ...Show All

  • newbie911 caller ID c#.net

    hi developers... i want to do a windows form that showing caller id.. i ha ve a external modem which support caller ID so who can show me a way or example code I would say that as that's a non standard thing for a modem to do, you need to look into the people who created the modem, to see if the caller ID info is being passed to the PC from the modem at all. Or you could just listen to the serial port and see if there's anything there. You can find serial port code at www.codeproject.com , in the articles section. The exact commands you have to send to the modem and the response it gives depends on its chipset. The commands shown in this webpage may work on yours. Try it out with Hyper ...Show All

  • Tom Janssen Continue event processing after a prompt within the Validating event handler

    I have many controls visible simultaneously on my Windows Form. One of them is an "editor," and when the user tries to leave that control by clicking on another control, I want to prompt the user to save their editing session, with a "Yes/No/Cancel" prompt. If the user clicks "Yes" or "No", then (after saving if they clicked "Yes"), the original click event should be processed. if they click "Cancel," the user should remain in the original "editor" control. To cancel, I just set the Validating event handler's CancelEventArgs argument's Cancel property to true (i.e., in C#: e.Cancel = true; ). However, displaying the MessageBox prompt in the Validating event inter ...Show All

  • Foxer removing ApplicationExit event handlers

    In the help : Application.ApplicationExit Event Because this is a static event, you must detach any event handlers attached to this event in the ApplicationExit event handler itself. If you do not detach these handlers, they will remain attached to the event and continue to consume memory. so i have Application.ApplicationExit += new EventHandler( Application_ApplicationExit ); and in Application_ApplicationExit Application.ApplicationExit -= Application_ApplicationExit ; is that right Hi, Wang Chi wrote: To detach a event handler, it should be "Application.ApplicationExit -= new EventHandler(Application_ApplicationExit");" Application.ApplicationExit -= new Ev ...Show All

  • SimonS_ modal form will not close

    I'm using .NET 2.0 on the PC platform, and I am experiencing the exact same problem. In the example code that follows, note that I compiled the application to show the console (in addition to the windows form), so I can see the text produced by System.Console.WriteLine() statements. [Before jumping to any conclusions, note that I can compile the application without console mode support and the problem with forms hanging when launched with ShowDialog() does not go away; i.e., showing a console is not the problem here.] I do the following to launch a form: MyFormType form = new MyFormType(); form.ShowDialog(); System.Console.WriteLine("Back from ShowDialog()"); form.Dispose(); Meanwhile, in the absolute ...Show All

  • VBE_programmer 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); } } override the Paint event of control on which you want to draw it, you can do it with form, Panel etc any control you need and just put this code in that: protected override void OnP ...Show All

  • hazz getting ComboBox to Open MyPictures

    I'v been trying to get a ComboBox to open My Pictures Folder so a image can be Selected...I was woundering if someone could help me out with this issue... Code: private void pComboBox( object sender, System. EventArgs e) { OpenFileDialog dlg = new OpenFileDialog (); dlg.Filter = "MyPictures(*.jpg)" + "|*.png|All Files (*.*)|*.*" ; dlg.InitialDirectory = MyPictures.DefaultDir; try { if (dlg.ShowDialog() == DialogResult .OK) { _MyPictures.Open(dlg.FileName); } } catch ( Exception ) { MessageBox .Show( "Unable to open " + "album\n" + dlg.FileName, "Open Album Error" , MessageBoxButtons .OK, MessageBoxIcon .Error); } } } ...Show All

  • xgene Catch access to sqlserver database

    I have a web service that logs an error to a sqlserver database. When I use the service outside the catch (in a win app) it works fine. But, when I have an exception and try to call from within the catch, the service returns a failure and does not log the error in the database. Does anyone know why the second web service call won't log the error. //this error is logged ErrorLogSvc. Service errSvc1 = new ErrorLogSvc. Service (); errSvc1.InsertSqlError( cnnstring, "" , "Test error message." , "" , "" , "test" ); try { cnn.Open(); // I force this sql to fail and send an exception cmd.ExecuteNonQuery(); return true ; } catch ( Ex ...Show All

  • atec seting date to Null

    The scenario is a textbox bound to a dateTime column in a datatable in a dataset. When the user enters a normal date, everything works fine. But if the user selects the date and clicks the delete key to remove the date, the system restores the previous date when the focus is moved to another control. I have tried forcing a null date using ds.myTable(index).Birthday = Nothing Checking the table immediatly afterwards shows a value of #12:00:00 am# which is not Null and it is not a valid date either. SQL sees that as 01/01/0001 12:00:00am which is not a valid smalldatetime. I have also tried setting nillable = true in the table .xml but that didn't seem to make any difference. What's going on here You may refer to ...Show All

  • Hamez access gridview cell value

    I always get the value of the cell to be empty although i have data in it. here is the code: Protected Sub GridView1_RowUpdating( ByVal sender As Object , ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim row As GridViewRow row = GridView1.Rows(e.RowIndex) Dim s = row.Cells(1).Text End Sub if that cell was a datakeyname then it works. I have the gridview binded to a datatable here is the code: Protected Sub bindData() Dim referenceLogic As New metricsRefBLL() GridView1.DataSource = referenceLogic.getMetricsRefByCycleAndRunType( "MFG" , "Reports" ) GridView1.DataBind() End Sub ...Show All

  • Ariel Mon add/remove program icon

    Hi All, Could someone tell me how to set the icon for it to display under control panel | add/remove programs My icon is coming properly in the application short cut and in the programs folder but not in the control panel. I know this is coming from the uninstall icon from registry, is there way we can set it up through click once Thanks. Sorry, ClickOnce does not support showing app customized icon in Add/Remove programs. App icon is shown in download progress UI and start menu shortcut. Add/Remove programs shows default setup icon for all ClickOnce apps. Regards, Sameer Is there any plan to include that as a part of next release or do we have manually use the registry key to mark the icon ...Show All

  • Mahesha Call a BindingNavigator Method

    I would like to activate an event associated with the BindingNavigator control. Specifically, I want to assign an access key to activate the MoveNext and MovePrevious buttons. However, I am missing a concept somwhere to get this to work. I've tried the following with errors: this .materialsBindingNavigator.MoveNextItem(); this .materialsBindingNavigator.MoveNextItem.Click += new EventHandler (MoveNextItem_Click); bindingNavigatorMoveNextItem_Click(); Thanks, cj Hi, Please go through the below link. It has sample code in it. Hope this helps. http://msdn2.microsoft.com/en-us/library/3y4w3c32.aspx thank you, bhanu. Yes, thanks: this .BindingSource.Position = this ...Show All

  • liujj_xujj Slow Form Rendering

    Whenever I have 100+ controls on a form, the render speed is very slow. Even on a fast machine, I can still see the controls being drawn on the screen. Is there a way to freeze the screen and unfreeze it after everything is finished render Or is it a problem with the CLR and nothing can be done All the controls are added via the designer. Suspend and Resume layout ARE being called. In fact, the slow down happened AFTER form.show(), at that point all controls should have been created. I suggest not to load that much controls, but apply some form paging logic. Display only controls that can be viewed then use a scrollbar or a spincontrol for navigation. Your pro ...Show All

  • Kybalion Drawing focus rectangle on the Image combobox

    Hi, I am working in vs 2005. I designed a custom image combobox control with ownerdrawnmode. I am overriding the protected method DrawItem as follows. Protected Overloads Overrides Sub OnDrawItem( ByVal e As DrawItemEventArgs) e.DrawBackground() e.DrawFocusRectangle() If e.Index < 0 Then e.Graphics.DrawString( Me .Text, e.Font, New SolidBrush(e.ForeColor), e.Bounds.Left + imgs.ImageSize.Width, e.Bounds.Top) Else If Me .Items(e.Index).GetType Is GetType (ImageComboItem) Then Dim item As ImageComboItem = CType ( Me .Items(e.Index), ImageComboItem) Dim forecolor As Color = Microsoft.VisualBasic.IIf(( Not (item.ForeColor = Color.FromKnownColor(KnownColor.Transparent)) ...Show All

  • CodeButcher Taskvision 2.0 documentation - learning the 3-tier architecture

    I am trying to lear the 3-tier architecture topics, using an example, in VB.NET (rather than C#) Taskvision ======= I downloaded Taskvision 2.0 (for VS 2005), it compiles and works.... but, is there any written documentation around explaining how is it built Tracker ===== On the other hand, there is the Infragistics Tracker. It has a 100 pages ebook, but,.... the system is full of references to external things (three Application blocks : the Exception Manager, the Updater, the Data Access, and WSE SP1 and SWE Setting tool, all of them from Microsoft) The system is written in VS 2003, framework 1.1.4322, so it crashes and produces hundreds of errors at compile time. I would prefer to use VS 2005 (is already ...Show All

242526272829303132333435363738394041

©2008 Software Development Network

powered by phorum