Raoul_BennetH's Q&A profile
Windows Forms Form to Form Interation
Hey All In the application I'm creating, I have a button on a Form which loads an instance of another form (note that they aren't MDI Parent-Child). The second form has a series of buttons within it. I want to have it so that when a button is pressed in the second form, it appends some text to a textbox in the original form. How would I go about doing this Thanks You probably need a get/set method. Mine is a bit involved, but you get the idea, like so: //The method/Class in Form1: public class GetReportdate { private static DateTime shiftDate; public DateTime GetDate { get { // Modified to return todays date if no ReportDate is selected // Check to see if year is bogus if ...Show All
Software Development for Windows Vista Adding Images
Hi, I want to add image resources to my xps document programmatically. I used the following code to add an image resource object. XpsImage xpsImage; xpsImage = pageWriter.AddImage(XpsImageType.JpegImageType); WriteToStream(xpsImage.GetStream(), "image.jpg"); xpsImage.Commit(); xpsImages.Add(xpsImage); This works perfectly. but there is a problem. When the packaging is done my original image name is changed to an unique Guid value. (the image references are also changed in the .rel file and the fpage files) I don't want this. I want my original image name to be displayed everywhere. Can anyone help me Thanks Yohan This Guid is added when the xpsImage object is created. I used th ...Show All
Visual C++ IDE for C++ 2005 Problem with Resources
When i add any control in Visual C++ 2005 Form Designer or add a new resource string (It's displayed in arabic without any problem) but after i save the file , the resouce file doesn't save it in arabic then it will not be displayed in the right way. I to add any resource string in arabic without open .rc file in an external viewer. Any Suggestions Thanks Ted. for your help, I have installed SP1 and the problem was resolved. I had to wait about 45 minutes till it's installed like windows installation but my problem has gone. Thanks alot. ...Show All
Windows Live Developer Forums Not displaying links correctly in messages sent by the AddIn
Hi! My question may seem trivial, but It kind of bugs me. I am making an AddIn that translates the tag WIKI<Something> in a link to the Wikipedia's page for Something. I tried it out, it worked ok, but when I sent a message to some friends, they complained because the URL was displayed as simple text. However, with normal messages, that is sent by me directly, the URL are normally hihlighted as URL's. My code is below: using System; using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.Messenger; using System.IO.IsolatedStorage; public class WikiAddIn : IMessengerAddIn { private MessengerClient mclient; private String language; IsolatedStorageFile isol; void IMessengerAddIn.Initialize(Messeng ...Show All
.NET Development I fixed by OutOfMemory Exceptions. Can somebody tell me why???
I have written/deployed a C# Windows Service using VS.NET 2003. This service, over a period of several days, would grow in size to over 700 meg and start getting OutOfMemory exceptions. Also, the Page Faults would number in the millions. The problem turned out to be in class level 2 XmlDocument objects. (Note: The class that used these 2 XmlDocument objects was a very busy class). The class would use these 2 XmlDocument objects to manipulate XML strings. The LoadXml() method was used to load the XML and then manipulate the XML as needed. There were 3 methods in this class that used these class level XmlDocument objects. So, I deleted these class level XmlDocument objects and used local XmlDocument objects within each method that requ ...Show All
Visual Studio MSBuild Dependency Chain Breakdown
I have a solution with 30 projects. Within this solution there are projects with several levels of nested project references: Project C references the libraries from ProjectB1 and Project B2 and Project B1 references Projects 1, 2, and 3, while Project B2 references Projects 2, 3, 4, and 5. When building in Visual Studio, I get the resulting output in the bin directory for Project C: ProjectB1.dll, ProjectB2.dll, Project1.dll, Project2.dll, Project3.dll, Project4.dll, and Project5.dll However, when I execute: msbuild MySolution.sln from the command line, all I get in Project C's bin directory is: ProjectB1.dll, ProjectB2.dll, Project1.dll, Project2.dll, Project3.dll, and Project4.dll <missing the Project5.dll> ...Show All
Visual Studio Express Editions Refresh DataGridView after Filter
HI, I've created a filter based on a selection from 2 comboboxes and displayed the filtered results in a DataGridView. However the results of the filter stay in the DataGridView as well as the 2 comboboxes, and I can't selected anything new or created a different filtered result. How can I refresh the data so that everything goes back to the it way before the filter, like a refresh button. Thanks Peter well can you show us some code how are you filtering the data Remember, when you filter the data using, say the Select command in the DataTable, it returns back a collection of DataRows() with the filtered data so to "restore" back, just poin ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Displaying textured 3D objects
Hi there, I've been working my way through the tutorials at http://xna101.spaces.live.com/ , and I am stuck on lesson 16, the first 3D tutorial. The download of die.x didn't work, so I whipped up my own little 3D cube in Blender and applied a simple 64x64 pixel texture to it and saved it in DirectX format as cube.x. I was able to add it to my Project fine, but when I try to compile the program, it has all sorts of trouble understanding any texture I put on the thing. It will say the texture file is not found in the debug/bin directory; or it will give me other error messages about the structure of the texture file. I tried saving the cube as cube.3ds and cube.x3d and whatnot, and none of that worked. (Indeed, the Project didn't even rec ...Show All
Windows Forms The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)
I have an application that is distributed with click-once. One of my users already makes use of it for quite some time without any problems. Only recently, he is not able to launch the application anymore. During the check that is made to see if there is a new version of the software, he gets the message: "Application cannot be started, contact vendor" If I copy my application manually, he is able to launch it without any problem. I included the detailled log below. Any suggestions PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.0 ...Show All
Visual Studio Team System Getting changed files after a given date programmatically
Hi , We have requirement to develop a tool where in if we give a particular date we need to find the list of files changed after that date. Any help on this will be useful. Thanks TeamFoundationServer tfs = new TeamFoundationServer (" http://server:8080 " ); VersionControlServer vc = ( VersionControlServer )tfs.GetService( typeof ( VersionControlServer )); DateTime date = new DateTime (2007, 2, 9); vc.QueryHistory( "$/" , null , 0, RecursionType .Full, null , new DateVersionSpec (date), VersionSpec .Latest, Int32 .MaxValue, true , false ); More API examples: http://blogs.msdn.com/buckh/archive/2006/08/12/tfs_api_links.aspx ...Show All
Windows Forms Convert.To double and then math.round( ,2) not working well.
Dear All, I have this problem where first I have text box in it I will key in a number. Upon that I will first convert it to double using the Convert.ToDouble() function. Then I will use Math.Round(convertedToDoubleValue,2). But unfortunately my output doesnt appear in 2 decimal format. What I want for example is that if I enter 4 I want the output to be 4.00. Can some one help me pls Thanks. You'll want to control the display string, not the value. Use a double.ToString() overload. For example: private void textBox1_Validating(object sender, CancelEventArgs e) { double value; if (!double.TryParse(textBox1.Text, out value)) e.Cancel = true; else textBox1.Text = value.ToString("N2 ...Show All
Visual Basic VB graphics
I have 3-dimensional array to store the colour values of pixel of an image. How can I draw the image in VB.NET using the array values as colours for each pixel. I also do want to write it in a separate function rather than a paint event and also need to invoke the method from a another function or event. Pls also tell me how to draw a graphic on a specific component such as picture box without using the picturebox_paint method. Thanks manju When the application is loading, create a Bitmap and put your colors in it. Then set the bitmap to the picturebox. This way you won't need to redraw everytime like the picturebox_paint method. ...Show All
SQL Server Understanding cube
Hi, I am new to OLAP and was reading on this area on the web. I come across this statement like: "while the relational database (OLTP) updates...the OLAP database will not be updated. " I am not sure of the above statment. In that case the data in OLAP is not the latest and how is it going to be updated Thanks. Regards Alu On the partion tab i BI-Dev Studio you have different setting for MOLAP(lower or higher latency) that you can try. I think this is a continous processing of cubes when new records arrive. You can schedule cube processing in a job in SQL Server(SQL Server agent) or in a SSIS package. HTH Thomas Ivarsson ...Show All
Internet Explorer Development IE 7 and Framsets
I am using a simple standard framset, in IE 7 the target is all off, opening each page into a new window instead of the proper frame. Is there a solution for this, I have refrences to it being an issue caused with tabing but have not yet seen a solution. Thanks Rian Edwards Yes, me too. I'm looking since two hours to find an answer in the web. It would be nice if someone from Mircrosoft can be post an answer. Is this a bug or a feature This problem happen with many affiliate links using in a frame. If the link point to another domain, the target are ignored by IE7 and a new window open. ...not nice... ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Quadtree frustum test?
How would one generally go about testing if a quadtree node is within a frustum. An octree node is more straightforward because it represents a bounding box, but a quadtree is flat and it wouldnt make sense to have a bounding box for a quadtree node It would be nice to get some direction here, how would I generally go about testing if a quadtree node is within the frustum in simpleton terms EDIT: everywhere I read about this, it seems that a quadtrees volume is represented as a bounding box, but this still makes no sense considering they are supposed to be flat, very confusing, this would mean that the bounding boxes min and max Y extends should be set to large values! (if I use min/max Y of both zero culling will fail, at least it ...Show All
