Ori''s Q&A profile
.NET Development .NET 1.1 vs .NET 2.0 behaviour with Image fields
In not .NET 1.1 and 2.0 the System.Type mapping for a SqlDbType of Image is byte[]. If you use this type to create a SqlParameter (with a value of DBNull.Value) and then use this in a SQL statement of the form "Update table Set ImageField = @parm where ......" Then in .NET 1.1 it works, but in 2.0 you get an Exception "nvarchar is incompatible with image" How can you determine the correct System.Type to use for Image fields, and why is the behaviour now different The application code is generic and not tied to specific database designs. Thanks Tony OK, here goes. We have a generic Messaging application designed to acceps XML messages from varying clien ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2d graphics how to animate a sprite
Could someone please post the source code that is needed for how to animate a sprite that is an example in the xna game studio express help that is in the programming guide section under graphics. Could you also please post a animated sprite sample to go with the code. I could not get that example to work. I tried to debug my program but the program stopped responding. Needless to say, I am not a programer and never used C# before. But I am trying to learn how to use the xna game express . Thanks. I have a tutorial on animating a sprite on my site. Here is the link. http://www.xnadevelopment.com/tutorials/thewizard/theWizard.shtml Basically, the tutorial covers making a character walk, duck, jump and sho ...Show All
.NET Development Where to store the XML file
I am having no fun at present trying to find somewhere Global to store my xml settings file. It is important for end users on limited accounts to be able to write to this file.. Any Suggestions Instead of a file, create a SQL database which can be queried for the settings. The user can be authenticated by their login credentials when run from your program. That way common secure access is guaranteed and no need to save a static file.... ...Show All
.NET Development writing a Telnet client with VB. NET
Hi, I am trying to write a simple telnet client using VB.NET with Visual Studio 2005. I am using System.Net.Sockets. But I cant make it work yet. What I need is: To automate some tasks on UNIX server. To achieve this, I need to login to unix (from within my app.) via telnet, and run some commands. T hats all. Anyone can help me with this Thanks Fede. Hi there, I've the smae issue and I've downloaded the ScriptTelnet C# project from the URL provided above. Now how do I implement using that class in VB.NET I apperciate any help in advance. ...Show All
Visual C++ DeviceIoControl FSCTL_ALLOW_EXTENDED_DASD_IO returns false
Hi, CString str = \\\\.\\CdRom0 ; hCD = CreateFile (str, GENERIC_READ| GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); status = DeviceIoControl(hCD, FSCTL_ALLOW_EXTENDED_DASD_IO , NULL, 0, NULL, 0, &returned, NULL); The above DeviceIoControl returns false. Any one knows what , I am doing wrong. I tried this above after ReadFile failed for some sectors of a file in a single file CDROM. This happened when I tried to copy the file, it gave device I/O error. Thanks, Arun For such issues, a bett ...Show All
Visual Studio about CodeElement.Children
hey,guys, i have got a problem when i am writing a add-in. the CodeElement.Children works fine in VS2005, but it does not work in VS2003, an exception is thrown saying something like the function is not implemented. i use C#. is the CodeElement.Children is not implemented for C# in EnvDTE70 what should i do if i want to use CodeElement.Children is VC++ .NET capable i don't know if it is the right place to ask this question here. if you know code model, could you just give me a hand ^_^ thanks. Regards Felix Not all methods/properties are implmented for all languages. There are two methods, Children and Members which do the same thing but in a slightly different way - Children will list everything tha ...Show All
Visual Basic to split last character on textbox
hi for example;textbox1.text="test;test1;test2 ; " I want to split last character. it will be textbox1.text="test;test1;test2" how can I do You can also use TrimEnd or Trim i believe. They are both members of the string class, and take an arguement, being the text your want to trim. Hope that helps ...Show All
Visual C# Timer
Hi, I want to make just a simple example.... I have two TextEdit and one button,and one timer.... In timer's properties I have declared the time as 8000 (8sec)... and this I want is when I press the button the timer to start counting and after 8 sec to copy the text from textEdit1 into textEdit2..Just that :).. My example code, which it doesn't work :( , is: namespace WindowsApplication3 { public partial class Form1 : Form { bool flag = false; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { timer1.Start(); timer1.Tick += new EventHandler(timer1_Tick); if (flag == true) { textBox2.Text = textBox1.Text.ToString(); } ...Show All
Windows Forms SplitContainer Panel MinSize Defect?
I have a vertical split SplitContainer inside the top panel of a horizontal split SplitContainer and am trying to set the panel2 min size for it. I'm getting the following designer error: SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize. This is somewhat confusing first of all, since the change was made in the designer. In the first instance therefore, I'm assuming this is a bug in the designer. The logic of the error message is that SplitterDistance should be between 0 and 560 minus 243 i.e. 317 which at 311 it is. Has anyone else come across this or have a workaround // // splitContainer2 // this .splitContainer2.Dock = System.Windows.Forms. DockStyle .Fill; this .splitC ...Show All
Windows Live Developer Forums MapCruncher customer tile layer looks a little MapBlended ...
I tried making my own custom tile layer using MapCruncher and it looks very good when I view it using the samplepage.html that comes with MapCruncher. However, when I tried to use my own html page by modifying the custom tile layer code in the sdk it looks a little blended. Does any one know why this is happening I made the following modifications to the custom tile layer sample code: function GetMap() { map = new VEMap('myMap'); Changed the default Lat Long to centre where my custom layer is. map.LoadMap(new VELatLong(43.7706272357647,-79.5549744612714),11,'r' ,false); GetTiles(); } function GetTiles() { Modified boundary box to be in the general location of the map var bounds = [new VELatLo ...Show All
Visual Studio Moving VSS6 from one server to another - howto, plus bonus questions
Hello, We are currently running VSS 6.0a on an old piece of hardware running WinNT. That server is going away. We have a newer server running Win2003 Std. that will host VSS moving forward. I need to migrate our existing VSS over to it. I am by no means a VSS expert - mostly just a user, but now with Admin rights (this got dumped on me). Also, our office is closing next year, so I really don't see the need to upgrade to the newest version of VSS and deal with users not understanding this or that on the interface, or getting upset about the GUI changes. We'd really just rather move the data off of NT and onto Win2003, and let the company decide later if they want to upgrade VSS versions or move to different source control software. ...Show All
Windows Forms Unhandled Exception in NumericUpDown Event Handler
The NumericUpDown control throws a NullReferenceException if Application.DoEvents() is called in the ValueChanged event with some additional processing and the up or down button is pressed rapidly. The exception can also occur if the event handler takes a while to return. To reproduce, add an event handler for the ValueChanged event on a NumericUpDown and insert the following code into the event handler: for(int i = 0; i < 10; i++) { Application.DoEvents(); Thread.Sleep(50); } Run the project and hold the up or down arrow for a few seconds. The following exception occurs: System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.UpDownBase.UpDownButtons.TimerHandler(Object source, ...Show All
Visual Studio Express Editions How to get MAC Address on remote Computer using VB.NET
How to get MAC Address on remote Computer using VB.NET. by pinging you cannot get a MAC Address, ping only pings a destination (IP/hostname) to see if it exists and what the responses are (TTL, speed/response). WMI would be the way to go in this case as you can specify which computer you wish to query to get the MAC Address ...Show All
Visual Studio Team System Feature request - Show labels in the history viewer....
We were trying to determine today when a file was labeled, this was not easy to do in the UI, showing the labels as a line in the history viewer would be very useful. Thanks, Jim It might be better to log this suggestion at Visual Studio and .NET Framework Feedback . ...Show All
.NET Development "bindingRedirect" in web.config does not work (but in machine.config is does)
Hello everybody, I'm using the "bindingRedirect" element in my web.config to allow updates of my referenced assembly without recompiling my website. But I still receive the same error: Could not load file or assembly 'TestLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c417d4d39ba0d6b2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I built my website with version 1.0.0.0 of "TestLibrary". After that I created a version 1.1.0.0 of "TestLibrary" which I placed in the "bin" folder of my website. When accessing the website, the error above is shown. I read that it's possible to redirect a ...Show All
