ray_newbie_SSIS's Q&A profile
Visual C++ Negtive zero valid?
Hello, I hope I am in correct forum. I am testing Visual Studio 8 RC1, and found a negative zero. Here is a C example: { double val = 0.0; val = -val; printf("%g\n", val); } Output is: -0 The result is "0" with .net 2003 version. Is this a expected behavior If this is expected, could somebody point me to the documents describing new double behaviors. Thanks! wrote in message news:c4b214ef-608c-4a9d-b8f3-dae695b4a446@discussions.microsoft.com > Just a curiosity, is there any way to identify negative zero, > other than looking into the double format See _copysign - this is a non-standard function. However, C99 standard (which VC doe ...Show All
Visual Basic How to reference XSL style sheet into XML file in VB.NET?
I am trying to declare the “XSL style sheet reference" to XML file that My VB.NET application is creating at run time. This is the XSL reference which should go to the header of the XML file < xml-stylesheet type=text/xsl href=filename.xsl > ds.writexml(filename) Will produce something like this ="1.0" encoding="ISO-8859-1" > <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country> USA </country> <company> Columbia </company> <price>10.90</price> <year>1985</year> </cd> . .. </catalog> I want to reference the XSL file into the header of the p ...Show All
Visual C# converts a char into a string
Hi All, How would I convert this string bleh = "hello world"; inputString = "r" if (bleh == inputString) { blah = inputString; } The error message I get is Error 1 Operator '==' cannot be applied to operands of type 'char' and 'string' Much help appreciated Declare inputString as char, and do: inputString = 'r'; // Note single quotes. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA and Winforms - 2 questions/problems.
Here is a basic app (sample code from larger app) to highlight my problem(s): public Form1() { InitializeComponent(); pp = new PresentationParameters(); pp.AutoDepthStencilFormat = DepthFormat.Depth16; pp.BackBufferFormat = SurfaceFormat.Bgr32; pp.BackBufferHeight = 600; pp.BackBufferWidth = 800; pp.EnableAutoDepthStencil = true; pp.PresentationInterval = PresentInterval.Immediate; device = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, DeviceType.Hardware, this.Handle, CreateOptions.SoftwareVertexProcessing, pp); device.DeviceReset += new EventHandler(device_DeviceReset); device.DeviceResetting += new EventHandler(device_DeviceResetting); device.Device ...Show All
Visual FoxPro Sequential Transaction Number
I'm working on a form that needs to have a sequential transaction number. I have a Database/Table (named Trans) in place that has a single record that holds the next transaction number. I'm not sure what the best way is to have the next transaction number appear in a field on my form. Right now I have a field named T_TRANSNUM that has it's data property set to w_trans.t_transnum. t_transnum is the name of the database field where I want the transaction number stored when the form is saved. In the INIT method of T_TRANSNUM I have the following: STORE 0 TO T_VALUE SELECT TRANS GOTO 1 STORE trans.trans_num to T_VALUE REPLACE trans.trans_num with T_VALUE + 1 this.value = T_value What is happening is that the value is displayed in the form, but ...Show All
.NET Development C# - reading and writing memory for game trainer
I'm interested in creating a small trainer for a single player game I made and want to know how to read/write memory with C# given a specific memory address. I found the memory addresses which hold the score (int '004F19EC') and player x position (float '01150630') and want to use them to produce variables in C# to track them and manipulate them. I couldn't find much info on how to do this. It seems I use the Marshal class but I'm having trouble figuring it out. If someone could show a sample of how this is done, I'd appreciate it. You need to get an IntPtr (pointer) to that unmanaged memory structure and use the static methods on the System.Runtime.InteropServices.Marshal class (eg. Marshal.R ...Show All
Smart Device Development How to connect to GPRS network from code?
When Internet Explorer is ran on my mobile phone it automatically connects to Orange GPRS network and I see a popup/hint on top of the screen saying "Connecting to GPRS...". I want to do the same in my application. Detect somehow that the network if available and just connect to it. I've looked in settings and iI think this is somehow connnected to modem connections but still I dont know how to start them from code. Any help/link will be appreciated. None. You need to convert code above from C++ to C#. If you don't know C++/don’t know how to convert/don't want to convert - OpenNetcf.org has a managed wrapper for connection manager. ...Show All
Visual Studio Generating docs using Sandcastle (CTP) from un-managed C++
Hi all. This has probably been asked before but...... Is Sandcastle able to or will be able to produce docs from un-managed code I've generated an XML comments file from my C++ source, but MrefBuilder can't do anything with it because my code doesn't use any managed assemblies. Running MrefBuilder on this comments file yields a "0 assemblies loaded...etc" message. This results in an empty reflection file and a wasted chm . Would creating my own .org file, based on the contents of the C++ comments file then enable Sandcastle to create the docs Thanks for you help. Adam I would like to add that we do have plans to address documentation for unmanaged code and schemas in Sandcastle V2.0 time-frame. ...Show All
Windows Forms Creating”alert” when new file arrives
Hello! I hope this is the proper forum for this. Every day a computer sends out new files to a certain folder in my computer. I am to check these files when they arrive, ASAP. However they come within a one hour window. This means that I have to check my folder every five minutes during the waiting time if I want to be able to check the files as they arrive. Therefore I would like to make some form of “alert” that notifies me when new files arrive in my folder, preferably but necessarily using audio. Is this possible If so how can you do it Any help very much appreciated! Thanks a lot in advance! I know I can minimize the window showing the folder and just have it at the corner of my screen but that is not very convenient as I ...Show All
.NET Development Appdomain::Unload does not unload an assembly
I'm writing an application that can load any .NET assembly and work with it through reflection. I want to load all assemblies in a new appdomain, not default appadomain. My code looks like this: AppDomainSetup^ ads = gcnew AppDomainSetup(); ads->ApplicationBase = appdir; AppDomain^ newAd = AppDomain::CreateDomain("MyAppDomain",AppDomain::CurrentDomain->Evidence, ads); Assembly^ a = newAd->Load(gcnew System::String(assemblyName)); assemblyName is the incoming assembly name from the user. The problem here is, the assembly gets loaded to MyAppDomain and DeafaultAppdomain. This is because I've a reference to the assembly created in new appdoamin in my current app domain. I need a reference because I need to work with ...Show All
Visual Studio Express Editions Can a dragged object have a transparent background?
Visual Basic 2005 Express: I am dragging & dropping a PictureBox onto a Form. I need the dragged object to have a transparent background so that I can see the image on the form through it. The PictureBox image is a .PNG file with a transparent background, but, it is no longer transparent after dropping it. jo0ls at xtremevbtalk.com wrote a program that does it all! 1) Transparent backround on dragged objects. 2) See object as it is being dragged. 3) Rotate object. 4) Nudge object. 5) Delete object. 6) Drag multiple objects. 7) Drag multiple copies of an object. 8) Redrag objects. 9) Drag objects of any size Wow! < http://www.xtremevbtalk.com/showthread.php t=265584&goto=newpost ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Converting to and from a view matrix.
Hello everybody. I am trying to convert back and forth between a view matrix (created with matrix. CreateLookAt ) and a position, rotation and scale. I believe I have figured out how to convert into a view matrix from a position, rotation and scale like this: Matrix sc = Matrix.CreateScale(_scale); Matrix rot = Matrix.CreateRotationX(_rotation.X) * Matrix.CreateRotationY(_rotation.Y) * Matrix.CreateRotationZ(_rotation.Z); Matrix trans = Matrix.CreateTranslation(_position); Matrix transformation = sc * rot * trans; Vector3 orig = Vector3.Transform(Vector3.Zero, transformation); Vector3 target = Vector3.Transform(Vector3.Forward, transformation); Vector3 upPoint = Vector3.Transform(Vector3.Up, transformation); v ...Show All
Commerce Server Credit Card sorting
Hi Can anybody help with customising the sort order of credit card profiles please I've tried using SQL Server Profiler to work out which stored procedures are being executed, but it isn't obvious how they are being retrieved. Any help would be much appreciated. Regards Paul Tew If you are talking about the Starter Site and/or the Credit Cards that are listed in the user's profile, they are shown in the order that they are stored inthe multi-value property. The multi-value property (credit_card_list) is a delimited string of profile IDs (<guid>;<guid>) and each profile is retrieved individually. You will most likely need to do the sorting in the application. There is no join be ...Show All
Visual Studio 2008 (Pre-release) Why can't you query an Expression Tree?
I don't know why Expression Tree's don't implement IEnumerable or IQueryable. Let's say I want to search an Expression tree a member invokation expression (see here for an example of why you might want to do this http://www.theserverside.net/tt/articles/showarticle.tss id=LinqReflections ). It's just a tree so it could even provide different methods to do a depth first or breadth first search. Expression < Func < int , int , int >> acc = x => x+1; from expr in acc.BreadthFirst() where expr.NodeType == ... Of course I can do this myself with extension methods but I'd like to know why this was omitted. Is this discouraged for some reason I'm just trying to get a handle on best practices. Thanks very much, Cong ...Show All
Windows Forms TreeView owner draw
Hi, I'm customizing a TreeView do draw lines lines from one node boundary to another point outside the treeview. Can I continue to draw a line to a point outside the treeview control How I tried to draw a line from the node until the TreeView control boundary.That was ok. Now, how can I get that exact point to start drawing a line to another control boundary (The other control is also a TreeView, I wanna draw lines connecting some of these treeView nodes). Help is really appreciated, D Hi,DevDiver If you want to draw lines between different controls, you must do the paiting work in the Form's OnPaint event ,and t hese twomethods maybe helpful for you if you want to translate the location ...Show All
