futurix's Q&A profile
Visual C# Migration problem..., Need help!.....
I am migrating from VC++ Managed code 2003 and 2005, but I ran into a problem with the vectors in VC++. I need the std::random_shuffle algorithm in a bad way. Is there any such algorithm in C# Dont think there is ... but should be that hard to make your own. So, first of all u pass an array of values u wanna shuffle. Create a new array with the same capacity. Then just use a normal random function to get a random index of your source array. Copy the random indexed item from source to destination array. Remove the item from the source array (so u cannot have same item twice) Or just m ...Show All
SQL Server Query help - get last username?
Hi, I hope this is the right place to post this. I am pretty much stuck but think I am doing pretty good so far as I am getting more and more into SQL using SQL Server 2000 here. I want to be able to get the last username who replied to a topic. The "DateOfLastReply" works great, it gives me the last date of a reply to a topic so pretty much along with this, I want to get who it was that replied last. Any ideas so far, I have this but it isnt correct: SELECT Threads.[ID] 'ThreadID', ThreadName, DateOfCreation 'DateCreated', (SELECT TOP 1 DateOfReply FROM Replies WHERE Replies.ThreadID = Threads.[ID] ORDER BY DateOfRe ...Show All
Windows Forms Application.Exit
Hello all, I have a strange problem that i'm hoping you guys/gals can help me with. I have written an application that i need to update on a regular basis. I have purchase an autoupdater problem that allows me to transfer files from my webserver to the client. But, before i can use it, the application itself has to be closed. I execute the Application.Exit() command and the program appears to close, but it's still listed in the task manager as being open. So, when my updater software runs, it fails on the updates because the exe is still in memory. Has anyone else had this happen to them and how do i solve it Thanks. Richard M. ...Show All
Visual Basic create storage
How or what do I add so that my dll file can information for my program. I've tried many different things and can't get it to work. Does any one know how this is possible Thanks What would you recommend as a faster more reliable storage between the two And if database. What type. Thats many out there. ...Show All
Windows Forms Calculate Width of a String in Pixels
hallo, Given a Font and a string, is there any ready-to-use function in .NET which can compute the resulting width of the string in pixels So that I can adapt say a Label, MenuItem or Textbox to the new size of a string. thx, Steve I guess we can agree to disagree on this one. =) I didn't have a lot of time to plink with&n ...Show All
SQL Server Deleting legacy maintenance plans - 2005
I am unable to delete my SQL Server 2005 legacy database mainenance plans. Here are the steps taken in SQL Server Management Studio: - Expand Management | Legacy | Database Maintenace Plans - Right click one of the maintenance plans - Select "Delete" A Delete Object window is displayed. I click the OK button, and the Management Studio no longer displays the maintenance plan. But after refreshing the view, the maintenance plan reappears. It wasn't really deleted. I also tried another way of deleting it. In the Delete Object window, I selected "Script Action to new Query window", then ran ...Show All
Windows Forms Updating a ListView
Is there an easy way to update the info in a ListView without having it redraw the entire line constantly For example, I have a ListView control that displays pertinant data about objects that constantly update themselves. I'm using the ListView to dynamically display these objects (and their data) but the constant flashing from the redraw really annoys me. I know you can set it to OwnerDraw, or something like that, but I'm a little fuzzy on what exactly I'd have to do there. Hello Kris, yes Genius is right. If you want to set the DoubleBuffer you have to extend the ListView since it is a protec ...Show All
Visual Basic Does someone have an example of a custom profile provider?
Hello, I would like to create a custom profile provider, and am wondering if someone has a sample that I could look at I will be using vb.net 2005 to create the web application that will be using it. Thanks! Jim ...Show All
Software Development for Windows Vista save xoml file without build...
I have a workflow with two custom activities from an activities library. I run this workflow from another console app. From what i understood, if i change the order of the activities on th xoml file and save it, the change should take place without building. anyhow, it's not working for me. (I have code activity in the custom activities which print me the activity name so i can see if there is a change in the order. Any suggestions Hi Amit, Since you are using activities (Code Activity) that need code beside (compiled code) you need to do the following to get this thing working 1) Create your own type with derives ...Show All
Smart Device Development Fail to connect to emulator
Hi, I've got a problem, I can connect with emulator using IDE command "tools - conncet to device", when ActiveSync4.0 is in "not connected" state. I'm wondering whether Visual Studio is linked to emulator using ActiveSync So what is the relationship among Emuator, Device emulator manager, AtctiveSync 4.0 and Visual Studio Is it using following order to link together? Visual Studio --> ActiveSync --> real device and Visual Studio --> ActiveSync --> Device Emulator Manager --> Emulator And what's about DMA When using DMA transport, are the ActiveSync and IP configuration still neccessory When Emulator is bind to ...Show All
.NET Development Access to a smartcard private key
Hi all, I'm trying to access a private key (X509 certificate) stored in a smartcard (Gemplus GemSAFE Card CSP), but i always get the same error: System.Security.Cryptography.CryptographicException: Hay mas datos disponibles. (In english, "More info is available") at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.Utils._GetKeyParameter(SafeKeyHandle hKey, UInt32 paramID) at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, ...Show All
Visual Basic Toolstrip Control and Multi-Columns
I am having an issue trying to get a vertical toolstrip with buttons to span multiple columns. I have tried about every combination of settings using Autosize (true/false), CanOverflow, Doc (all types), Size, Layout Style ... I can get the toolstrip to be wide but with only centered buttons, or wide with buttons spanning more than 2 columns, but not a simple layout of 2 columns that wrap based on the available room. ie if I have 9 buttons and only room for 3 in a colum, I should get 3 rows with three columns each. Anyone have any success with this Chris ...Show All
Windows Forms How to use Crystal Report to load Autocad file (.dxf) ?
Dear Keith, I used the VS.net 2005 beta2 and apply it's crystal report object such as OLE Object to load autocad file but don't show this object. Can you load a ".dxf" or ".dgn" file for me I need to apply my application so my customer want to add directly a ".dxf" or ".dgn" file which return from Autocad tools and then user will load this file into crystal report. I forwad your feedbacks as soon as possible. Thanks for your help. Starfo ...Show All
.NET Development Async Send / Receive
In The Name of God hello this is my send and receive asyncronous algorithm: I send the length of algorithm and then actual message. I have multiple messages to send which they are over and over again, i mean i send user name and them immediately i wanna send password, but the problem is when i wanna receive the password size, Surprisingly i receive the actual password.....and so the size would be something awsome and the program blows....or sometimes in the BegindReceive procedure or anything like this while i have sent data there is no data to peak but i know there is.......this is about 1 month that i got this one, any one can help me ou ...Show All
Visual Studio Team System One Build spanning multiple solutions and tests per solution
Our project is separated into different solutions. Each solution has its tests. Here is an example Project structure: $PROJECT |-- SYSTEM | |-- System.sln | |-- System. vsmdi |-- SOL1 | |-- Sol1.sln | |-- Sol1.vsmdi |-- SOL2 | |-- Sol2.sln | |-- Sol2.vsmdi ... Now I want to create a complete Team Build that spans all the solutions of the project. If i want to enable the tests for each s ...Show All
