HeavyMetalMan's Q&A profile
Visual C++ MessageBox memory leak/corruption problem
I have a main thread that displays a message box using CDialog's MessageBox function. And there's another thread that exits the application. Termination of the MessageBox (without the user pressing "OK") is corrupting memory or causing memory leaks. In debug mode it says "user breakpoint is reached in code .. ". Is there a simple way to close the messagebox before terminating the application so that there won't be memory corruption or memory leaks Things I tried are: * Using pClassPointer->SendMessageToDescendants(WM_CLOSE, 0, 0, TRUE, FALSE); This is not working! I do not know why! P ...Show All
Windows Forms Transparent Panel Headaches
Hi, I'm having a really frustrating problem when using transparency in a Panel, if anyone has any suggestions I would really apreciate it. My problem is the following: I have a Form with a Panel contained on said Form. The Panel has the BackColor property set to "Transparent". I would like the background of the Form to be visible through the panel (I assume this is what setting the BackColor property to transparent means ). When my form first loads all is well - the underlying Form is visible through the transparent Panel. However, if I minimize the Form and then Restore it - now my transparent Panel displays what is underneath the ...Show All
Visual C++ (hopefully simple) COM question
I'm trying to write a program that uses the Groupwise administrative objects API, and I'm having some trouble with a COM object... When I run CoCreateInstance, it returns REGDB_E_CLASSNOTREG. Does anyone know what causes this error and how I can stop it Note that I have the groupwise client already installed, which supposedly includes all of the necessary DLLs. Here's the code that causes the error: //Create Instance if(FAILED(x = CoCreateInstance(CLSID_System, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER, IID_IADSystem, (void**)&pIGWSystem))) { printf("Failed to create instance\n"); if(x == RE ...Show All
Visual C# How to ping a server
Hi there, I'm looking for an easy way to ping a server. I found another thread, telling that "System.Net.NetworkInformation" would be the right source to look at. But I can't find this class! So how can I ping a server Thanks, Finch82 Not all of the classes are included in the default references when you start a project. Go to the references folder in the Solution Explorer and right click then click add reference. Scroll down in the list until you see the files that start with System. You should see something there that includes System.Net in the name. Add this to your project and then you'll be a ...Show All
Visual Studio Team System How to spawn Team Explorer
Is it possible to launch Team Explorer client from a web page Something like URL to link from Team Project Portal. Preferably pointing directly to the related project. obs.: I've tried to do that using a script with shell command, but my users have VS2003 installed in their machines too, and in some cases it gets launched instead of VS2005 (when running DevEnv.exe). Thanks, Max You could tweak "Content Type" to something IE does not understand, like "application/devenv" and it will open the file in devenv after the usual warning. Nearly all of the VS registered content types are text/plain or ...Show All
.NET Development Out of Memory error when loading/assigning images to a datatable
Hello. I have a datatable that I assign images to using the following code: For Each row In dt.Rows . . row("Picture") = Image.FromFile(strPictureFile) . . Next I get an Out of Memory error because of this. I checked my PF Usage using Task Manager and noticed that it just gets higher and higher as I load/assign an image to the datatable. Is there a way to free the Page File after image loading Is there a better way to assign images to datatable Help is greatly appreciated. Thanks Griffin ...Show All
Visual C++ Please HELP~~~fatal error C1083
I downloaded and installed the Visual C++ 2005 Beta 2. I tried to compile this simple program which is fully compile in Visual C++6 but it bring up this error: "fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory" *********************************************** #include "stdafx.h" #include <iostream.h> int main(int argc, char* argv[]) { char name[20]; cout << "What is your name "; cin >> name; cout << "Hello " << name << "\n"; return 0; } ************************************** ...Show All
Visual Studio Must uninstall VS2003?
Installing VS2005 beta 2 gives me an error at setup.exe saying I must uninstall VS2003 pro. Just to restate, it's not asking to uninstall 2005, it definately says 2003 What's up with that !!!! I am doing some investigation here to see if we can repro this problem. I believe there should be no block for VS2003 ENT and that the only blocks should be for VS2005 previous builds. Can you try running Aaron's tool to remove old WHidbey builds and then see if install works I think we may just have the incorrect error message in the UI and that the actual problem is that we are detecting ...Show All
Windows Forms Designing a plug-in kind of framework
Hi, I want to build an application that triggers different algorithms. The algorithms will be developed as class libraries over a period of time. I want to just plug-in these libraries as and when they get developed. The 'interface' for all the algorithms will be same...only the implementation keeps changing. The main application will make a decision at run t ...Show All
Visual Basic Run, Message, Delete
Ok heress what i want to happen when i click a button, its saves a .bat file(which i already have working) Next it runs the bat file when the operation is done a message comes up saying "Done" Once that is done it deletes the .bat file Process.Start("c:\myBat.bat") MessageBox.Show("I've done all sorts of nasty stuff") File.Delete("c:\myBat.bat") ...Show All
Visual Studio Express Editions Disabling Buttons
I'm in the proccess of try to create a program that, at log in the user must accept the terms and conditions but I'm having trouble of diabling things like the windows key to stop people for bypassing it, does any one know of any coding I can put it to disable these buttons. Any help would be greatly apreciated Cheers Buttons include: Windows Key Windows Key + .......(e.g "e") Ctrl+Alt+Del any other that I've over looked You have to do some low level keyboard hooking (look it up on google - keyboard hooking like that is not a 'nice' thing to do to users). From the sound ...Show All
Windows Forms Binding to Property of Property
Hi, I'd like to achieve something like this: [code] List myClass = new List(); myClass.Add(new MyClass()); BindingSource source = new BindingSource(myClass, "SubClass.MyProperty"); comboBox1.DataSource = source;[/code] Anybody knows if that is possible somehow Generally, this is not possible. This thread may help you however: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=94640&SiteID=1 ...Show All
Visual Studio How do I remove the "main report" button in Viewer
I am creating a report using the Crystal Reports that comes with VS 2005. I have a report that I shwo in the viewer. Under the viewers toolbar there is what looks like a button with the text "main report". How can I remove this button I can't find any properties. Thanks Simmy Hi Simmy7, What you are seeing is a TabControl for the Main Report display. The viewer allows you to open several tabs as you navigate through the report so that you can quickly move between the Main Report view and other views with more detail. Some options to consider: Rename the Main Report Tab Give the ...Show All
Visual C++ How to manage WM_KEYUP and WM_KEYDOWN
Hi, i have noted that if I have many buttons ore other elements in a Dialog, when you develop a MFC application, I won't be able to manage WM_KEYUP or WM_KEYDOWN, because they look like disabled. What do i have to do thanks a lot. PS: if my question is incomprehensible, i can give you a code sample. See http://www.codeproject.com/dialog/pretransdialog01.asp FilippoPPoppiliF wrote: Hi, i have noted that if I have many buttons ore other elements in a Dialog, when you develop a MFC application, I won't be able to manage WM_KEYUP or WM_KEYDOWN, because they look like disable ...Show All
Visual Studio Express Editions Newbie Question about Textboxes
Hi, I'm new to visual basic, and I am trying to use a combobox with 2 items, and when I select one of them I want to be able to have it read a registry key and then output the result to a textbox. This is the code I have so far. Currently, when I select an option in combobox1, it reads a registry key and then displays a msgbox with the result. I would like it to be displayed in textbox1 instead. Picture of form design ------------------------------------------------------------------------------------------------------------------ Public Class options Private Sub Ca ...Show All
