- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
39 Posted Topics
I launch 2 programs within my application with PROGRAMNAME->Show. Let's call them Prog1 and Prog2. I have a dummy form that I use Application::Run to keep the software running. When 1 of the program closes, I call Application::Exit to shut down the application. This doesn't allow the other program to … | |
I have to pass a pointer to a callback function. When the callback function is not a member function in my class, the argument &callback works. When I make the callback function a member function, I get a compiler error: "error c2276 '&' : illegal operation on bound member function … | |
I'm curious why all the events code and autogenerated code when controls are added to the form are written to the form1.h instead of the form1.cpp. Is this a configuration item? This defeats the purpose of information hiding by separating the declaration from the implementation. | |
I want to allow the user to tell me how many rows and columns of buttons to draw. Then draw the buttons. When a button is clicked, it displays the row # and column # of that button in a msgbox. I would create a button using the following code: … | |
I'm using Visual C++.NET. I need to pass a port number to my gui. What the syntax for passing arguments to "int __stdcall WinMain()." For regular C++ it would be "int main(int argc, char* argv[])" Thanks. | |
In my Form_Load, I dynamically create buttons to populate a tabcontrol with 6 tabpages. For some reason, it doesn't like it when I make the buttons invisible in Form_Load. I'm wondering if there's an event that gets triggered after Form_Load so I can make the buttons invisible there. For now … | |
I need to modify the Form's Clientsize in a static function but I get a compiler error - error C2597: illegal reference to non-static member 'System::Windows::Forms::Form::ClientSize. Are there any workarounds? Thanks. | |
I'm coding in VC++.NET 2003. I have a tabcontrol with 6 tabpages. In Form_Load, I dynamically create buttons on each of the tabpages, but make them invisible. Inside a static function, I would make buttons visible according to the parameters. My program would get stuck in a loop when I … | |
I'm coding in VC++.NET 2003. Is there a way to create a button_click event without using the this pointer? I have a static function that creates new buttons. I want to add the click event to the new buttons. Thanks. | |
I'm coding in VC++.NET 2003. I have panels that will be populated with buttons dynamically. In my static callback function, I get an exception when I try to add the button to the panel. //Exception: Controls created on 1 thread cannnot be parented to a control on a different thread … | |
I'm using Visual Studio .NET. The gui I'm implementing will be used on a wide screen. In the design view of the IDE, the form size is limited to the screen resolution. How can I stretch it to be the size of the wide screen so I can add controls … | |
I'm coding in VC++.NET 2003. For a static array of 20 elements, the code below works fine. But, I needed a dynamic array. I decided to use an ArrayList, but came to a compiler error when it couldn't convert from bool to System::Object __gc*. Anyone know how to convert this? … | |
I'm coding in VC++.NET 2003. I have a class that needs a log file to log info and errors for debugging. The problem I have is that FileStream and StreamWriter can not be global. I get compiler error C3145 : cannot declare a global or static managed type object or … | |
I'm coding in VC++.NET. For some reason, my messagebox is displayed below my application and is therefore hidden from the user. I can't get it to be modal either. Any ideas? | |
I want to change the font size but my 3rd party mapping sw needs the parameter to be of type StdFont. Is this supported in VC++.NET. I couldn't find anything about this in MSDN. Do I need to add a dependency? Thanks. | |
How do you declare an array of records in MC++? And have a ptr point to it? Thanks. | |
When I create a windows form application in VC++.NET, the code below is autogenerated to launch Form1. I want 2 instance of Form1 to run concurrently. I added another `Application::Run(new Form1());`. But, it didn't do what I wanted. After Form1 closes, the 2nd instance of Form1 is launched to run. … | |
I'm coding in VC++.net (managed C++). Is there a way to create dynamic arrays and preserving the data when the dimensions are changed? I know that Visual Basic can do this. In VB: ReDim Preserve mLn(UBound(mLn) + 1) | |
I want to format the number to display fixed digits, but the format code that I have seen doesn't have that option. I want to display the longitude of the cursor in DDD::MM::SS form. I want to see 7 degrees as 007::00::00. My code in VC++.NET (formatting is not included): … | |
I have a toolbar with 2 togglebuttons. I have a program written in C# and another in VC++.NET of the same code. In the C# program, the toggle button would pop when the other is pushed and vice versa. In the VC++.NET program, this doesn't happen. Both buttons could be … | |
I'm coding in VC++.NET. Does a static timer work like any other static variable? I have a class CLASS1 that has a static timer TIMER1 and a function ENABLETIMER that disables then enables the timer. From the main file, I have a callback function that calls CLASS1::ENABLETIMER(); The timer is … | |
How would I convert a String* variable to a char*variable? | |
Code in VC++.NET I have a string that has html tags. I want to replace <BR> with \n, but not sure if <BR> will be uppercase, lowercase, or a mixture of both. The string replace function allows only one parameter for the replaced value. Is there a better way of … | |
Anybody know how to create a pop up menu in VC++.NET? In VB 6.0, you would make a call to PopupMenu(menu) with menu visible property = unchecked. | |
In Visual Basic 6.0, all the available events for an object (ex. Button) are displayed in the Procedure box of the Code window for the developer to choose from. But in VS .NET, the events are hidden. Is there a way to expose them or find out all the available … | |
I'm coding in Visual C++ .NET. I have a managed class(FORM1) that displays a form. .NET framework objects can only be define within function scope. I have a main program that creates an instance of FORM1. I have some callbacks in main that need to access the functions in FORM1, … | |
I'm coding in Visual C++ .NET. I have a managed class(FORM1) that displays a form. .NET framework objects can only be define within function scope. I have a main program that creates an instance of FORM1. I have some callbacks in main that need to access the functions in FORM1, … | |
This code is written in VC++.NET. I have a windows form that display data from a socket port using callbacks. I have main.cpp that calls Application::Run(new Form1). The socket processing code is currently in the Form's file. I want to separate the Form1 from the socket processing code. Put the … | |
I have created three timers(5sec,5sec, and 10sec) for my Windows gui. When the timer event is triggered, it displays an Timeout error to a textbox. For some reason, the timers doesn't trigger in some procedures but does in others. I don't believe any process is holding up the code to … | |
This is in VC++.NET. I dynamically create the number of buttons the user specifies. I add these buttons to an Arraylist. The buttons names goes from b1 ..bn where n is the max num of buttons. The user will provide me the button number and the text to be added … | |
I'm using Visual C++.NET. When the user clicked on the X in the upper right corner of my gui, I want to close my files and sockets before the gui terminates. Which form event would get triggered when the X is clicked? I don't know where to find the list … | |
Is there a way to output data to a log file in ascii rather than binary? The example in my book only output data in binary. I want to create a log file that logs error messages that I can use to debug my code. Thanks. | |
I have a string that is retrieved from a socket. I display this string as the text of a button. Some strings contains a '' which doesn't get printed because it's an escape character. So, I want to find all '' and replace it with a "\\" so it will … | |
I need to change the cursor in a static member function but I receive a compiler error error C2671 : static member functions do not have 'this' pointers this->Cursor = System::Windows::Forms::Cursors::Default; How do I modify the code so it will work in a static member function? Thanks. | |
When I mix managed with unmanaged code I get the compiler error: "'IDataObject' : ambiguous symbol". How do I resolve this? Thanks. | |
When I compile my Visual C++ .NET project under a shared drive, I get the following error: "An unhandled exception of type 'System.Security.Policy.PolicyException' occurred in Unknown Module." What do I need to configure to allow shared drives to be fully trusted? Thanks. | |
txtULCol->Text == "" does not work for checking for a blank textbox in VC++ .NET. With or without text the code always return false. Any suggestions? Thanks. | |
I'm using VC++.NET and drag a couple controls onto the form. When I edited the auto-generated code for a control in InitializeComponent(), the controls on the form disappears. When I tried to add them back, it complained that it's already there. Eventhough the form no longer has the controls, it … | |
I'm new to Visual Studio .NET. I thought C#.NET replaces VC++ 6.0 until I saw that C++.NET was still around. So, what's the difference between the two? I want to create a GUI that uses some C++ header/source files and a C++ socket library. Which would I use? I have … |
The End.