Hi Jamal, I tried to mail you privately some days ago about my problems with Lbc, but maybe I didn't get your mail address correct. Since someone asked us to keep the discussion on the list, I guess it would be ok to do so anyway. Ok, here is what I have found until now: Apparently, the "invalid cast" exception is only thrown when the program is run from inside the debugging environment of VS (f5), not if you run without debugging (ctrl-f5) or if you run the exe file from explorer. I enclosed the whole thing in a try / catch statement to make sure I was handling the exception if it ever turned up, but it didn't. I was able to trace the exception to the complete() method. I then had some difficulty finding my way around the code of that method. However, one line did catch my attention: var frm: LbcForm = Form.ActiveForm I am definitly no JS expert, but it seems to me that you make that assignment before loading and showing the form, and thus before it has become active. I can't tell why it works in one situation and not in the other or if it has anything to do with the case at all. Maybe, if you could provide me with a debug version of the dll, perhaps I could track the exception down further. Hope this brings us nearer to a solution Best regards Bue -----Oprindelig meddelelse----- Fra: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] På vegne af Bue Vester-Andersen Sendt: 5. august 2011 16:49 Til: 'Jamal Mazrui'; programmingblind@xxxxxxxxxxxxx Emne: SV: Windows Forms layout - how to do it? Hi Jamal, Thanks for the reply. I will try what you have mentioned. I then suggest that we move the discussion off the list, so we don't make too much noice. I am still very interested in knowing how everybody else on the list is making a gui with a decent layout, Windows forms or not. You can't mean to tell me that you are all stuck with making command line driven console apps :-) Best regards Bue -----Oprindelig meddelelse----- Fra: Jamal Mazrui [mailto:empower@xxxxxxxxx] Sendt: 5. august 2011 15:59 Til: programmingblind@xxxxxxxxxxxxx Cc: bva_lists@xxxxxxxxxxxxxxxxxx Emne: Re: Windows Forms layout - how to do it? Hi, I use a text editor rather than Visual Studio for .NET development, so was hoping that someone else might have a solution to the problem you experienced compiling with Homer.NET. As its author, I would like to work with you to resolve the problem. If possible, please try the following and report yur results. I think there is a way that VS hosts a program that is under development, rather than launching that program to run independently. I am not sure, but think that is where the problem is arising. Can you compile the code and run it without this hosting scenario? For example, I vaguely recall that Control+F5 compiles, whereas F5 runs a program in a hosted mode. If compiling is successful, then try running the program outside of VS, or look for menu options on a project or build menu that allow you to run the program independently (not hosted for debugging, etc.). If that does not work, try compiling from the command line with the C# compiler, csc.exe. There is a VS Start Menu option for opening a console mode environment that sets appropriate paths to the command line compilers. You will need to reference assemblies as appropriate when calling the compiler. the batch files distributed with Homer.NET illustrate how this may be done. I realize that you may prefer to use VS for everything rather than a command-line compiler for some tasks. This would help us identify where the problem lies. Jamal On 8/5/2011 6:14 AM, Bue Vester-Andersen wrote: > Hi, > > I am wondering how you guys make a Windows forms user interface with a > decent layout. I am congenitally blind, and I have always found it a > great pain to make a layout that would work at all. > > - which controlls should be where on the form, and where should they > be docked? > > - What should be aligned with what? For instance, a text label and a > text box have different hights, so do you align to top bottom or middle? > > How do you ensure that each controll has room enough for its text - at > any time? What when you translate the text into another language? What > when the dialog is resized? > > Should I just switch to something completely different? WPF is not > terribly accessible, at least not with JAWS for Windows., which > doesn't support UI automation very well. > > I could continue until next christmas. Do you all have sighted persons > to scrutinize your forms layout when you change a single byte of code? > > I had hoped that I could use Layout by Code but no luck so far. The > thread about that seems to have dissolved into a discussion about to > IDE or not to IDE. > > Do any of you know about a layout engine that can solve at least some > of the problems? If not, can you point me to a tutorial on how to make > a good layout? The .net documentation is excelent if you know what you > want to achieve, but I guess that is part of the problem. I don't know > what my form is really supposed to look like, and I don't know when to > dock the controlls left right or center. > > Hope someone can help me. > > Best regards > Bue > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind