Peter van der Veen NL's Q&A profile
Visual C# Inaccurate/Wrong calculations
Hi, I working on a fairly large project in C#, combining numerous components such as SQL and DirectX. We all, however, seem to have come across a severe problem! We can't do basic arithmetic! For example, in VS.NET 2003, I need to subtract two UTC style time values - eg 11565456546546.1342345566 etc. double large_val1, large_val2; ... double difference = large_val1 - large_val2; Instead of the result I expect (and indeed the result shown in the Watch window during debug for large_val1 - large_val2), I get a servely rounded value instead - that is entirely useless!! Help!! I can do this in a standard command line / console application and everything works fine - why should there be any difference ! I have tried decimal, ...Show All
Visual Studio Express Editions Datetime-Time
Hello, I am a complete novice trying to understand the basics! I have created a sql with a Number date time fields, and a form for input. I changed the date pickers for a masked boxes as I only need to work with time values. "00:00" However when I enter a time it automatically saves the date as well, and the masked box displays the first part of the date.ie. Enter "20:00" Displays "04:12"(todays date) What is the best method of working with time values, bearing in mind that I will need to do time difference calculations using my time fields. Any examples or advise greatly recieved. Chaz. The first step in creating any data based application is to decide what type of database you ...Show All
Visual Studio 2008 (Pre-release) Does "System.Windows.Controls.Label" support text wrapping?
Long text will be clipped by label bounds. But i need text wrapping functionality like in TextBox control: TextBox textBox; textBox.TextWrapping = TextWrapping .Wrap; Sorry, I found solution http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=246398&SiteID=1 ...Show All
SQL Server XML into SQL tables with relationships
Hi, I'm trying to find the most efficient method of importing XML files into SQL Server using SSIS. The objective is to read these files created in a source directory and potentially there will be a large number of these created every second. I've experimented with the XML Source data flow task and been able to import using either the OLEDB Destination or SQL Server Destination.Using the associated XSD file These methods work well when there are no PK or FK relationships, i.e. the target tables are stand alone. However when I use a schema that has relationships I need to be able to import and be able to return the key then use this key to import into another table to ensure the FK relationship and so on..... From what I know ...Show All
Windows Forms Accessing another program's menucommands programmatically
Hi, I am using VB.Net 2005 and don't have access to Visual Studio Tools for Office (hence my post is not in that forum). I need my vb.net program (as distinct from a vb macro from within Word) to "hook" into MS Word, locate a specific menuitem and cause that menuitem action to occur. I think <menucommand.invoke> is intended for this purpose, but can't work out how to access the menus to do so. Gaining access to MS Word via my program is not difficult - I've done this with Excel in the past so should be able to work that out ok. It's identifying the menu and menu sub-item which I'm unsure of. Any help, greatly appreciated. Thanks, Brian ...Show All
Visual C++ Crashing in ntdll.dll RtlAllocateHeap
I'm trying to address a crashing bug in a dll that I'm working on. The bug is peculiar: it only occurs in the release build of the dll, and when I get a stack trace from a crash the problematic frame is never within our dll itself, but usually within ntdll.dll. Poking around with disassemblers has revealed that the crash always occurs in the function RtlAllocateHeap. So the question is: what would make RtlAllocateHeap cause an EXCEPTION_ACCESS_VIOLATION Note that it's *not* that a memory allocation function returned NULL, because that would generate an exception in the caller when they tried to use the pointer. Rather, the crash occurs within the RtlAllocateHeap function itself. My working guess is that someone is calling a malloc function ...Show All
Visual Studio 2008 (Pre-release) Model-View-ViewModel INotifyPropertyChanged
Hello, I'm tyring out Model-View-ViewModel, my ViewModel is exposing a Brush property named BackgroundBrush, that I would like to change on certain events. Everything works fine, but when I change the backgroundBrush the view doesn't reflect the change. That is because my ViewModel is not implementing the INotifyPropertyChanged. I guess I have 3 choices: 1. Have my ViewModel implement the INotifyPropertyChange, so that if any prop change then the view will be automatically notified. 2. use x:Name and access the control and set the background property through the code (yuk). 3. Put the backgroundBrush in the StudentModel (yuky). Are there any guidelines on how to do this Thanks Houman ...Show All
Visual Studio VS 2005 profesional debugger exits unexpectedly
Hello. I am developing a custom class library in visual stuido 2005 profesional eddition. There are some bugs in my code and I am trying to use the step debugger to walk through the code and examine the data. However at random points in the code the debugger will just stop and exit out. It happens in lots of differnt places through the code, not just one specific part. If i keep clicking, "step into" fairly quickly, it will step through just fine. But if I pause for a minute to examine some data in the watch window, then 90% of the time the debugger will crash without any error message. After the crash occurs, the following text appears in the debug output window. bling, is the name of the test program i am running. 'bling.v ...Show All
Visual C++ problem with /arch:sse2 on AMD
hello i work with VC++ 2005 on an AMD 3500+ venice processor although the cpu support SSE2, compiling with the option /arch:sse2 yields a much slower code then the regular release build without this option. any ideas 10x, eyal. /arch:SSE2 doesn't generate only SSE2 instructions but rather a mix of x87 & SEE2. There could be some cases where the code might be slower (although in general, it should be faster). If you think that such degradation in performance is unacceptable, please log the issue at http://connect.microsoft.com/Main/content/content.aspx ContentID=2220 with a sample reproducing the problem. Thanks, Ayman Shoukry VC++ Team ...Show All
Windows Forms Validation of fields in form
Hi I am trying to do the following. I have a form (VB visual studio) whis has 70 fields. I have almost 180 validation about to implement on that form. Any one please let me how I can best implement 1. Am I able to create dll file and put all validation, so when validation triggers, the field will check the necessary dll file. ( I am not sure I am right or not also I am new for this language) 2. Or Do I have to put all validation in the form it self Or any other effective way to do it . Thanks in advance Hi Yes!! I found. Thank you very much. Sorry to ask another question. I have combo box , which is displaying only one field from the table But I want to display TWO field in the combo box.(like in Access database). Any help would ...Show All
Visual Studio vs2005 sp1 install fails
On my computer (win2003) I get next message: The installation source for this product is not available. Verify that the source exists and that you can access it. On other computers it works... What can I do bye Damijan I'm stuck as well...I've tried removing all patches and hotfixes from my vs 2005 pro installation, but still no luck. Has anyone been able to work through this problem yet ...Show All
Visual Basic Path/connection string to Access DB
Hi, I'm building small desktop application that will be distributed to several of my company locations in N.A. and Europe. Application will use MS Access DB. DB will be stored/installed in unknown(to me) location likely on each office shared drive. Each office location will have its own copy of DB to which individual users should be able to connect to from their desktops. I'm using VB 2K5(VS2K5) Question: How to setup path connection string taking into account the above. Thanks Peter Thanks ahmedilyas, I was thinking about similar solution - problem is, I don't know how to approach it. Could you give me some more pointers Thanks Peter ...Show All
Visual C++ C++ retrieving data from database.
Hi, How come when I use C++ to read data from Access database, it only let me read up to 255 chars instead of all the text I have in that specific cell. What's the right command I have to use in C++ to be able to read all the text in the cell. Please help!! thanks in advance. Jason Your question is a little vauge. I suspect that you are trying to use some form of ADO to retrieve a TEXT field (which is limited to 255 characters in MS-Access). It sounds like you expected more than 255 characters, so maybe you have a MEMO field. At any rate, the problem is likely that you are trying to retrieve MEMO data into the wrong ADO data type. Even if you're not using ADO, you still are using the wrong data type. ...Show All
Visual Basic metafile image size changes by 96/300
In the IDE, I load a metafile (wmf, made with Visio) as an image for a picturebox or a form. AutoSize is True. The Size is 3291 * 2256 and it looks huge. When I run the program, the size is 96/300 times smaller and it looks as expected. And after running, it looks as expected in the IDE too. What changed it To explain a little more: I want to use an A3 size Visio drawing as a picture in VB. The drawing is saved as a windows metafile. The user should be able to scroll and zoom (around the center of the window) freely. I want to have (a lot of) clickable areas on the picture that bring up tooltips, context menus etc. So far I have spent weeks with things that work a little bit but crumble when the next s ...Show All
Visual Studio Team System Visual Studio closes when I try to delete a webtest that is checked in
Hi, I have a solution with a project containing webtests in it. Folders hold the webtests in the project. I am connected to source safe and when I try to delete a webtest that is no longer required, i get an option saying "The webtest will be deleted permanently" and when I hit to continue, the vsts closes and asks if i want to send a error report. When I hit debug, it starts debugging and throws an error "Unhandled exception at 0x7c9105f8 in devenv.exe: 0xC0000005: Access violation reading location 0x074b0010." and gives options to break or continue the debugging. The same windows comes up if i try to continue and if I hit break, i get the pointer at 7C9105F8 or eax,dword ptr [ebx+10h] and call stack lo ...Show All
