JosB's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. SpriteBatch can't be created
After migrating all of my code to Beta 2, everything seemed to work on on one of my desktops. On my other desktop, it seems that I can't create a SpriteBatch object. The device and everything will create and I can watch it run through a blank screen forever. But i can't create any kind of spritebatch object. Everytime i try to create one, the program crashes. Anyone have any ideas about how I can fix this Beta 2 requires a hardware Pixel Shader of 1.1 or better for SpriteBatch. This seems to have not been the case with Beta 1. There is a Microsoft Connect entry about this here: https://connect.microsoft.com/feedback/ViewFeedback.aspx FeedbackID=235558&SiteID=226 Personally I hope they can ma ...Show All
Smart Device Development WM5 : Winsock bind() VS Connection Manager/Planner
Hi, I developp application under VS2005/CF2, target is a pocketPC WM5, main component is a c# one, others are C++ dlls. From dlls, I use winsock to handle connections to 2 servers or more. When more than one network interfaces are active on device (wifi and gprs for example), how can I be sure that socket will be rightly bind to interface I choose by bind() I made some tests to connect socket (UDP or TCP) through gprs network interface (socket(), setsockopt(), bind(gprs ip address), connect(one of server), send()), but it seems packets are sent through wifi interface. I use bind, connect, send as sendto (from winsock doc) makes an implicit binding which can be made on "wrong" interface. Is there a link between ...Show All
.NET Development XPath expression - Sort multiple nodes
Hi Is it possible to select all node in <Element> and have them sorted on, for instance: A, desc B, asc C, asc Something like: "//Root/Elements/Element[desc(A), asc(B), asc(C)]" XML: <Root> <Elements> <Element> <A>1</A> <B>23</B> <C>90</B> </Element> <Element> <A>20</A> <B>0</B> <C>14</B> </Element> ... </Elements> </Root> Kind Regards Hi Ok, so if I for instance want to pick out Element tags containing: A>2, B==2, C<10 and sort the result: desc(A), asc(B), asc(C) I first have to select "A>2, B==2, C<1 ...Show All
SQL Server Converting date from string to datetime in data transfer task
The source is a flat file with a column where dates are stored as: 07/12/2006 11:35am. In some cases the column is blank. I need to import this into a table with a datetime column. In the data flow task, I get the error that conversion b/w String and DB_Timestamp is not allowed. First question is why does SSIS think its a DB_Timestamp column Shouldnt it be DB_Date or DB_Time. Anyway, when I add a Data Conversion Task in the Data Flow, and cast to the source column to either DB_TimeStamp, DB_Date or DB_Time I get an error. Please help. What am I doing wrong. Asim. No, different system. Also, when I use a conversion task in between and convert the source string to DT_DBTimestamp, which SSIS ...Show All
SQL Server Can I use a published report as a datasource for other reports?
Hi, I have a data table called STOCKPE which holds stock valuation information at the close of business each day. I wish to use reporting services to extract the data in this table on a daily basis and keep a daily history on the report server. I know I can do this - this isn't my problem. When I have the history of this table on the report server, can the data that the reports on the report server hold be used as a datasource for another report I'm no expert in reporting services, so if this is possible, or if there's a better way of doing it, please use small words and short sentences. No offence intended to all the very well educated SQLRS wizards out there, it's just that I'm not one of them and your answer will be lost on me ...Show All
Windows Forms EncoderParameters, rotating and flipping an image
I'm trying to apply transformations to a JPEG image like so: bitmap.Save(destinationPath, imageCodecInfo, encoderParameters); Where I fill in imageCodecInfo and encoderParameters. But I would like to rotate AND flip the image, but it only applies the first transformation specified by the first index in encoderParameters. encoderParams = new EncoderParameters(2); encoderParam = new EncoderParameter(encoder, (long)EncoderValue.TransformRotate180); encoderParams.Param[0] = encoderParam; encoderParam = new EncoderParameter(encoder, (long)EncoderValue.TransformFlipHorizontal); encoderParams.Param[1] = encoderParam; This is the code I use to set the transformations, but only the rotate180 gets applied. Does anybody know how to apply them both ...Show All
SQL Server Missing SET keyword.
Using the following update command I get the following message UPDATE Last, First, [Card Number], [Phone Number], IDKey FROM dbo.LibUserS error: Missing SET keyword. Unable to parse query text. incorrect syntax near ',' thats correct. The update statement requires the fields to update as well as on which record you want to update. Example: UPDATE [TableName] SET [FieldName] = someNewValue WHERE [fieldName] = SomeValue typically: UPDATE [dbo.LibUserS] SET Last = @p1, SET First = @p2, SET [Card Number] = @p3, SET [Phone Number] = @p4 WHERE IDKey = @IDValue the @parameter is the parameter you supply in the query o ...Show All
Smart Device Development Having Trouble With WebBrowser Control
Hello I'm creating an application on Windows Mobile 5 using c#. This application uses the WebBrowser control to show a specific website. The problem that i am having occurs when the app runs on the device. (Motorola Q). For some strange reason the application shuts down as soon as it gets to the line : this.webBrowser1 = new System.Windows.Forms.WebBrowser(); which is in the InitializeComponent() method. It does this without an exception. When i connect the device and debug from VS.net 2005. The app shut off and i get a cannot connect to this device message. I'd try these two things: 1. You could try hooking the AppDomain.CurrentDomain.UnHandledException event, and see if you get anywhere. 2 ...Show All
Internet Explorer Development document.selection.createRange() does not always return all the elements selected by the user: why? workaround?
In the context of IE6 Scriptable Editing, Multiple element selections are not always reported in the collection returned by document.selection.createRange(); Depending on how you hold your mouth when selecting two or more elements (DIVs), the controlRange collection does not always contain references to the ALL the selected controls. It seems to return either one control or all of them. Oddly enough, if I select the element's parent element too, then all the selections (including the parent) show up in the collection. (Of course, I don't want to have to do that). Oddly too, I can move and resize these elements as a group even through document.selection.createRange() only reports the last selected element. Here are a couple other facts: AU ...Show All
Visual Studio Custom IDE...
Hi, I am currently working on customizing IDE . I have VS IDE (PPE). I have developed my own user controls and I am using tool windows to host my controls in IDE. As I understand from "Dev labs" in Redmond that I can not have data persistence for multiple tool windows. What is the recommended method and place for storing the data from tool window for data persistence My next question is how do I get certain events(VS starts, exits etc) from IDE so I can write event handlers and store the data from my tool window (user control) and then load it back on next instance. Thanks, Atul Hi Atul, I usually handle initialization stuff when the control's handle (HWND) is created, ...Show All
Visual C# How to display output using for loop in TextBox?
A simple question: for ( int i = 0; i < 10; i++) { textbox1.Text = i.ToString(); } I want to display 1 2 3 4 ...9 in textbox. However, the codes above only displays 9. Can anyone help Try "\r\n" or better Environment.NewLine textBox1.Text += i.ToString() + Environment.NewLine; ...Show All
SQL Server MDX multidimensional sum
Hi i m a new at mdx i have a big problem with the sum simple cube: SET [Agreed Action List] as { {( [Agreed Action].[Description En]. children -- IF I Decomment the following line adding another level to the row hierarchy ... boom --,{ [Trafficked Person].[Sex En].&[male],[Trafficked Person].[Sex En].&[female]} )} } MEMBER [Agreed Action].[Description En].[sum] as 'Sum([Agreed Action List],[Measures].[TP Count])' SELECT NON EMPTY { [Agreed Action List], [Agreed Action].[Description En].[sum] } ON ROWS , NON EMPTY { [Case Opened Date].[year].&[2001], [Case Opened Date].[year].&[2002] } * { [Measures].[TP Count]} T ...Show All
Windows Forms Real Cut, Copy and Paste... How?
How can I make my "Edit Menu" with "Cut", "Copy" and "Paste" in my windows application without need to type a code for each textbox that I have. For example: if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text)) textBox1.Text = Clipboard.GetDataObject().GetData(DataFormats.Text).ToString(); else textBox1.Text = "The clipboad does not contain any text"; In this case if I have 20 textbox I need to type 20 times the code. Is there something like a generic code The program will cut, copy or paste in any textbox I want, without the need to make a biblie of codes. Is this possible Well, of course has to be possible... but how Thank you. Try this: ...Show All
Visual C# Random input testing
On a previous project, I did development for the Palm OS. There is a testing tool from Palm that runs your app and generates random text entry and click events. Does a similar tool exist for windows applications you could create your own! :-) I think you are looking more of an automated system take a look at this: http://msdn.microsoft.com/msdnmag/issues/03/01/UITestAutomation/ I'm sure there are more ...Show All
Smart Device Development new e-mail notification
Hi, is there a way to receive a callback to my application whenever a new incoming mail is received to the windows mobile (CE)'s inbox in outlook or other mail client application thanks, Ofer. You can catch incoming SMS messages in WM2003 http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetcomp/html/ReceivingSMSMessages.asp ...Show All
