Mazzica's Q&A profile
Visual Studio 2008 (Pre-release) how to notify something when connect and disconnect
Say I have a server and client. Is there some event occur when the client connect or disconnect to the server I want to do something after that... Hi, JDPeckham Maybe I didn't describe clear... Say I have a server application and execute "ServiceHost.Open()" method. I want to output "One client connected...." if one client connect the server.... Could you tell me how to do Is there some event like "ServiceHost.Connecting" or "ServiceHost.Connected" Thanks ...Show All
Smart Device Development How to add Check Boxes in Owner drawn Listview
Reaspected Sir/madam I have used owner drawn listview in my project. But according to requirements I have to place check boxes before each item. unfortunately I am unable to add check boxes before each item. If any body knows the solution please help me Regards Bijay Kumar Pathia Thanks Alex for your suggestion. Again one more problem arises. When I delete an item from the owner drawn listview it gives some "Argument out of bound " exception Actually this item is reappeared after deletion. Waht I have to do now Regards Bijaya ...Show All
SQL Server Permissions error while upgrading to SP2 CTP...
Hi Folks, I have a request from one of our researchers to upgrade to CTP SP2. I am getting the error message: MSP Error: 29506 SQL Server Setup failed to modify security permissions on file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ for user Administrator. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that exists on the destination drive. I added server\administrators - full control to the permissions of \Data\, but it still does not work. Has anyone else ran into this, and how do I fix it Thanks, Alainna Error 29506. SQL Server Setup failed to modify security permissions on file E:\Program Files\Micr ...Show All
Visual Basic MessageBox Icons
I have written my own version of a message box. I did it because i wanted to control the size of the font. I wasted a lot of time trying to tweak the actual msgbox, but could not change the font. So i wrote my own. I would like to use the existing message box icons. any one know how I found System.Windows.Forms.MessageBoxIcon.XXX i tried to assign it to a picture box. I also tried to use iconconverter.convertto. That failed as well. Thanx Jerry C Add an actual image that you want as a resource to your application (or put it in an image list in your messagebox form). You need to get the images yourself . There may be a way to extract the icons from somewhere, but I usually ...Show All
.NET Development Windows Service
Hello all, I am working on a little tool that will send a mail containing a generated XML file. When I add the following code in a regular console application it works fine, but when I try to make it a windows service it just won't work.. well, at least i don't get any mail from it! Here's the code: (Please tell me if you see anything wrong with it, it's my first go at a service) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.ServiceProcess; using System.Text; using System.Xml; using System.IO; using System.Timers; namespace XmltoMailService { public partial class Service1 : ServiceBas ...Show All
SQL Server Report exported to Excel is unreadable
I am working with RS 2000, SP2. I am having a problem with some users not being able to read some of the exported Excel reports when they are opened, (they refer to the report as "gobbledygook"), but they are able to read other exported Excel reports. In both cases the reports are emailed through Reports Manager. These are very simple reports that do not contain formulas or large amounts of text. I can email the same report to two different people, and one person cannot read the report, and the other person has no problem. In another situation, I created the report in Visual Studio.net, saved it in Excel on my local disk, attached it to an email, and the recipient could not read it. I deployed the same report to Reporting Se ...Show All
SQL Server Report Subscription sends wrong version
I have a report that's scheduled to run once a month on a timed subscription (using a shared schedule). The Report Delivery Options are set to include the report as a PDF embedded within the email notification. The report has also been set to record a snapshot each time it is run. The first month, the report was embedded as planned. The second month, the wrong report was sent. The PDF that was generated in the prior month was resent, not a new instance of a PDF based on the current data. The emailed link to the report on the server worked fine, and the history shows that the snapshot was recorded at the appropriate time Wa happen Why would it embed the prior/old instance of the report ...Show All
.NET Development String.Remove(int32) convenience
So here I am, trying to find a way to limit a string to 50 characters. I could use String.Remove(50) or String.Substring(0,50) and it would work fine. EXCEPT that I really don't get strings with 50+ characters that often. Like, almost never. Which means either of those throw a nice ArgumentOutOfRangeException. So I really need to check the length first: If s.Length > 50 Then s.Remove(50) End If Which just seems like extra work. I mean, why can't String.Remove() just ignore the fact that I'm asking it to remove characters that aren't there I can see the value of trowing an error in String.Substring(Int32, Int32), where it's more likely the developer expects there to be enough characters. But why can't String.Remove() act more like ...Show All
Smart Device Development how to use #if COMPACT_FRAMEWORK
I am implementing a new security model for a project, and I need to change a dll to be CF compatible (ie remove all XPath stuff). I figure a good way to do this would be to use, for example: #if COMPACT_FRAMEWORK private System.Windows.Forms.Panel gbNewPassword; #else private System . Windows . Forms . GroupBox gbNewPassword; #endif However, my compiler wont build it, mostly because it doesn't seem to know I want it to build in COMPACT_FRAMEWORK mode. The project is a C# Smart Device project, by the way. How do I get the compiler to believe we are building the project for compact framework Should I be creating a new solution configuration Thanks, Iceman_Aragorn You'd need to define COMPACT_FRAM ...Show All
Smart Device Development Wave Form API
Im using the Wave Form Audio Interface ( http://msdn2.microsoft.com/en-us/library/aa446573.aspx ) to play back streaming audio from mic inputs in realtime. I have 2 inputs, one sampling at 44.1 khz and another at 8khz. The 44.1 khz plays back normally with no distortion or delay. However the 8khz sounds perfect but has a 4 second lag time or delay It seems if I set the sample rate of the 44.1 khz to 8khz in the code I get the same delay as the 8khz sample rate. So, I guess my question is why does the Wave Form API introduce a 4 second delay with a 8khz sample rate. //No Delay WaveFormat fmt = new WaveFormat (44100, 16, 2); Player = new WaveOutPlayer (-1, fmt, 16384, 3, new WaveLib. BufferFillEventHandler (Filler)); ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2 Questions for Beta 2: Flipping and Initializing
Hello! So, yesterday I've finally compiled my game under new Beta :) And an hour ago I've even launched it. Now I got 2 questions: 1. Help says: "The Initialize method is where you can initialize any assets that do not require a GraphicsDevice to be initialized." Well, when I work with my program GraphicsDevice seems to be well initialized in Initialize (more exactly after calling of base method). Is it just a side effect and I should not rely on it or it is an error in documentation 2. I use SpriteEffects to flip my batches. When I first run my game under Beta 2 all sprites are not flipped. I've look through documentation but got no clue - XNA seems to be ignoring SpriteEffects. What's wrong Thanks! Stas ...Show All
.NET Development uncatched bug
a link to my problem http://www.codeguru.com/forum/showthread.php t=403931 please i need help ahmed921983 wrote: a link to my problem http://www.codeguru.com/forum/showthread.php t=403931 please i need help Are You OK You know you are posting a Java Server Pages connection of Microsoft Forums Didn't you get any other place to post that Best Regards, ...Show All
Windows Forms Readonly PropertyGrid
Hi, either I'm missing something, or it seems to be inordinately difficult to get a (optionally) readonly property grid. I have an application which, using a propertygrid control, displays the properties of my object. Depending upon the user, they might be able to change those properties. My object has collections within it, exposed as properies (such as "Things"). It would seem that, in order to get a read-only version of my grid, all the objects that expose properties have to implement ICustomTypeDescriptor.GetProperties, return a collection of my own derived PropertyDescriptor, which in turn overrides the "readonly" property. Grrr.. That works, but what a lot of code. Things get messy with my collection p ...Show All
SQL Server Null replacement on Excel Query
Hello everyone, i'm using an excel source where i get my excel rows using a query, I'd like to replace possible null values with some other data(a zero value or a empty string for example), that's because i'm performing a transformation into a sql server table wich doesn't accept null values for some columns. Is there any function to convert a null value to another one I used the sql server's CASE function, but it didn't work. Any suggestions thanks a lot. Have you tried using Data Conversion transform... you could use an expression like IsNull(Column) ValueifNull : ValueifNotNull See some examples here: http://msdn2.microsoft.com/en-us/library/ms141184.aspx ...Show All
SQL Server How to check whether SSIS is installed
I'm using the import wizard to create a new table from a flat file source. The table gets created but no data gets copied. What's wrong Here's the report: Operation stopped... - Initializing Data Flow Task (Success) - Initializing Connections (Success) - Setting SQL Command (Success) - Setting Source Connection (Success) - Setting Destination Connection (Success) - Validating (Error) Messages * Error 0xc00470fe: Data Flow Task: The product level is insufficient for component "Source - inSsrc_txt" (1). (SQL Server Import and Export Wizard)   ...Show All
