Thomas Werner's Q&A profile
Visual Studio Express Editions Return object value from function
Hi. I am trying to return an object from a function. I will able to return by using pointer. However, I would like to return by value. If fails. Here is the failing code: The class is given as follow: public ref class itemProperty { public: String^ Parent; String^ Code; public: itemProperty(); ~itemProperty(); }; itemProperty::itemProperty() { Parent = ""; Code = ""; } itemProperty::~itemProperty() { } itemProperty addItemProperty(void) { itemProperty tmpItem; tmpItem.Parent = this->txtBoxParent->Text; tmpItem.Code = this->txtBoxItemCode->Text; return tmpItem; ---> The Failure is pointed to here } It gives the following error while compiling: Error 1 error C2440: 'return' : ...Show All
.NET Development Hook desktop redrawing.
Is there any way (other than global hooking, which is disabled in .net) to catch events for desktop refreshes Has anyone ever tried this and managed a workaround to the global hook problem Or maybe someone could divert me to a C++ 2005 project that can do this for me.... Please ;) BTW I see ahmedilyas is the new king of the hill! Nice one ;) AndrewVos wrote: Yes, I know. I'm very open to any PInvoke ideas though ;) Yes! P/Invoke may help, also have a look at www.pinvoke.net . It may help you. Cheers ;-) ...Show All
Visual C++ Can you share global variables between a DLL and a calling program?
Can you share global variables between a DLL and a calling program If so I would appreciate any tips. I tried putting the global variables in the DLL but it crashed when the VB porgram tried to call it. No, actually I was thinking of something else (accessing variables in a DLL from a C++ EXE), taking out the extern "C" and placing the variable definitions in a .C file instead of .CPP would compile ok. I'm not sure what the solution is for VB, so I'll leave this to someone else. ...Show All
Visual Studio Team System Merged Changesets List
(#Reporting forum asked me to start a thread about this topic in this forum. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=767423&SiteID=1 ) Hi All, I am trying to get a report that would tell me what changesets that were merged. For example, I merge 10 changesets from my Dev line to my Test line and then commit the merge by checking it it. This would create 1 changeset coz of the checkin and the merge operation is complete. Now, can I generate a report that tells me what 10 changesets went in to the Test line. Any suggestions If you are willing to install the SP1 beta, there's a new API function called QueryMergesWithDetails that returns individual files instead of changesets. That removes mo ...Show All
SQL Server Upgrade scripts for SQL Server Mobile Databases
I am looking for a tool that can generate upgrade scripts for all deployed versions of my db application. Does anyone know of such a tool Not sure if there is one that deals with .sdf files. This might work with .sdf file... http://www.red-gate.com/products/SQL_Compare/index.htm gclid=CJSQruT-z4cCFRRtQwodsA4-QA ( you can get a free trial) ...Show All
Visual Studio Tools for Office Possible To Intercept Naming of Worksheet Created From Excel Template?
Hi, folks! As the title says, is it possible to intercept or otherwise specify the name given to a workbook created from the template in an Excel Template Project I'd like to be able to append a date to the end of the name. Thanks In Advance! Hi Cindy, Yup, already looked in both places; nothing there, either. Guess I was hoping someone would point out an undocumented method or something. No such luck. Ah, well, it was worth a try. Thanks for all the replies, Cindy! ...Show All
Visual Studio Express Editions Unusual install question
I was wandering what I would have to do to beable to put the main folder (C:\Program Files\Microsoft Visual Studio 8) on a removable drive and beable to use it on another computer without actually installing it so it doesnt show in the installed programs list in control panel/add and remove programs. I doubt it. Beyond what's in Program Files\Microsoft Visual Studio 8 there are other files in Program Files\Common Files\Microsoft Shared and it also has tons of information in the registry... ...Show All
SQL Server navigate to another target
Hello, I have an html page which has a frameset with two frames named: "reportFrame" and "browserFrame". the "reportFrame" is an aspx page which contains a reportViewer opening a report which has a table. I want from this table's rows to navigate to a url, but that the new url will be opened in the "browserFrame" frame. If I use the textbox properties->Navigation->Jump to URL, the parameter which is passed there is the soure of the new url. the question is if there is any option to pass also the target, something like: target="secondFrame" Thanks a lot, Talia. Exacty as what Jens said: go to the cell's properties -> Navigation ...Show All
Visual C# Multythreading question
Hi ppl in this code: public void StartNewThread () { localThread = new Thread (new ThreadStart (ThreadStartFunction)); localThread.Start(); } private void ThreadStartFunction () { SomeClass a = new SomeClass(); a.DoWork(); } Does it make sure that when I call StartNewThread multyplay times every thread that this function create will work with another instance of SomeClass Yes, everything declared inside a C# method is isolated for the current execution context. This is due the mecahnisms of local variables and their relationship with the thread stack. ...Show All
Windows Forms DataAdapter.Fill freezing app when using typed dataset
Hello! I’m pretty new to visual basic, and very new to .net altogether. However, I’m trying to read a text-file into a dataset, to later be able to update a SQL database. I’m using a background thread to do the dataadapter.fill, and following the progress with a timer updating a progressbar in the main UI. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ConnectionString As String ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "C:\" & ";" & _ "Extended Properties=""Text;HDR=NO;""" Try Dim TextConnection As New Sys ...Show All
Visual Studio 2008 (Pre-release) Setting mouse pointer position?
Given a canvas and a usercontrol that is a child of that canvas, is it possible to manually set the position of the mouse cursor somewhere Namely, so that it is pointed over the usercontrol somewhere. Thanks. I have this same issue - I can find plenty of ways (convenient or otherwise) to retrieve the mouse pointer's location, but no way to actually move it. I realise that generally one should avoid using such a feature but in this case I actually have an appropriate use for it! Anyone got any tips ...Show All
Visual C++ Grid control
I want to develop a grid control application.Dont have any idea abt grids so far. If anybody can,pls help. Look at how the professionals do it. MSFT's DataGrid and DataGridView, Sun's Java Grid, Infragistics NetAdvantage. ...Show All
Visual C++ static lib problem
Hi, I found a static lib written for VC++ 6 and i wanna use this visual studio 2003 when testing the lib in a console application i get a lot of errors in the header file is there any trick to import old version library to new version IDE Maybe that third-party library uses a specific "namespace", and therefore you have to specify it in your program For instance, instead of " SomeClass x " you should use " abc::SomeClass x " ...Show All
SQL Server Performance and Execution Plan
Performance !!! Hi! I am trying to execute an stored procedured that have already been used in another server (the test server ) but it takes 25 hours and in the another server takes just 40 minutes. !! I have reviewed the indexes, statistics an so on, I have exactly the same quantity of data but cannot explain why does it takes so long in the server that is supposed to be the better one. When I show de Execution Plan in the Query Analyzer in one server I get: - Select (0%) - Compute scalar (0%) - Remote Query ( 100 %) When I executed in the another one I get: - Select - Compute Scalar - Nested Loops Left Outer Join ( 80 %) - Merge Join / Right - Remote Query - Sort - Hash Match Right … ...Show All
Visual C# How to get caller's thread?
Is there any official way to get the caller's thread to determine if the current thread is different from the caller's thread Thanks in advance! You can use System.Threading. Thread .CurrentThread.ManagedThreadId to get an Id of the thread. You can then compare the thread ids to see if they are different. Mark. ...Show All
