Skip to content

Windows Forms

Desktop and Windows Forms development

This category can be followed from the open social web via the handle windows-forms@forum.codeproject.com

2.1k Topics 7.1k Posts
  • 0 Votes
    4 Posts
    3 Views
    M
    First of all, don't do this! Second, much easier and better is to write your application from begining to the end. Use SQL Server instead of MS Access database. You'll find many examples on CP knowledge base (Articles).
  • 0 Votes
    4 Posts
    3 Views
    L
    Good catch. Use the best guess
  • Winforms Html Editor

    csharp html wpf winforms com
    4
    0 Votes
    4 Posts
    2 Views
    D
    You have two choices if you want to continue to use HTML. 1) Use the nightmare that is CSS positioning. 2) Rewrite the HTML spec yourself and write a parsing and rendering engine to use your new spec. Other than that, we have no idea what you're using HTML for and what your app does, so it's pretty much impossible to suggest any other methods. A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • How to detect mouse over & out on win form title bar

    csharp help tutorial
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Data Binding to an Object that may be Read Only

    wpf wcf question
    6
    0 Votes
    6 Posts
    7 Views
    L
    Simon Bridge wrote: Turns out, there are CancelEdit() and EndEdit() methods on the BindingSource object itself. Not exactly where one would expect them, but such things happen.. Simon Bridge wrote: this can cause upward of 50 records being locked at one time ..with bigger implications than expected. Simon Bridge wrote: My best guess is that the Begin-End/Cancel edit semantics are more closely coupled with the DataRow and DataGridView components. Every "Forms"-controls is in edit-mode as long as it has the input-focus. It would sound more logical that "editing" would end as soon as the control is disposed of. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
  • 0 Votes
    8 Posts
    5 Views
    S
    Hi, One other (slightly heavy handed) possibility is to override the Windows Procedure in your form. You can then intercept all the windows messages it receives, and filter down to the mouse events. eg: public partial class Form1 : Form { public Form1() { InitializeComponent(); } protected override void WndProc(ref Message m) { base.WndProc(ref m); } } You can get an enum containing all the windows message constants here: [^]
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Windows Form Designer code and importing old projects

    help visual-studio question
    2
    0 Votes
    2 Posts
    3 Views
    M
    The article at this link will help you move the Windows Form Designer generated code to a separate .Designer.vb file for each form in your project. I don't think, however, that will solve your problem with initializing me.name. My programs all have code to initialize me.name without an error. I experimented and found that if my code contained a CONST declaration similar to the following declaration, I get the same error as you do. CONST name as string="Cause an error" Because of this, I think you have a variable, Sub or Function (maybe a CONST) in your code that is called "name". If so, change it to something else like "thename" and see what happens.
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    2 Posts
    3 Views
    S
    If you want to deploy a standalone application and database also it would be better to use an embedded database. For example: SQLite or SQL Server Compact Edition. In this case database engine is represented by set of assemblies. So you can easy deploy them and database file with your app.
  • 0 Votes
    5 Posts
    2 Views
    P
    How are you adding a new record? What is your modem of access? Textbox? Grid? Need more explicit details to guide you in the right direction.
  • parent/child bindingsource save on new row does not work

    database wpf wcf design help
    2
    0 Votes
    2 Posts
    4 Views
    P
    Actually, I solved this in quite an odd manner. I added a textbox for the primary key that was linked (bound) to the parent datasource. This solved the add new. Why the child could not aquire a key value is beyond me. I simply hid the textbox by placing it behind another control. Oh, that reminds me. You cannot set the visibility to false and the key still add. Again, another thing that eludes me entirely. What does visibility have to do with it? I could not find any documentation that linked the visible status to the enabled status, but ah well. Problem was solved.
  • Controls Opacity

    csharp help tutorial question
    7
    0 Votes
    7 Posts
    2 Views
    L
    Es geht nicht nur um Amerika. Hier im Forum akzeptieren wir Englisch als den größten gemeinsamen Nenner. For consistency's sake, we keep the forums English and use Google Translate for in- and output, if necessary. Ciao, luker
  • Wix based installer does not execute custom action on upgrade

    help
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • WindowFromDC

    question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Currency formatting

    question csharp
    2
    0 Votes
    2 Posts
    2 Views
    L
    Are you using databinding to get the value in there, or putting in the value manually? With databinding, it'd be using the FormatString[^] property of the binding; textBox1.DataBindings.Add(new Binding( "Text", // the property of the textbox that we wanna bind Properties.Settings.Default, // the object to bind to, this case "Settings" "ConnectionString", // the property of that object to bind to true)); textBox1.Databinding[0].FormatString = "C"; Alternatively, you could keep the value in a private variable, set it when the user is done editing, and update with a formatted version when the focus is lost. A description of the markup can be found here[^]. If the subject is "new", MSDN has an introduction here[^]. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • .bat execution Or something else?

    windows-admin performance question
    4
    0 Votes
    4 Posts
    3 Views
    Richard Andrew x64R
    Put this into your batch file: for %%a in (*.reg) do regedit.exe /s %%a That should merge all files that end with ".reg". The difficult we do right away... ...the impossible takes slightly longer.
  • 0 Votes
    2 Posts
    4 Views
    D
    I find your question confusing, because I can't recall having seen a single Windows Forms control where the Margin settings actually produce any effect. I've always had to reach for Padding instead. But this does lead to just a quick suggestion: try to use padding instead, and let us know if that works.
  • 0 Votes
    2 Posts
    3 Views
    B
    You paid big $ for Infragistics; why not use their support forums for this type of question. I'd try and help, but I don't use Infragistics controls. best, Bill ~ Confused by Windows 8 ? This may help: [^] !