_Stoic's Q&A profile
Visual C# Hide Console Window in C# Console Application
Hi, How can I hide the console window in my Console Application project What worked for me was - Create a Windows Application in Visual Studio. Inside of the Program.cs instead of running a windows application/Form - instead just instantiate your class there. Normally after creating a Windows Application in VS your main method in the Program.cs file will look something like this: Application .EnableVisualStyles(); Application .SetCompatibleTextRenderingDefault( false ); Application .Run( new Form1()); I comment out that and in its place I put my class that I want to instantiate and run - like this: //Application.EnableVisualStyles(); //Application.S ...Show All
Audio and Video Development Regarding Set Property and Unset Property
Hi there My current understanding is : if any style attribute is set using script then it gets locked on that particular element ...till it is unlocked on that particular element....ie the style attributes are locked at element level. whereas for state attributes things are different. a) state:focused can be locked using one element and unlocked using other element(even that belonging to a different application) b) state : enabled and state:value can be locked by one element and unlocked using other element belonging to same application i.e. they are locked at application level. I have seen behaviour a). About b) I am not sure. Do these i.e. a) and b) look right to ya all. (a) is correct but (b) is ...Show All
.NET Development DirectoryEntry's CommitChanges() gives "The server is unwilling to process this request" 0x80072035
Hi, i am trying to do an AD DirectoryEntry.CommitChanges() to certain attributes of an object CN=user123,CN=Users,DC=domain,DC=com. when i do a CommitChanges() to certain attributes (such as badPasswordTime, badPwdCount, lastLogOff, lastLogOn, logonCount, objectCategory, samAccountType and userAccountControl) i get this exception "The server is unwilling to process this request" (0x80072035) can anyone tell me why this error might be coming i have a windows 2003 sp1 + iis6.0. if i browse thru msdn, all these attributes are said to have been set by the System. so is it that we cannot change these attributes set by the System Thanks yes. i agree with you. but in the AD, there is a concept called T ...Show All
Visual Studio September CTP: Display of <param> and <paramref>
Here are a couple observations about the way Sandcastle handles the <param> and <paramref> tags: ? In the VS2005 help style, the type is displayed next to the parameter in a rather odd manner. For example, /// <param name="data">Data passed in by the client.</param> is displayed as data System.Object Data passed in by the client. It would be nice if the type (in this case System.Object) was either: (1) not displayed; (2) displayed in the same manner as the Prototype help style; or (3) displayed in a different font. In the MSDN library help, the type is not displayed. ? In the Prototype help style, <paramref> elements are not rendered using a different font. I like the VS2005 s ...Show All
Smart Device Development Question Deploying CF 2.0
Hello If I use the NETCFSetupv2.msi to deploy the Framework it seems that the language dependend error files are not installed (like System_SR_DE.CAB or System_SR_ENU.CAB) Is this right Do i have to install this files manually Yes, error files are not installed by MSI to save space on devices. If you need them you can include these CABs with your installer and install them separately. ...Show All
.NET Development Can you push files onto a server in c#?
I am trying to upload a file using the HttpWebRequest class and the put command but I must admit I am a little new at it so I am not even sure if I am going about this the right way or not here is some code that I have written to try and get the file up to the server try { HttpWebRequest uploadRequest = ( HttpWebRequest ) WebRequest .Create(uploadUri + @"/" + fileName); uploadRequest.Method = WebRequestMethods . Http .Put; requestStream = uploadRequest.GetRequestStream(); fileStream = File .Open(fileName, FileMode .Open); byte [] buffer = new byte [1024]; int bytesRead; while ( true ) { bytesRead = fileStream.Read(buffer, 0, buffer.Length); if (bytesRead == 0) { break ; } ...Show All
.NET Development Problem retrieving Serialized Data
Actually, I'm serializing a Class (marked with [Serializable()] attribute) with a BinaryFormatter, but the problem is, when the thread that serializes the object is disposed I can not retrieve the Serialized data !! ... But right after Serialization I can simply retrieve the serialized graph !! ... And even when the program is disposed and spawned again, In case of calling BinaryFormatter.Deserialize(stream serializationStream) I'll get an instance of the serialized object but all of the properties are nulled !! ... I'm sure that I'm missing something ... !! Here's the Implantation of the BinaryFormatter : public static System.Runtime.Serialization.Formatters.Binary. BinaryFormatter bf = new System.Runtime.Serializati ...Show All
.NET Development Data View Controls...?
HI, Data Controls in ASP like [GridView,FormView,DetailView] display data from a database, SQL Server or Access, they display all the data in a tabuler format. If we want to access any specific row or cell from a database, how can it will be accomplished As I have a little knowledge in Classic ASP, we use Recordsets & to access data we do like rs(0) , rs(1) & rs(i) Well, now you will have to use ADO.NET..... It is quite similar to classic ASP.... for example: private static void ReadOrderData( string connectionString) { string queryString = "SELECT OrderID, CustomerID FROM dbo.Orders;"; using (SqlConnection connection = new SqlConnection( connectionString)) { SqlCommand co ...Show All
.NET Development problem with WCF and APP.config
Hello, I have a problem with WCF: I used the classic example from the VS 2005 Template: the solution with 2 projects 1. WCFServiceLibrary project for the service, which contains [ServiceContract()] public interface IService1 ... and public class service1 : IService1 { ... 2. my Host (console application) If I do not use an App.config file everything works fine: [CODE] static void Main(string[] args) { Uri adresse = new Uri("http://localhost:6666/demo"); ServiceHost sh = new ServiceHost(typeof(WCFServiceLibrary.service1), adresse); sh.AddServiceEndpoint(typeof(WCFServiceLibrary.IService1), new BasicHttpBinding(), adresse); sh.Open(); Console.WriteLine("press Return..."); Console.ReadLine(); sh.Close(); } [/CODE ...Show All
Visual Studio 2008 (Pre-release) Dragging forms around with mousedown
Just wondering - just looking at my code at the moment... I've got a login form to capture mouseclicks anywhere on the form surface and be able to drag it. I had to use the below to pass the window handle to the API function. Dim objWindowInteropHelper As WindowInteropHelper = New WindowInteropHelper(Window) ReleaseCapture() SendMessage(objWindowInteropHelper.Handle.ToInt32, WM_NCLBUTTONDOWN, HT_CAPTION, 0) Is this do-able within WPF itself Chris ...Show All
Visual C# Slow panel enable / disable
Hello, I have a panel with 3 groupbox's - groupbox 1 contains: 17 Labels and 12 Textbox's - groupbox 2 contains: 14 Labels, 1 Combobox and 13 Textbox's - groupbox 3 contains: 4 Labels and 4 Textbox's I need to enable/disable the panel so that all the input controls are enabled/disabled. Well this takes a lot of time, you can see that the disable starts from the top till the bottom. With enable i have the same effect. Is there a way to speed this up Maybe my method that I use is not the best, can you suggest me another Thanks. the 3 groupbox are the controls on the panel. So if i call panel.enable = false, all the controls on that panel will be disabled, in this case the 3 groupbox's with ...Show All
.NET Development Problem serialising interface arrays with BinaryFormatter.
I couldn't find any discussion of this problem anywhere on the tubes, so: If I use BinaryFormatter to serialise an array of an interface references, for example IDisposable[], any members that are value types will not be deserialised properly. The problem only seems to occur with interfaces that are defined in another assembly. Attached is an example program to demonstrate the problem. The final call to Deserialize() will fail. The interface doesn't have to be IDisposable, it can be any interface in another assembly, I just used that one to make the example simpler. I don't have a good workaround, unfortunately, since I can't seem to create a surrogate for an array type. Seems pretty fundamental. Has anyone else noticed this probl ...Show All
SQL Server partitioned views Explain Plan
Hello I created a partitioned view on my database db1 and It comes from the UNION ALL of 2 tables (I split 1 very big table in 2 smaller tables... Horizontal partition!!) that are on the same db1. When I query them I receive in the EXECUTION PLAN an Item called CONCATENATION of both input tables, This seems to be more expensive than using only one big table so partitioning the big one gets none sense.. I would like to know if this is normal and If I'm doing well with partitioning. Please see the script below: CREATE TABLE [dbo].[TREP_NOVEDADES_2006] ( [NMSEC_NOVEDAD] [numeric](12, 0) NOT NULL , [CDCONCEPTO] [varchar] (12) NOT NULL , [CDTIPO_VALOR] [char] (1), [CDPRECIO] [varchar] (12), [CDTIP_HECT_DTO_PAG] [varchar] (2), [FEG ...Show All
Windows Live Developer Forums Can not control virtual earth map in the invisible view?
I am using vc to develop a program for microsoft virtual earth map,when I use dialog to display the map I can control the map by calling javascript function in the html, but when I use a invisible view to load the map, it seems that it can load the map, but when use the same javascript function to control the map, I can not get the map,my program in dialog and in the view are almost the same,please tell me why or suggest a method to control the map in the invisible view. I appreciate your help. I'm not sure why you are hidding the map. I assume you are tring to get access to the functionlaity behind it. I suspect you may come across all sorts of problems if the map is not visible. The best way to hide the map is to set its ...Show All
Software Development for Windows Vista Install of Microsoft Pre-Release Software Microsoft .NET Framework 3.0 - September CTP
Hi I tried few times to install this from link: http://www.microsoft.com/downloads/details.aspx familyid=c6636e90-26e6-44e0-8780-5d3ccd3d94ed&displaylang=en but at the end of the setup I got this message: "setup could not download all of the necessary files. to attemp another download, click exit and then restart the setup." I restarted the setup a few times but still got the same message. what else I need to do Thnaks a lot, Dror Are you saving dotnetfx3setup.exe to your local computer or running it from the download link If you are running directly try downloading it and running the local copy. The RC 1 build can be found at http://www.microsoft.com/downloads/de ...Show All
