Answer Questions
sunsetandlabrea Visual C# Express edition and problems combining it with SQL Express Edition 2005
I have always been interested in programming but made a start in C# recently. I have been using Bob Tabor's videos to take a person from beginner to an RSS application (http://lab.msdn.microsoft.com/express/beginner/) . Everything has been fine so far until he started to mention SQL databases. To use this is apparently have to download SQL 2005 Express Edtion. However, I have a problem. SQL Express Edition only runs on frame ...Show All
Bondeson Tab question
Hello! I have one tab with the richtextbox control. I have a "New" button. What code should I add to the button, so when the user presses it, a new tabpage is added to the tabcontrol, and the richtextbox is added to the new tabpage. Matt Depending on what you are intending to do you may find it beneficial to do something like this: public class RichTextBoxTabPage: TabPage { public RichTe ...Show All
E_l_i Generic methods and warning CS0184: The given expression is never of the provided '%typename%') type
In the given example... public virtual type GetUser< type>() where type: class { if ( typeof ( type) is User) { // do something } string temp = typeof(type).FullName; if( temp.CompareTo( "User") == 0) { return _myUser as type; } throw new NotSupportedException( "Type is not supported"); } Why does the C# compiler generate the follow ...Show All
Armine Loading form in main form
I'm trying to create an application that has a main screen and when i push a button i would like to load a new form into the main screen, without opening a new screen. Every new screen i open would have to open in the main screen. I tried using a panel and adding this new form into the panel but i get ==> Top-level control cannot be added to a control. Is there anyone who knows a solution to my problem Greetz ...Show All
KrishnaSrikanth DBNull in datetimepicker
Compact Framework: I would know if this object supports DBNull value. How can I convert it Thx The DateTime class is a value type and cannot be set to null the same way that reference to a reference type can. This also affects how you can use DBNull. One way to determine if an instance of a DateTime has been set is to first set it to DateTime.MinValue and check against that value later as you would for null. When making a query ...Show All
DharmeshP command prompt return immediately when running console application
By default, a console C# app will hold the command-prompt until the app exits. Is there a setting in the .NET framework that will cause the command-prompt to return immediately This is sort of analogous to running a command in the background in unix by appending & to the command. sean_n wrote: when i run other apps from the same shell (win xp command prompt), i get the prompt back immediately. how do i make my C# app work ...Show All
Manu Singhal XmlTextReader - StackOverflow - Infinite loop
I get a StackOverflowException, caused by the while loop (my guess). Howcome this code enters an infinite loop There are two variants, one with a counter (Variant 2), that should exit the loop, and one without the counter (Variant 1). It seems to be very hard to debug this part of my program, because when I insert a breakpoint, then there will be displayed this informantion: " Function evaluation disabled because a previous function evaluatio ...Show All
Sianny Passing a ref to a SafeArray to c# .net component from MFC
I have a .Net component that passes a stringArray to a client program via an out parameter. This works fine from a .net client and I have successfully passed a SafeArray from MFC to a .net component as an in parameter. What seems to evade me is returning returning an array from a .net component via the CCW as an out parameter. Can anyone help regards Rob Robert Magowan wrote: I have a .Net c ...Show All
Zach Griswold 'Exclude Files From Project' - Beta 2
How do I 'Exclude Files From Project' in VS 2005 I have a solution that requires files to exists in the directory structure but not be compiled. Where has this functionality moved to Also, what happened to the 'Show All Files' option Regards, I am having the same problem with the same tools. please let me know if you find a work around That gave me the ' ...Show All
vtrepan Address bar - locked
my address bar will to type in the full name of a web site, but once complete it will not pull up the site, it stays on the main msn page. Like typing in www.miamidolphins.com - but while typing it will drop down and offer a list of sites, if i pick one of those I can go straight to the sight or choose from my favourites. but to actually type a new site name in the address bar and click go - it goes no where. how do I solve this i do have ...Show All
Evian_ Run .NET application without framework
is there any way to run an application with out the .net framework , for example in flash,,, u can make a sqf to be exe and the exe contains the flash player and the swf... so i was wondering if theres any way to insert in my application a framework obviusly not the full version... but i want an app to run without framework :( thx mig16 PJ. van de Sande i saw like 50 posts by you answering to this question. ...Show All
Kian01 type safe way of getting propertyInfo
As the subject implies i'm looking for a way of getting some propertyinfo and also methodinfo without relying Type.GetProperties. What i would like is something like this: PropertyInfo pi = propertyof( MyType.Name ); With c#2 is there a way of doing this. If not will a way be added in the future... Regards Lee Cheers thanks for the reply. No, there is no type-safe way of getti ...Show All
DB2Question Windows Service with Timer...
Hi there, how can I use a Timer-object in a windows service I tried the following (sort of pseudo-code): public MyService () { Timer T = new Timer() T.Interval = 1000; //1sec T.Start(); T.Tick += EventHandler( checkConnection ); }//Constructor public void checkConnection(...) { try { checkConnection(ip); this.T.Stop(); this.goToWork(); }//try catch { & ...Show All
bez_333 using as operator
I can use as opertator, for the objets that I created . From VS.NET 2003 documentation: The as operator is like a cast except that it yields null on conversion failure instead of raising an exception. More formally, an expression of the form: expression as type is equivalent to: expression is type (type)expression : (type)null except that expression is evaluated only once. Note that the as operator only performs reference conversi ...Show All
jrenton87 Writing entries to eventlog from asp.net!
Hi, I'm having trouble writing entries into the event log from asp.net (C#). Its giving me a security exception. How can I make this possible through code itself, i.e without manually changing any setting in iis or something like that. Thanks & Regards, Frenz You are probably having a problem registering the event source. This cannot be done by IIS applications because they do not have the registry ...Show All
