element109's Q&A profile
Visual C# Beware my nasty code! - how can I simplify this?
Hi have the following switch statement that tests for a value and then loads up its relating Form. switch (objQuestion.m_objQuestionType.m_strCustomForm) { case "FormInspectionAnswerCustomLocation": frm = new FormInspectionAnswerCustomLocation(ref objQuestion); break; case "FormInspectionAnswerCustomCause": frm = new FormInspectionAnswerCustomCause(ref objQuestion); break; case "FormInspectionAnswerCustomProduct": frm = new FormInspectionAnswerCustomProduct(ref objQuestion); break; case "FormInspectionAnswerCustomSupplier": frm = new FormInspectionAnswerCustomSupplier(re ...Show All
.NET Development SDL1014 : recursively defined types are not supported
I've got a web service that was written in C# that I am trying to access from a native C++ DLL (built under 2003) that is using Managed Extensions and when trying to build the DLL I am getting the following error: error SDL1014 : recursively defined types are not supported, with [ namespace = " http://tempuri.org/ " name = "PID" ] While I understand what the gripe is, as one of the types defined by the Web Service and handed down in the WSDL of it is potentially recursive... I do not understand why though C++ is crying bloody murder over this when C# and VB.NET are just fine with it. A quick Google or MSN search reveals virtually nothing on this issue and at present I am stumped. Anyone have any ideas ...Show All
Visual Studio Using NAnt RC4 to build .Net 1.1 Code
Hi I am in a conversion project of Code from .Net 1.1 -->.Net 2.0 . 1. I am going to build all my projects with NAnt RC4 version and also with VS2005 to check the affected Areas. 2. I have both the Versions of my code in my machine, 1.1 and 2.0. 3. My requirement is to use NAnt RC4 version for building both my 1.1 and 2.0 code ad RC4 supports both. 4. I am able to Build both the 1.1 and 2.0 code with NAnt RC4. Here is my problem and Question: 1. when i build my 2.0 code with RC4 its perfect. 2. When i build my 1.1 code with RC4 i get messages like ..'Method is deprecated..and so ' these messages are obtained for my .Net Framework 1.1 code... why is NAnt RC4 --when building my 1.1 getting me these '...Deprecated...' As ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Gray Polygon (DrawPrimitives)
Hi, I'm currently using DrawIndexedPrimitives with data of type VertexPositionColor, and I've clearly set the colours but I always get a gray shape instead of the blend that I ought to see. Any ideas here please Thanks in advance. i already asked bout vertex colours & basiceffect http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=777762&SiteID=1 "The version of BasicEffect we shipped in the beta doesn't support vertex color, but we're hoping to add that for the final release." use custom shaders and everything will be fine :) ...Show All
Visual FoxPro Error in Building EXE when reportlistener used
Hi All, I use reportlistener for my reports and i have this piece of code in my prg to run reports procedure repoDemo lparameters tcLanguage, tcForm, tcDest, tcPrompt, tcCall, tcTitle, tnFlags local oPrevCont, oRepListner, lcLanguage oPrevCont = null wait window _reportpreview do (_reportpreview) with oPrevCont oRepListner = createobject("ReportListener") oRepListner.listenertype = 1 oRepListner.previewcontainer = oPrevCont report form (tcForm) object oRepListner release oPrevCont release oRepListner endproc && repodemo i use the windows default ReportPreview Container and ReportListener Class. i run my exe from the VFP IDE, we have this facility to run the Exe in the VFP IDE and i can come back to the IDE from the exe. ...Show All
Visual Studio Barcode 128 font not displayed in running mode
Hello, I'm working with Visual Basic.net in VS 2005. I built a Crystal Report showing a TextField with a code 128 font. I used the free font Code128.ttf and the function available at http://grandzebu.net/informatique/codbar-en/code128.htm I design mode, the font is properly shown in my report but if I build and run the projet, the Textfield appears as Arial instead of Code128! I designed a simple Winforms using this font and all is properly shown, both in design and in running mode. I tried to put the font in the ressources of my projet --> nok I tried to put the font in the application path of my projet --> nok Does anyone have an idea Thanks, C. Does nobody have troubles with a code128 or anothe ...Show All
Smart Device Development Smart Minimize a full screen app via code
I have a full screen app that I'd like to smart minimize via my own button. Can this be done via code Thanks. The Form.WindowState should do the trick. Simply use "myForm.WindowState = FormWindowState.Minimized" on the click handler for your own minimize button. Enjoy, ...Show All
Windows Forms how to move items from listbox to another listbox?
I have 2 listboxs in webform is it possible let items transfer on each listbox and save final result to database for example: listbox1 have 2 items : Joan and ViVi listbox2 have 1 item : Kevin if I choose Joan from listbox1 and click bottn Joan will disapper from listbox1 and appear on listbox2 so that I have this result after click bottn listbox1 have 1 item: ViVi listbox2 have 2 item : Kevin and Joan ======================================= also I would like to know could I do a mutiple select and remove all items to another listbox at one time when I select Joan and ViVi from listbox1 and then click bottn , Joan and Vivi will be added to listbox2 and remove from listbox1 . I want the result to be l ...Show All
SQL Server Any Distributed Data failure
Scenario: I have one windows server 2003 and 2 windows XP clients on one machine by virtual pc. All pings to each other. The 2 windows XP clients are joining a domain in the server. They have administrator accounts and administrative privilages on each other. On each windows there is SQL2000 with SP3 using windows authentication. Each MSSQLServer and other SQL Services log in by the administrator domain account and has the domain account of the other windows in sysadmin role. Both XP SQL Servers are linked to each other. MSDTC is running on all servers with allowing every available option by Services Components. Firewalls are off in all servers. Although, neither distributed transactions work giving this error: "Server: Msg 7391, Leve ...Show All
Software Development for Windows Vista GetComputerName() issue in C++
I am trying to make a utility that will make the inventory process of some 500 computers a lot easier, but I first need to get some basics down to do it. I need to make it a native Win32 application, so I ventured out of my sheltered area of managed code with C# and started working with C++. It is not easy, but I always knew I should learn C++, so I am working on it, and making some progress. Unfortunately, like most sections of my application, the piece of code I am working on to get the name of the computer is not behaving well. I am using GetComputerName() because eventually I shall need to use SetComputerName(). But every time I run it, I get a return value of "0035A058" as opposed to "jessys-pc." I noticed that the ...Show All
Visual Studio Team System Mapping Source Control Folder from Command Line
How do you create a new workspace on the command line and actually set the Source Control Folder portion of the workspace tf workspace /new /server:http://server:8080 WorkspaceName works for creating a root workspace that points to the directory you run it in, but we do not want to get all the code every time. We would like to specify Source Control Folder mappings to specific directories in the TFS Source Control. -Ed tf workfold ...Show All
Visual Studio 2008 (Pre-release) Orcas Jan CTP (bits) Install Problem VS 2005 SP1
I downloaded Orcas CTP (installable bits). I am running Vista RTM, with VS2005 SP1. When I execute the setup (as an administrator) the installer runs up to the point where it has checked the installation and there it hangs. I finally must either restart or use taskmanager to kill the frozen install. Any ideas Larry Marking this thread as answered because VS Orcas Beta2 has released. If this is still an issue, please mark the thread as unanswered. Thanks, Karen ...Show All
SQL Server Insert date server problem
I have a table in sql 2005 express, this table has a datetime field. I capture the date of the server like this "05/09/2006 08:17:23 a.m." in a windows form. When I try to insert this date in the datetime field of my data base, the builder show an error like there’s no possible to convert string to date time. The insert statement is like this: Insert into table1 (cod, date1) values (1,'05/09/2006 08:17:23 a.m') I have a succesful insert with a date like '05/09/2006 08:17:23' without the a.m. But when I capture the date now the format is with a.m.. how can I do that Hi Andrea, Thanks for your reply and that is a nice code sample you have posted. My language problem was solved after ...Show All
Visual Studio 2008 (Pre-release) Tracking StackPanel children collection changing
Hi! I'm using StackPanel and i need to be notified when the child element is added or removed from the children collection. Please, help me out. Thanks. You can subclass from StackPanel, and override the OnVisualChildrenChanged() method: public class MyStackPanel : StackPanel { protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) { base .OnVisualChildrenChanged(visualAdded, visualRemoved); } } Sheva ...Show All
Visual Studio Team System Upgrade script
Hi All I am new to VSDBProf and currently assessing it for ourself. New project will be started soon and I am thinking to use DB edition for database source control. Databases for previous projects we were building using our own tool. We keep structure changes, source (st.proc, triggers etc) in VSS. When we need clean database it will create and populated with reference data. Database goes through its evolution: baseline (major version release) created then changes applied for minor releases, one by one. If I need an upgrade I can execute set of scripts from one minor version to another. In that way we have abilility to upgrades and clean installs using the very same scripts. Now I am looking at VSDBProf. It keeps database structure in Sou ...Show All
