Tom25's Q&A profile
Smart Device Development specifying path names on windows mobile
hey there.... I am using visual studio to create a program that reads and writes from an xml file "books.xml". Everything deploys ok to my ppc but I'm having trouble specifying the path name of the xml file. does anybody happen to know... - How can I specify an absolute path on windows mobile 5 ( "c:/books.xml" doesn't allow me to find the file). - Where should I put an xml file when using a relative path referring to("books.xml"); and placing the file in the deployed application directory on my ppc returns an error that it can't find the file either. any help is would be greatly appreciated.... ch ...Show All
Visual Basic Embedding bitmap in XML
Hiya everyone, Hopefully a pretty straight forward question with an even more straight forward answer: I wish to embed a bitmap in an XML file. I've been able to store it alright - I setup the XMLReader to output to a stream and then save the bitmap to another stream which I then add to the first stream. Like so: Dim writer As Xml.XmlWriter Dim file As IO.FileStream Dim pic As IO.MemoryStream Dim theBitmap As Bitmap theBitmap = Bitmap.FromFile(someFile) file = New IO.FileStream(filename , IO.FileMode.Create, IO.FileAccess.Write, IO.FileShare.Write) writer = Xml.XmlWriter.Create(file) (some XML commands) writer.WriteStartElement( "picture" ) pic = New IO.MemoryStream() theBitmap.Save(pic, Imaging. ...Show All
Visual Studio DSL tools & Device applications
Hello, i do not seem to be able to create a designer that can be used in device projects. My designer does not pop up in the device project 'Add new Item' dialog. Is there some sneaky feature that i should use and am missing Thanks in advance, Peter Vrenken Hi Peter, The contents of the "Add New Item" dialogue are filtered by "TemplateGroupId" and "TemplateID" elements in the item template: see http://msdn2.microsoft.com/en-us/library/ms171388(VS.80).aspx for details. By default, the generated item templates for your new DSL won't have the necessary settings. You should be able to create another itemtemplate with the necessary settings and register it as part of your designer installation. I've ...Show All
Game Technologies: DirectX, XNA, XACT, etc. if (XNA < DirectX) { drool; } .... DirectX or XNA?
I have been wanting to develop a game for a while now, and I am finally getting all my technologies together. Basically, I want to create a simple RTS that models that of starcraft because I am a major fan of that game. The problem is, I can not seem to decide if XNA will be able to do what I want it to do, or will I have to move to DX9c. I want to have multiplayer support as 1 of my big things, since the best thing about Starcraft is it's multiplayer, and I see that XNA does not have support for that sort of thing and certainly not an easy way to implement it. If you have any suggestions I would appreciate them, thanks. PS: My C++ skills are absolutely terrible, so I would probably have to learn C++ to use DX9c unless you can ...Show All
Visual Studio Express Editions Taking a Break
Decided to take a break from the program I've been working on a play around with something else for a while. What I have done is drawn a rectangle in the paint event of a picturebox, and now I want to place a picture on top of it that is transparent in certain areas so that you will only see the rectangle where the transparency is. Can this be done The answer to your question is Yes. If you're also asking how then have a look at this: Public Class Form1 Dim B1 As New Bitmap(200, 200) Dim B2 As New Bitmap(200, 200) Dim G1 As Graphics = Graphics.FromImage(B1) Dim G2 As Graphics = Graphics.FromImage(B2) Dim PB As New PictureBox Private Sub Form1_Load(ByVal sender As System.Object, ByVal e ...Show All
Visual C# C# Real-Time programming.
I am trying to figure out if there are more things then process priority that can improve the responsiveness of C# applications. Is it possible to force a program to stay in memory without turning off the swapfile Is there anything else that can be done Yeah, i know that. Im not doing an app that has true rt constraint like but i want to get as as close to rt as i can. Im creating a termial-server app that only runs a gui in windows, but i want the gui to be as responsive as possible. It will do a lot of caching so i rather delete stuff from the cache to free memory then swap it to disk, as getting the data from the server may be faster then local disk I/O. ...Show All
Visual Studio Express Editions How to receive current row number to use it later
I'm just learning Visual basic 2005 Express Edition and I'm writing a simple application where I use DataGrid. While navigating in it I would like to open a new form filed with the data from current row. I know there is a possibility to open a different form set on a certain position but I would need to receive the row number from my DataGrid. How can I do that or maybe there is an easiest way to set the position in the different form You can only use the SelectedRows property if you have the SelectionMode set to FullRowSelect or RowHeaderSelect. Assuming that you have, something like the following should work for you: This assumes that you have another form "Form2" which contains three l ...Show All
Community Chat I can't believe most Windows users don't know how to use toolbars, OMG.
This is most irritating. Almost all of Windows users in my company don't know how toolbar works. They don't know they can enable toolbar, take out toolbar, customize toolbar, and not even the simplest of all, move toolbar around. Toolbar is so simple, standard, and flexible. And yet, they don't know how to use it. And now, I think that's the main reason why IE7 doesn't support moveable toolbar, and that pisses me off even more. Argh. I remember when toolbars first started coming out, they were a real pain in the arse if you accidentally moved things around and lost "icons" for features you wanted to use. Also, I have seen many apps go back to the default setup. Who wants to setup your toolbar ...Show All
Visual C# .NET calculations around the number 16384.51
I have a question regarding why .NET calculates something strange. We encountered this by accident. Consider the two below lines of code: int iOK = ( int )(16383.51 * 100); int iNotOK = ( int )(16384.51 * 100); When this is compiled and run, the variable iOK will hold the value 1638351. The value iNokOK will hold the value 1638450 - note the 0 in the end when 1 was expected. I tried different values for some time, and it breaks just at that number 16384, which is nowhere near the limits of int. How can this happen Not so much ‘default behavior’ as it is ‘natural properties of integers and floats’. ...Show All
Visual Studio Express Editions Another How to question
Hello to All: I am trying to figure the method for keeping track and setting the limits for inventory. So how do you do this Inside my array I have 5 products (Product-"A45" with an inventory or quantity of "2" for a price of $4.50, product "B24" that has a quantity of 5 and so on (Three more products) )of information in text files. I need to set up some "if statments" to set the limit for the inventory. So in other words if the user selects a quantity of 3- A45 products then the progam will respond with a message box telling that user that there is not enough inventory to order that product. Notice that I have tryed a few methods or statements that do not work. So far , it is just that I am stuc ...Show All
Visual Studio 2008 (Pre-release) Doubts concerning Linq
I have some doubts about Linq: 1) What is the sintax for an update command, like below: update <table> set <field1> = value, <field2> = value where <field3> = value and <field4> = value 2) Isnt Linq really providing a native provider for Oracle, MySql Letting this to other vendors looks like ODBC :( 3) Is the idea of Linq to take 100% of ORM market share Why would one continue using other ORMs if Linq (which is integrated to VS2005 and Orca) is able to map DB as well to entities 4) Is Linq really linked to Orca RTM When will that be, is there any planned date yet LINQ is not about being integrated to Microsoft products. It is about being integrated to your prog ...Show All
Windows Forms Calling a method in form1 from form2.
Ok this is my first post on these forums so go easy with me please Ok as you can see from the threads title im trying to call a method in form1 from form2. This i have managed to do but what im trying to do is when calling the method from form2 i need it to add some text to a textbox in form1. For some reason this will not work, but if i add a simple messagebox to the method this gets called and the messagebox pops up Now i've only been coding in C# for a few months and im new to this so please go easy with me. Here's what i have so far... Form1... namespace CallingMethods { public partial class Form1 : Form { public Form1() &nb ...Show All
Windows Search Technologies How do you get the Desktop Search Bar to show?
I am trying to figure out how to work this thing. I can not figure how to get the Desktop Search Bar to show on start bar. Can anyone give me some insight as to where I can get a Getting Started paper for this thing or tell me how this works Thanks Greg Forster I was using the version you mentioned - the latest full version. It didn't work so I installed v.3 beta to see if that would, and it didn't. I can easily uninstall v.3 and reinstall the latest full version in order to apply any fix you might have. ...Show All
SQL Server How do I set the default value of a column = to another columns value in the data row + 1
I need to have the default value of a column of a specific table to be set to the value of another column in that same table + 1. I am using Sql Server Management Studio I tried setting under the property for the column "Default Value or Binding" = myTable.MyColumn + 1, but it does not appear to be the correct syntax. Please assist. If you read the previous posts, the question wasn't whether to write a function, but rather how would you even get a function to work in this scenerio I opted to use triggers because I could not find a way in a function to grab the Identity(or column 1) and insert into column2, and have it work for multiple tables. If you know how please let me know. I can think of one way which ...Show All
Software Development for Windows Vista Which WF version to use with examples ?
I'm trying to explore the State Machine examples ansd tutorials, particularly where SQL tracking and persistence is used. I don't seem to be able to find a set of matching/working framework, samples and tutorials. I'm hoping someone out there has a good idea on which version of WF (e.g. beta 1, beta 2_2, RC1) is most stable with the State Machine, SQL Tracking and Persistence examples (and where to get those matching samples & tutorials from). Thanks in advance, Richard Thanks for the reply. However: - I clicked on your link to the latest samples, clicked on the "Download Sample" link and received a 404 "location cannot be found" page - I clicked on your link to the ...Show All
