psc161's Q&A profile
Visual C# Two questions about Windows Services
Hi I have written a Windows service that sends me an e-mail every three seconds. At first, the e-mail contained the text "Hello". But then I wanted to change the text, so I stopped the service, uninstalled it, changed the source code so that the e-mail should contain the text "Hi there", compiled it and installed it again. But I still get "Hello" every three seconds. Even tried to reboot the computer. Another problem is that the e-mails don't arrive in real-time. They seem to queue up and get sent as a batch when I stop the service. So if I let the service run for a minute, nothing happens, but when I stop it, I suddenly get a whole lot of e-mails. Any help would be much appreciated. Thanks ...Show All
Software Development for Windows Vista very small bug with PolicyActivity (RC4)
1°Create a Workflow project (WF Release candidate 4) 2°Drag & Drop a policy activity: add one basic rule (i.e if True) 3°In the workflow class code, BEFORE the workflow class declaration, add a simple class class Test { } public sealed partial class Workflow1: SequentialWorkflowActivity {...} 4°Compile => the compiler give you an error : in my case: Error 1 Activity 'policyActivity1' validation failed: Can not find the rule set "Rule Set1". Check if rule set is defined in the rules file. ... WORKAROUND : If the Test class is defined AFTER the workflow class, it's ok. Serge So, how would one stop that error from occurring I have the same issue, and it is driving me crazy ...Show All
Smart Device Development How to debug only with foo.exe and foo.pdb file
Hi All, I use VS 2005 to develop and debug applications. But I build via make file so I don't have project file. in case of X86, I can run "devenv foo.exe" and with foo.pdb file, can debug into source level. but not find the way to debug on wm5.0 yet. Please, Could someone throw some light to me This will be similar steps to what's describe in this blog posting: http://blogs.msdn.com/vsdteam/archive/2006/02/05/525224.aspx Just create the dummy project for the same SDK you are targetting from your command line build and it should work. ...Show All
Audio and Video Development Query About page clock behaviour
Hi to all, I have a doubt about the behaviour of page when the document.load() API is called. As far as I know, whatever changes have taken place on the markup page, all gets reflected when the document.load() is called, but does it also mean that the "page clock" gets reset. In one of my scenario, I am passing the event at the -- select=//body begin="1s" dur="1s" event=foo -- and in the script, I am calling document.load(). Will the page clock gets reset everytime it encounters document.load() and so the event will get fired continuously Please clarify this doubt. Thanks in advance Azaz Hi, Thanks for the reply. But the behaviour in MS simulator is different. It does not reset the "page" cloc ...Show All
.NET Development Communication between apps via sockets.
I am trying to set up a communication channel between two Windows apps. Actually there should be 3 of them. One form is local, another form is located on the same machine, the third form is on a different PC connected via a LAN. My first attempt is to send a few strings of bytes from one form to the other locally. On the server side. This code is working : listenSocket = new Socket ( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); int port = Convert.ToInt32 ( "19001" ); IPAddress hostIP = (Dns.Resolve ( IPAddress.Any.ToString ( ) )).AddressList[0]; IPEndPoint ep = new IPEndPoint ( hostIP, port ); listenSocket.Bind ( ep ); int backlog = 2; listenSocket.Listen ( backlog ); StateObjec ...Show All
Windows Forms Append 2 byte[] arrays
How do I append 2 byte[] arrays Obviously this doesn't work: <code> byte[] 1; byte[] 2; byte[] 3; 3 = 1 + 2; </code> So how would I go about doing it I tried to convert them to strings, append the strings, and then convert back to bytes, but that doesn't work. Thanks! This works: byte[] arr1 = { 1, 2, 3 }; byte[] arr2 = { 4, 5, 6, 7 }; byte[] arr3 = new byte[arr1.Length + arr2.Length]; Array.Copy(arr1, arr3, arr1.Length); Array.Copy(arr2, 0, arr3, arr1.Length, arr2.Length); ...Show All
Windows Forms Combo Box width settings
Dear All, In the windows form I am able to manipulate the length of the combo box from the properties. But when I am trying to change the width the value remains as 21. How can I edit the width of it Can anyone assist me on this Thx. Another method to adjust the "height" of the ComboBox, the way you see it fit, is by OwnerDrawing the ComboBox. This requires more work than just "adjusting" the height. Regards, -chris ...Show All
SQL Server Can not create maintenance plan
I have had two SQL 2005 Stnd x64bit servers running without any problems for several weeks now. I just setup two new ones last night. One the two new ones, I get an error message when I try to create a Maintenance Plan. I also get an error when I try to create a plan using the Wizard. The error message is: TITLE: Microsoft SQL Server Management Studio ------------------------------ The action you attempted to perform on a remote instance of SQL Server has failed because the action requires a SQL Server component that is not installed on the remote computer. To proceed, install SQL Server 2005 Management Tools on the remote computer, and then try again. For more information, see "How to: Install SQL Server 2005 (Setup)" in SQL Ser ...Show All
Visual Studio Express Editions How Can i send text message to pager from vc++
i would like to send text message to pager by using vc++ application. if any body knows about this please let me know. Thanks Hello Re question: How Can i send text message to pager from vc++ As stated previously, please do not cross post and please select the correct Forum/newsgroup for your questions. This is a newsgroup type question http://msdn.microsoft.com/newsgroups . OTP Thanks Damien ...Show All
.NET Development Cannot Connect to SQL Server 2005
Hello, I have been stuck on this problem for a couple of days. The sys admin gave my username access to a database on sql server 2005 using windows authentication. I try to connect to it using this and it says that my username cannot access the db. What can be wrong, the sys admin said that all looks well on his side. SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "Data Source=serverName;Initial Catalog=DBName;User Id=MyUsername;Password=myPassword;"; myConnection.Open(); Thank you, Karina Thank you. I will do that. This is an intranet application, the DB is on our intranet and so is the web server and we're behind a firewall. I will most definitely check out that article. Thank ...Show All
.NET Development Trouble catching exception
Hi, I am having this problem catching a exception in a try catch block as shown below try { DialogResult result; result = wizard.ShowDialog(); } catch (PackageCreationException e) { MessageBox.Show(e.Message, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Warning); } now the wizard is a form which throws a PackageCreationException if it fails this works fine if it is run in the Visual Studio environment but when run as a standalone application this exception is not caught. I have been cracking my head over this. I can catch and handle exceptions fine every where else but here. Does anyone know why this happens ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to disable driver anti-aliasing
I need to preserve the exact colors (and thus, hard edges) when I read back the rendered image via an offscreen surface filled with GetRenderTargetData. There is an option in the control panel where the driver forces anti-aliasing for all applications. If I do not set the quality-performance slider correctly, I will get anti-aliasing. Is there a way (in code) to prevent that Maybe you could select a render target with a d3d format that does not support AA (If it exists). Driver won't be able override it cos it doesn't support it. Also, multisampling is not available for all swap effect, so maybe you could also do it that way. ...Show All
Visual C++ Forms and Memory usage
hi, i setup a simple Form with nothing on it and compiled it then ran the application, it was in Visual C++ Windows Form Application but when running the application it was using over 15.000k of memory. is this normal for an application of this type just seems a lot of memory for one item that does nothing. thanks Hello Deen, Please follow your previous thread at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=596224&SiteID=1 . Thanks, Ayman Shoukry VC++ Team ...Show All
SQL Server Error 1 Memory error: The operation cannot be completed because the memory quota estimate exceeds the available system memory.
I get the following error when trying to process a cube on the server. Error 1 Memory error: The operation cannot be completed because the memory quota estimate exceeds the available system memory. 0 0 It runs on a Microsoft Windows NT 5.2 (3790) with the JUNE SQL 2005 Developer release. I has 4 gigs of RAM This error comes when trying to process all sizes of cubes. At this moment I am thinking ether your patition is too big. You have 20Gb memory avaliable, I can hardly imagine the partition size that cannot process with that much memory. Try partition your data futher. It is also possible, you've changed some server properites and now server estimation ...Show All
Visual Studio 2008 (Pre-release) Overriding OnLoadCompleted not working for some reason...
Hi all. I have a sample application that overrides the OnLoadCompleted in the Application code behind. This works fine. However, for some reason, when I create my own project and I use the same code, it doesn't work :(. All I am doing is: public partial class App: System.Windows.Application { protected override void OnLoadCompleted(NavigationEventArgs e) { MessageBox.Show("hello"); base.OnLoadCompleted(e); } } For some reason the OnLoadCompleted isn't firing... is there any specific thing I need to fulfill to have this event fire Any ideas Nevermind ... figured it out due to my own stupidity. Turns out the XAML for my app defined the class as "App" but my code behind defined the ...Show All
