wei917's Q&A profile
Windows Forms Problem with List<T> and TypeConverter
Hi, I am having a bit of difficulty with TypeConverters and Generic Lists and I was hoping that I could get a bit of advice. I have a type converter that is used to create the constructor code for my component. (It is an XNA a Game Component, but I don't think that that has anything to do with the problem because it appears on a Winform) inside another component. For instance I have the following: public class A{ private string s; public string SProp { get { s = value;} set { return s;} } public A() { s = "" ; } public A( string inS) { s = inS; } } By itself, when class A is an object on a form (or in my XNA Component) the TypeConverter code works fine, the property grid on t ...Show All
.NET Development i need help for asp.net tree control
Hi, Am implementing Asp.net in my project and new to treeview structure concept i have treeview structure which contains one root node and two child node and child node have two leaf nodes with check box control. For example: root note is Destinations Two child node is Belize and Bonaire Belize contain two checkbox control nodes. and same for Bonaire if the submit page.aspx destination=BELIZE (belize subtree s/b expanded). If page.aspx accommodation=SUNBREEZE (destination BELIZE tree expanded and accommodation SUNBREEZE checked) Please help me With Regards S.Senthil Nathan Hi Sinan Thanks for your reply... I was searched all forums there is no result for my question........ please give me a example fo ...Show All
Visual Studio How to access Shape element from its correspoding ModelElement?
How to access Shape element from its correspoding ModelElement If I add a domain property, say Color, in a Domain Class and want to programatically map this property to the color of the GeometryShape which maps to the Domain Class . How do I programmatically do it thank you! Hi, As far as I know, it isn't possible to change the color of each individual compartment item. Edward ...Show All
Windows Live Developer Forums Bug in tile layers when switching styles
Yes, I am moving onto tile layers and found that: 1. Go to the iSDK and goto "Use custom tile layers" - load one of these a wait for it to show up 2. change to aerial (or road if you were on aerial) 3. Click on the zoombar to zoom right out the tile layer is still over the screen! I thought i had it solved by deleting the layer and then adding it again but no luck. I have found no way to get rid of it. Any of you guys who have done lots of work with tile layer fixed this My code is basically the iSDK example running in both IE7 and FF2 (with fix). John. ...Show All
Visual C# Picking at random, with varied probabilities
One part of a program that I'm writing requires me to pick an object at random out of a collection. Each object has a different weight (probability), currently stored as a Double, associated with it, and the number of objects varies. The total probability, 1.0, is equal to the sum of the weights of all the objects in the collection. Is there a commonly used, efficient algorithm for picking random objects in this situation Currently, the only one I can think of (and this is pretty tedious): Load the keys and weights of the collection's objects into structures inside an ArrayList. Sort the ArrayList in ascending order, by weight. Add on another value (CumulativeWeight) to each structure that represents the sum of all the weights up to and ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Game and GameComponent Feedback
We've been combing the forums and the Connect database for bugs, feedback and suggestions around the application model. We still have a small amount of time to consider any other feedback you may have. So this is the thread that you post your latest likes or dislikes with Game, GameComponent, services, etc. Please scan the other threads before posting here, I'd like to just gather things that haven't already been discussed or reported elsewhere. Thanks! I'm against the GameComponent stuff. I just don't see the point in this. This is high level logic, that is application dependent and surely don't have to be in the core libraries. I even don't see the point in adding my the graphics device to the game components... If we have ...Show All
Smart Device Development How do i Show Hidden application?
I have an applicaton that uses me.hide() command. after i hide it, how do i re-show it again when i click on the exe file, it doesnt showup. If you want application to show up when it’s restated you should never hide all it’s forms. If you did it’s up to you to provide a way to show form again, e.g. via notification icon from which you can do Me.Show(). ...Show All
SQL Server Double Quotes in CSV File
I have a lot of data coming in from CSV files. I have many CSV files (~20), with varying amounts of data- but some are quite large (largest file is ~230mb) I'm trying to import it into a SQL database via SSIS, but the data is a little bit frustrating. I have data that looks like this: "Text from vendor ""Vendor Name, Inc."" blah blah", "Next string", "", 1234 Many things to notice here - as well you can imagine some of the difficulties here. After parsing, this data should have 4 columns- Column1 &n ...Show All
Smart Device Development Performance System.DateTime.Now
Hello The API function GetSystemTime(out st); (PInvoke) is about 1500 faster then System.DateTime.Now; System: WinCE50 on ARMV4I TestCode: using System; using System.Data; using System.Runtime.InteropServices; namespace DateTimePerformance { public struct SystemTime { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; public ushort wMinute; public ushort wSecond; public ushort wMilliseconds; } /// <summary> /// Summary description for Class1. /// </summary> class Class1 { [DllImport("coredll.dll")] public static extern void GetSystemTime(out SystemTime st); /// <summary> /// The main entry point for the a ...Show All
Visual Basic Program to execute on one machine only
Hello, My problem is that I want to deploy my program onto a 'thumb drive' and sell it that way and I need the program to only run off that drive. It is a small program that can easily be copied and run by anyone so I thought that if I could somehow 'lock' it to the small USB drive then that would solve my problem. Because some games require a CD to be in a drive before they will run I figured that that would be something that I could do, my problem is finding any help in how that might be accomplished. Can anyone point me in the right direction Thank you very much Bill Langston Yes, I agree -ca, I just don't have the knowledge to figure it out. I feel that if we can find a solution and have it archived here for oth ...Show All
SQL Server How to rename a table ?
Hi all. I'm porting an application from eVB-ADOCE to VB.Net-SQL CE In the old application there are some SQL statements like this: "ALTER TABLE OldTable TO NewTable" Is there an equivalent instruction or a simple way to rename a table I was not able to find anything simple to do the same. I really need NOT to do something like SELECT * INTO NewTable FROM OldTable because the resulting table could go outside memory and/or spend too much time in elaboration. Please let me know what I can do. Many thanks ! As far as I know, there is no such option from SQL. But you can rename a table (and a table column) using OLE DB: QA: How do I rename a SQL CE table ...Show All
Visual Basic Unknown problem
Hello! I am writing application which is server which communicates with client by socket. The server contains one form "frmMain" and one module "Module1". Module1 contains the following lines: Imports System Imports System.IO Imports System.Net Imports System.Net.Sockets Module Module1 Public Const BS_PORT = 8221 Private pfnWorkerCallBack As AsyncCallback Private soclistener As Socket Private socWorker As Socket Public Sub StartListening( ByVal Port As Integer ) Try Dim ipLocal As IPEndPoint = New IPEndPoint(IPAddress.Any, Port) soclistener = New Socket(AddressFam ...Show All
Visual Basic usercontrol and parents
if i create a user control "A" that has 3 text boxes in it and add several instances of "A" to a panel...when i mouseover one of the text boxes how can i tell which instance of A it belongs to Thanks! Dan ctype(Sender,control).parent in mouseover event results in your textbox host (in this case your usercontrol instance) Remco ...Show All
SQL Server Forgive my "french" but...
Exactly what does it take to get ReportBuilder for SQL Reporting Services to actually function. I had VS2003, then I installed VS2005 with SQL 2005. Everything installed to the best of my knowledge....How do I know....because the installation program was smart enough to sniff out SQL Report Services 2000, automatically rendering it unusable by giving the rsreportserverdisabled message due to the key encryption. After much searching I found an article to fix this ( http://codebetter.com/blogs/john.pappa/archive/2005/12/27/135963.aspx ) Now, report functions but no report builder. IF I CAN'T GET THIS TO FUNCTION by tomorrow...I will be forced NOT to recommend SQL Report Services for the next generation of software we ...Show All
SQL Server How do I change the default Stored Procedure Template in SQL 2005
How do I change the default stored proc template used by SQL Server 2005 Management Studio I know how to generate additional templates, but I want to change the default template so that when clicking "New" to create a new stored proc, the modified template I have is used. I've been unable to get this to work as it always creates the template using the default that comes with SQL. I've search BOL and didn't find anything, as well as several online discussion groups I frequent. Any help is appreciated. RScero - this is a very interesting question indeed! Using filemon I discovered that sql server uses the file <microsoft sql server directory>\90\Tools\Binn\VSShell\Common7\ID ...Show All
