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
    6 Posts
    3 Views
    L
    As far as I know, UI elements are attached to the process they're created on and cannot be transferred 'on the fly' to a different process. The only exception is that you can use the SetParent Windows API to show a process's main window inside another process's window. I have achieved this with little success. I don't think you can use this technique with controls though.
  • windows datagrid drill down returns relation name [modified]

    question
    9
    0 Votes
    9 Posts
    4 Views
    D
    I know. There's also no way to make the DataGrid show the child records. That's why I said what I did. He either has to roll his own or use a third party datagrid to do this. A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    12 Posts
    3 Views
    Sander RosselS
    How is ignoring encapsulation sounding good? :~ It's an OO world.
  • vb.net textspeaker

    csharp design tutorial question
    2
    0 Votes
    2 Posts
    2 Views
    D
    Have a look here[^]. Not the highest rated article around but should get you started. Dave Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon) BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
  • 0 Votes
    2 Posts
    2 Views
    T
    For that you need to create custom paper size in your printer HOW TO: Create a Custom Paper Size in Windows NT 4.0 using Access 2000[^] How to customize papersize in crystal report?[^] Here the answer for how to change paper size at runtime. Crystal report page size @ run time[^] thatraja **My Tip/Tricks My Dad had a Heart Attack on this day so don't... **
  • Set DataGridView cell value and add a new row

    question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Secondhand comp BIOS disk

    question help
    10
    0 Votes
    10 Posts
    6 Views
    T
    thank YOU for leaving I cannot remember: What did I before google?
  • 0 Votes
    3 Posts
    3 Views
    N
    In C#.net You should handle data error event of the datagridview private void grdGuestServiceDetail_DataError(object sender, DataGridViewDataErrorEventArgs e) { if(e.Context== (DataGridViewDataErrorContexts.Formatting) || e.Context==(DataGridViewDataErrorContexts.PreferredSize)) { e.ThrowException = false; } } and In VB.net Private Sub DataGridView_DataError(ByVal sender As Object, ByVal e As DataGridViewDataErrorEventArgs) If (e.Context _ = (DataGridViewDataErrorContexts.Formatting Or DataGridViewDataErrorContexts.PreferredSize)) Then e.ThrowException = false End If
  • 0 Votes
    3 Posts
    3 Views
    L
    This was quite a while ago :) I finished the project but I have no idea what kind of workaround was required... At my current project we use Janus GridEx instead of the standard WinForms DataGrid(View) which is pretty neat. http://www.janusys.com/controls/
  • 0 Votes
    5 Posts
    4 Views
    L
    Use AppDomain.CurrentDomain.BaseDirectory
  • Only one Exe at an instance

    c++ winforms tutorial question
    3
    0 Votes
    3 Posts
    3 Views
    L
    Technically speaking, you cannot prevent a second instance from coming up, but you can code your app in such a way that it detects if an instance is already running and pass on the command-line arguments and then exit. There are many approaches to this, one is to use a Mutex and the other is to use the System.Diagnostics.Process class to check if the process is already running.
  • Windows 7 doest launch application on startup

    csharp windows-admin question
    15
    0 Votes
    15 Posts
    3 Views
    X
    Dave Kreskowiak wrote: What does this mean exactly? To make changes in network adapter settings Dave Kreskowiak wrote: Are you changing the IP of the workstation?? Why would you do this outside of changing the network the machine is on? This is never done on an application basis. its for my home pc and app is kind of parental control :) TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN% R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> ----------------------------------------------- 128 bit encrypted signature, crack if you can
  • 0 Votes
    3 Posts
    4 Views
    L
    johnbMA wrote: What’s the best way to proceed with this? Search MSDN; came across this[^] yesterday, looks similar to what you're trying to achieve. johnbMA wrote: How big of a PIA/whale am I ultimately tackling here? There aren't many article's on CP on the subject. I are Troll :suss:
  • Remote Desktop Label Printing

    csharp sysadmin question
    2
    0 Votes
    2 Posts
    3 Views
    M
    Probably the easiest way to do this would be to install the printer driver on his machine (while making sure that he is logged in to the office, so the printer is visible), then sending the file as raw data to the printer. Microsoft has a web page dedicated to doing this, but it is in C# http://support.microsoft.com/kb/322091[^]
  • Localization and form size [modified]

    graphics help question
    4
    0 Votes
    4 Posts
    2 Views
    R
    I've noticed one problem with the code snippet. System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("cultureCode"); Looks like it should be System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(cultureCode); Also the way I've handled globalisation is by using resource files and letting the system's culture determine which resource file to use. You might want to Read these MSDN articles "You get that on the big jobs."
  • Running SWF file from Windows Forms

    database winforms question
    6
    0 Votes
    6 Posts
    3 Views
    D
    Nope, you've already done it all. A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • listview alternative

    csharp algorithms question
    5
    0 Votes
    5 Posts
    4 Views
    G
    Check out ObjectListView. It takes some time to get used to, but overall it's much more powerful than a standard ListView. http://objectlistview.sourceforge.net/cs/index.html[^] -Greg
  • how to limit the number of winform objects to one

    tutorial
    6
    0 Votes
    6 Posts
    6 Views
    M
    See my answer (Solution 2) to this question How to open only one instance of class not more[^]. It's exactly what you're looking for. Cheers!
  • App Modal Dialogs + Desktop

    question
    5
    0 Votes
    5 Posts
    3 Views
    _
    That's interesting. As I experiment with different UI actions, I am starting to get the impression that it is not just any app modal dialog that causes the issue; rather, I think the dialog has to be an Office app modal dialog. In fact, the problem may not be the dialog per se, but may tie back to OLE, embedded documents, and such. The infrastructure that those features rely on is pretty antiquated and was developed during a time when all sorts of app-level scenarios were capable to locking up the whole Windows GUI (i.e. the time of "cooperative multitasking".) Relatedly, this may not be a Windows 7 issue so much as it is an issue that arises when doing advanced, cross-product things in Office.