pkul's Q&A profile
.NET Development Async sockets, receive callback problem
Hi, I'm writing an async socket server that transport custom serialized objects. However, I ran into a problem when sending a lot of messages in a loop from the server to the client. To simplify matters I shortened my test code: Here I'm sending some data to the client... for ( int i = 0; i < 100; i++) { state.WorkSocket.BeginSend(b, 0, b.Length, SocketFlags.None, sendCallback, state); } The client receives the data and processes it: StateObject state = (StateObject)ar.AsyncState; &nb ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D animations
I am going to implement 2D animation in my program. The animation use a list of bitmap (with alpha channel) stored in ONE binary file and therefore I create an array of texture before showing the animation. But I find that when I try to create all the textures at the beginning, the animation is okay, but loading textures is quite slow and the memory usage is also very large(1xx MB), which is not acceptable. Are there any method to reduce the memory usage Thank you A couple of points: 1) Are your textures sized in a power of two ie 512x512 pixels. Most graphics cards have an awful time with textures that ...Show All
.NET Development listview.selectedindexchanged
How can I write this: every time I select a new row in the listview, orfvalgtprodukt is updated to the text in the first column in the selected row in the listview You probably need to check if there actually is something in the SelectedItems collection before trying to use it. If lstProdukt.SelectedItems.Count > 0 Then orfValgtProdukt = lstProdukt.SelectedItems.Item(0) ... ...Show All
SQL Server Question on Report Builder/Designer
I have Visual Studio 2005 Team Developer. I don't need SQL2005 since I have SQL2000. How do I get Report Designer/Builder for VS2005 I would like to use the Report Designer/Builder to build reports for Windows applications. Do I HAVE to buy SQL 2005 Thanks. Reporting services is an add-on for SQL 2000, but it is available. You can download a 120-day evaluation version here: http://www.microsoft.com/downloads/details.aspx familyid=BA517C01-2E2F-4BC7-84AF-149B7637F807&displaylang=en ...Show All
.NET Development Zip files in c#
Hi, Does anyone know of a way to zip files in c#. I tried using sharplib but the compression utility that comes with XP is not able to unzip the files. I need a format that can be unzipped by this and most other compression tools since I am not sure exactly what my users will be using to unzip the files. Thanks in advance stax0711 wrote: I wonder how hard it is to zip/unzip a folder using Sytem.IO.Compression. You can do it using the System.IO.Compression namespace BUT you have to add a "small" payload. The Framework compression classes handle the ZIP-age of the data stream but you have to h ...Show All
.NET Development How to create a new database on SQL Server 2000 from (VS.NET2003 C#) code
Hi I need to include in my Visual Studio .NET 2003 project some code responsible to create a new database on a SQL Server. Suppose I have any necessary security permission for login on SQL Server (sysadmin, serveradmin, etc.). Note that I only use C# source in my project. Tryed already: 1. to use SQLConnection or SQLCommand, but both require an existing database name 2. to use SQL-DBO classes, but found no support for C# Thank you Hi, Just make a connection to the master database of a SqlServer. This database is default to every instance of SqlServer so you don't have to ...Show All
SQL Server SSIS Script Task and Other Assemblies/DLLs
I am developing a Script Task for my SSIS package to transfer a file via FTP over SSH (SFTP). I have a nice set of Assemblies/DLLs (purchased from IP*Works) that gives me the added functionality of SSH. To even get Visual Studio for Applications to see it in the reference list, I copied the DLL (nsoftware.IPWorksSSH.Sftp.dll) to the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory, added it in the references for the script, and added the Imports nsoftware.IPWorksSSH.Sftp line in the script. As described in: http://sqljunkies.com/WebLog/knight_reign/archive/2005/07/07/16018.aspx Yet, when I try to run the SSIS package I get a ...Show All
Windows Forms HTML Editor Control
Hi, I want to give an HTML editor in my Windows Form application so the user can compose and format HTML text message (same as message editor in this forum when we compose a message) . In web application, there are many controls can do that like FCKEditor, RichTextBox, etc. Can someone point me out how to do that in Windows Form Any Free/OpenSource 3rd party controls is ok. Thanks in advance, Melinjo Hi, Lutz Roeder has one, Writer for .NET (has Writer.Html.HtmlControl inside it), you can download from his website: http://www.aisto.com/roeder/dotnet/ Here's how you can get the control to yo ...Show All
SQL Server sql_variant and double.PositiveInfinity
Hi All, With SQL Server 2000 it was possible store an infinite value in a sql_variant column. Since I upgraded to SQL Server 2005, I got following message: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 4 ("@Actual"): The supplied value is not a valid instance of data type sql_variant. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision. What has changed between SQL Server 2000 and SQL server 2005 Is there any workaround Thanks, Michael Th ...Show All
Visual C++ Issues arising from type Nullable<T>^
(With VS2005 Pro) Should type Nullable<T>^ be allowed at all When a nullable type is boxed, the new object is of the target type. Nullable<int> n = 17; Nullable<int>^ nbox = n; bool b = (nbox->GetType() == Nullable<int>::typeid); // false Object^ o = nbox; int^ ibox = dynamic_cast<int^>(o); bool eq = ibox == o; //true However, when I type ibox==o at the Immediate window, it evaluates to false, despite the variables not having changed. Looks like the C++ code uses the Equals() method but the Immediate window uses the ReferenceEquals() method. Typing ibox.Equals(o) in the ...Show All
Visual Basic VB6 upgrade to VB 2005 failure, could not find project file it created
Help me, oh wise one. I support applications in VB6 and VB2003, and I'm trying to upgrade the VB6 app to VB2005, so I have three versions of Visual Studio on my pc. I ran VS2005 and opened the VB6 app to launch the upgrade wizard. It seemed to run fine until it threw an error saying it could not find the project it just created. The project I'm trying to upgrade is called MGxFromSAP.vbp. The error said it could not find MGxFromSAP.vbproj. The project file it actually created is called MGxFromSAP.vbproj. vs7.vbproj . When I try to open this project in VS2005 it says it was created in an earlier version of Visual Studio and needs to be upgr ...Show All
Visual Basic retrieving a selected value from DataGridViewComboBoxColumn
How do you retrieve a selected value from a DataGridViewComboBoxColumn Thank you, looking for the same thing. i have a datagridview with a combocolumn. I need to display the displaymember-value in for example a messagebox. how can this be done ...Show All
Visual Basic Visual Basic ToolBar and ImageList
I am new to Visual Basic. So the differences between C++ and VB are striking to me. But even this seems like too much. Here is what I am talking about: I got a project out of source safe and I started working with it. The Graphics associated to an image list had been compiled into the project but the actual graphic files were missing. So they appeared in the project at first but then the buttons associated with the image list went blank. I thought all I had to do was to get the graphic image files and then reassign the image list and the toolbar. But NOOOOO. According to the book I have, once the image is set, you cannot cha ...Show All
.NET Development How to uninstall .NET 2.0 beta?
Hi, Since I have no clue where to post this, I'm taking a chance and post my question here. If this is not the right place, please tell me what is. It appears that the .NET 2.0 redistributable package is finally available here: http://www.microsoft.com/downloads/details.aspx FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en#related . When I try to install it, I get the message that I should uninstall the beta version first. However, I have not found how to do that. Can someone help me out Regards, Guido I had issues similar to the one described here, if the control panel or unins ...Show All
Smart Device Development NLed API : turn on and off Leds
Hello, I'm starting developpement with an industrial smart device. It's new for me to develop with smart device. This PDA run WIN CE.net 4.2. First, i want control some element as backlight and the 3 leds. I can turn off by : DevicePowerNotify("BKL1:", CEDEVICE_POWER_STATE.D3, POWER_NAME); turn on by : DevicePowerNotify("BKL1:", CEDEVICE_POWER_STATE.D0 : POWER_NAME); But my problem is with the leds, i can't make leds on or off with the NLed API. NLedGetDeviceCount return only 2 but i have 3 leds. and NLedSetDevice could turn on only the first leds, nothing to the other. Have you any idea ...Show All
