Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

winforms - Is there any way to display a Windows form BEFORE the "Startup" form is loaded in VB.NET? -


my company's main software package includes hefty configuration library loads on startup. config library includes mandatory settings which, if not supplied (via command line arguments), cause entire application exit.

this has never been issue our users, launch software via scripts have needed command line arguments supplied automatically. when debugging our software developers forget specify necessary arguments in visual studio's debug options; it's annoying greeted message config specification invalid -- missing required parameters x, y, , z -- shutting down (i'm paraphrasing, of course).

it's not big deal, annoyance. still, felt worthwhile throw little form make process little less painful; notifies user parameters missing , allows him/her specify values parameters directly on form, without having restart application.

my intentions (i think?), seems can't solution work. problem after i've launched our software missing settings, form pops , prompts me expected; after i've entered required parameters , it's time application "really" start, invalidoperationexception:

setcompatibletextrenderingdefault must called before first iwin32window object created in application.

i think understand what's going on here: vb.net project i'm working on doing "behind scenes"*:

sub main()     application.enablevisualstyles()     application.setcompatibletextrenderingdefault(false)     application.run(new mainform) end sub 

that call setcompatibletextrenderingdefault is, apparently, throwing exception because form created , displayed prior execution.

is there way around this? there perhaps more "proper" solution problem i'm not thinking of (i.e., should not trying collect user input via form @ all)?

*this best guess based on i've seen in c# winforms projects. strangely, unless i'm missing something, seems vb.net winforms projects hide developer.

do make sure have application framework option turned off , sub main selected starting method. make similar this:

sub main(byval args() string)     application.enablevisualstyles()     application.setcompatibletextrenderingdefault(false)     if args.length = 0         using dlg new optionsdialog             if dlg.showdialog <> dialogresult.ok return             '' use dlg result...         end using     end if     application.run(new mainform) end sub 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -