Tom v E's Q&A profile
Windows Forms Threading
Hi all, I have a Client Server Chat application in which i have created a server application that accepts messages and then sends back to the users. The client application is a thread that starts and connects to the server A list of connected clients is maintained in the db and is visible to all the clients. Now when the user selects a user from the list and starts a client to send a private message with that user, this message is sent to the server the server sends this message to the another user and a the client receives this message, Now when this message is received the client starts a new client window, The problem is this window is created but the controls on this window is not displayed. Any ideas will be ...Show All
Visual Studio Express Editions More on Random Numbers
Here's a good one for you. I have 5 variables, let's call them 'a', 'b', 'c', 'd', and 'e' Each will be assigned a number RANDOMLY from 0 through 4. However, each will hold a unique value. Only one variable can be 0, only one can be 1, etc. and so-on. How do I do this Thanks Ted Use a System.Text.StringBuilder object to build your strings: you can use it to insert characters. Here's a random picker using StringBuilder objects, doesn't require any sorting or swapping, and returns a randomized list of unique characters: Function RndChars( ByVal count As Integer ) As String ' Validate the Count If count <= 0 Then Return Strin ...Show All
Windows Forms ClickOnce Deployment Issue - File Has Different Computed Hash Than Specified In Manifest - Urgent!
Hello, originally posted this in the VB General forum - didn't get much response, so I thought I would post it here. I'm trying to deploy a ClickOnce Windows app. I have successfully installed it in the past. I made some changes to the .mdf file I have referenced in my application (I made the changes in SQL Server). When I published the app on another machine, I started receiving the error message "File ....mdf, has a different computed hash than specified in manifest". I tried a number of different suggestions that people have made on these forums, but no luck - I tried building the app twice, then deploying; I tried manually updating the revision number; I tried creating a new Test Certificate; I tried signing the assembly; I t ...Show All
Visual Studio crystalreportviewer toolbar images missing
I've seen a few posts here about this pesky problem but none of them solve my exact problem. I have a VS2005 web project with a crystalreportviewer control in it. If I run it locally, I get all of the crystal navigation images (next, prev, etc.). But when I copy/paste deploy to another webserver the images are missing. Here's what I've tried: 1. Made a setup project that included Crystal as a "prerequisite". Deployed from a setup.exe and everything worked but the images were still missing. 2. Found the path to the missing images in the browser view source, then made a folder in my web project to mimic it (e.g., /aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/images/toolbar/). Copy deployed and this didn' ...Show All
SQL Server RS 2000 Sample Printer Delivery Extension
I followed the steps for the sample printer delivery extension. But when I try to create a data driven subscription for the printers I've specified I get this error message. Printer \\Server1\XXX Printer is not currently installed. How does it know which printers are installed Thanks Richard THen I guess this is not setup properly. DId you follow all the steps which are in the sample to install the samples on the server HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Visual Studio Transforming additional content files
I have some additional content I wish to add to my documentation, besides the API reference. If I write this content in XML, is there a way to reuse the Sandcastle xsl transformations to generate html pages, so that I get a consistent design across all the pages Mark, Sandcastle has a conceptual side that has not been released externally. I believe this will resolve your issue. Please email me at aramATmicrosoft.com and we can discuss further. Anand.. ...Show All
Windows Forms Signing Clickonce application
Does any one know how to do late singing on clickonce application We have integrated the building the application with our sourcesafe checkin. Our integrated build process takes all the files from source safe and build with and sign it (with dummy certificate) to appropriate url for deployment. The original certificate was maintained by one group so I need to setup a procedure for them to come into one of our directory and sign the application. Is there an easy way to sign it, they do not want to do anything other than signing. Is there any document explaining this process Thanks. I would suggest using the mage command line tool for resigning ClickOnce applications. The –CertFile option should be just what you are looking fo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to apply the up vector to model rotation
Hi all I’m trying to calculate the inclination of a bounding box over a primitive. The objective is to make a vehicle’s displacement more realistic. I take the normals of the primitives in terrain, and I calculate the average of these. When I have the average normal, I need to use it to replace the up vector of the current model rotation. I have tried it in two ways: First, with a matrix, getting three vectors (up, forward and right) and doing this: Matrix.Up = up; Matrix.Forward = fw; Matrix.Right = right; The result rotation matrix is very realistic, but the model primitives are drawn with inverse normals. I don’t know why, but I’m quite sure that is d ...Show All
Visual C# How i can zip files with SharpZipLib
Hello! i made file explorer that adds selected files to treeView3. i have spent alot time looking for samples of SharpLibZip, i want make my zip package contain filestructure.( example c:\folder1\folder2\somefile.ari, and saves those folders on zip). here is what i made up this far: try { string outputdir = @"C:\arska.zip"; ZipOutputStream ZipStream = new ZipOutputStream(File.Create(outputdir)); ZipStream.SetLevel(5); for (int i = 0; i < treeView3.Nodes.Count; i++) { TreeNode lastNode = treeView3.Nodes ; string file = treeView3.Nodes .Text; FileStream fs = File.OpenRead(file); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); ZipEntry ent ...Show All
SQL Server Advice on query
Hi, Quite possibly this is easy but my brain is bazango'd right now and for the life of me I can't think of a good way to get the following... I have a table with 4 columns ID (int) User (varchar(200)) Timestamp (datetime) Note (text) The ID, User, Timestamp make up the primary key and nulls are not permitted in any column I'm trying to select the top 3 most recent rows [using timestamp] for each ID. anyone thanks in advance Mac Hi, SELECT * FROM ( SELECT [id], [user],[timestamp], --you should not use reserved words for column names RANK() OVER (PARTITION BY id,user,timestamp ORDER BY Timestamp DESC) AS Ranked ) Subquery WHERE Ranked <=3 HTH, Jens ...Show All
Visual Basic How to determine if a file is at the root directory
I have a one touch deploy application that copies all of the files from a folder to a server. I need to validate that the user has selected a file inside of a folder vs. at the root directory so that I don't accidentally attempt to copy all files. I can accomplish this when the user browses to a file on their computer. However, is it possible to determine if the user browsed to a file at the root of a share Any help would be greatly appreciated. If (fileLocation.Directory.Name.Equals(fileDirectory.Root.ToString)) Then msgbox( "Please select a file from a folder vs the root of your computer." ) retBoolean = False End If I'm not really familiar with working with shares, but ...Show All
Visual Studio VS Popup windows.
Is there a setting in VS that when turned on remembers the sizes and locations of popup windows I'm trying to get into using more of the point/click aspects of the IDE (QueryBuilder and such) but resizing the querybuilder window every time it opens is starting to get to me. It's not like it's even remotely functional in it's tiny default size, which is then divided into 4 parts. The query builder window is a document window and hence can't be a popup window. Can you please give us more precisions on exactly what you're trying to accomplish Thanks Patrice ...Show All
SQL Server Sum of last six months
I have an odd behaviour in a calculated member: [Ship Qty 6mo Sum] Calc: Sum( { [Time].[Month].CurrentMember.Lag(6) : [Time].[Month].CurrentMember.Lag(1)}, [Measures].[Ship Quantity]) This works fine for all months from February to December. When you run it in January, it is supposed to calculate the sum of July to December of the previous year. But instead it returns Null. I created another calculated member to show me SetToStr({ [Time].[Month].CurrentMember.Lag(6) : [Time].[Month].CurrentMember.Lag(1)}) and that shows: [Time].[Month].&[2006]&[7];[Time].[Month].&[2006]& ... [Time].[Month].&[2006]&[12] when Time.Month.CurrentMember = January 2007, as expected. I also created a calc measure like ...Show All
Smart Device Development Secure password storage
Hi, I'm making a business PDA application which gets and sends data from and to an Axapta database. For this i'm using SqlCE3.0 The problem I have now is that I have quite some bits that are sensetive information, namely the username/pass of the IIS folder where the SqlCE dll resides and the username/pass of the Axapta database. if possible i'd like to store the passwords in a secure storage on the device, does this possibility exist and if not, is it safe to store the key to decrypt/encrypt a password in code (I assume not, but where else if no secure storage exists) Thanks in advance, Ben. Not really, no. Even if you encrypt the password you’d need to store decryption key in clear ...Show All
Visual Studio Tools for Office getting the path info for an attachment
I am trying to control the send of a message based on the filePath of its attachements. Unfortunately, by the time I get called in a send event, the attachment has lost any system-specific information, and all I have to go with is DisplayName, type or Size -- all intrinsic file properties. If I look at the attachment.FilePath, it's always null. I tried to trap the addAttachment event, but even by then, the stuff like path, accessed date, file ownership or securitry attributes are gone. At what point in time can I still access this information, i.e. what event do I need to intercept in order to be able to obtain this info When does the attachment object get created I was also thinking I might solve this problem by watching a place where at ...Show All
