|
Thank you very much! I do not know if it will help or not (yet), it looks very simular to what I have been tryiing to do. If it is written in C# I can not tell the difference, becuase it looks exactly the same as in C++. If .NET is what the next generation of progammers is going to have to learn, then I feel sorry for them. Actually I should not, since I am now going back to school. But they are making us write everything in vb.net, all pre-packaged stuff (controls, etc...). If I was not tryiing to use .NET and managed code the program would be all but finished by now.
Thanks again,
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hi..
I am doing a google call windows application from the console application.
In the console application login in the google a/c and call to a friend is
wroking properly. But in the windows application it is giving socket connection
error i.e. it is giving about 1500 errors which were not in the console application
which has same code.
What is solution to this. If any one know code of logging in to google
please forward it to me.
Help is must.
Rahul Kulkarni
|
|
|
|
|
Hi,
I have installed Visual Studio 2003 and .net framework 2.0.
How can I use .net framework2.0 Toolbox in Design mode?
I only see .net framework1.1 components in Toolbox.
|
|
|
|
|
VS 2003 is incompatible with .NET 2
You need VS 2005.
Regards,
Nish
|
|
|
|
|
hey all,
I am trying to make a program to turn off my computer on a set timer, for when i am burning dvd or listening ot music before bed. Can anyone help me withthe c code to shutdown a computer through a c program.
i know through the command prompt there is a shutdown command:
/shutdown -s
with a [-t XX] XX being the time before the shutdown.
so if there is a way to make my c program use the command prompt, or another way to shutdown the computer, it would be greatly appricated.
Thank you Very much.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
In C, you could use a Wind32 call:
CreateProcess("shutdown.exe", "-s -f -t 00", NULL, ...);
For more detail, check MSDN
For other methods, check CodeProject.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Will i need to include any special header files to use that command.
thank you/.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
I think you need
#include "Windows.h"
- It's easier to make than to correct a mistake.
|
|
|
|
|
Thank you very very much Jun Du, i did not use the CreateProcess method but i used theother method which you provided the link for me. For anyone else trying to do this, here the code i used:
#include <windows.h>
#include <shellapi.h>
Main() {
ShellExecute(NULL,"open","Shutdown","-s -f -t 30", "", SW_SHOW);
return();
}
Thank you Jun Du.
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
Administrative system of parking tower
Basic materials
The parking tower amounts to ten storeys, every storey can park 25 cars
Read into the materials by the file and preserved parking
Form of the number plate number
XX-NNNN or NNNN-XX (whether X representative capitalize English letter, Aeabic numeral, representative of N)
For example, HK-5566, LP-3388
Park on date and time
YYYYMMDD NNNN
For example, 20040926 1408, 20041126 0956
Serial number form in the parking stall
NNNN (first two yards are serial numbers of the floor, the last two yards are this floor of serial numbers of parking stall)
For example, 0324, 1008
Basic materials
Rule that charge
30 yuan per hour at 20:00 08:00 08:00
20 yuan per hour at 08:00 every other day at 20:00 20:00
Fewer than an hour is calculated with an hour
Systematic specification
Introduction
Read into the materials by the file and preserved parking
While parking (order P)
Input the number plate number of the automobile
The record parks on date and time
Write down the corresponding relation of the serial number of parking stall and automobile number plate number
While getting the car (order T)
Input the number plate number of the automobile or the parking stall serial number
Systematic specification
Output
While parking
Obtain the serial number of parking stall
While getting the car
Calculate and show the down time and parking fee
The system finishing(order Q)
Incline and print (order D)
Incline and print the parking states of all floors
Systematic specification
Run
QK- 8888 20041231 2100 0101
6666-BG 20041231 0700 1025
thanks~~
lulu
-- modified at 11:32 Thursday 15th June, 2006
|
|
|
|
|
is there anything other than #include "stdafx.h" that I need to include in order for me to do:
MessageBox::Show("Hello, World!"); ?
i'm getting the following errors:
c:\documents and settings\...\mda_camera.cpp(40) : error C2653: 'MessageBoxA' : is not a class or namespace name
c:\documents and settings\...\mda_camera.cpp(40) : error C3861: 'Show': identifier not found
Thanks
Kitty5
|
|
|
|
|
Managed C++ questions have to be asked in the Managed C++ forum
after another read of your post, it seems that you use some managed code in your MFC project.
change for the following :
::AfxMessageBox(_T("Hello Wolrd !"));
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-- modified at 10:55 Wednesday 14th June, 2006
|
|
|
|
|
|
|
kitty5 wrote: what is managed code?
If you need to ask this, I am not sure you need to be using Windows Forms.
Regards,
Nish
|
|
|
|
|
nish, it seems that the thread was moved from the VC++ forum, but it's not a managed question actually...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: nish, it seems that the thread was moved from the VC++ forum, but it's not a managed question actually...
He wants to use MessageBox::Show which seems to indicate that he's using Windows Forms. Probably mixing that with MFC too - so most likely a mixed mode app.
Regards,
Nish
|
|
|
|
|
yeah, it's what at thought at first, but finally, nothing indicated he want to use MessageBox::Show() above all.
i think much that he doesn't really know what he does, and is a little lost with all the existing APIs. maybe he say somewhere on the internet that MessageBox::Show() existed, thinking that it would work in every situation. though, when he asked me what Managed C++ was, it became obvious that he was absolutely not aware of the difference between managed and unmanaged code, and lesser what mixed code could be...
don't you feel it like this ??
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: it became obvious that he was absolutely not aware of the difference between managed and unmanaged code
I got that impression, too. So that is why I put up a link to wikipedia about managed code.
PJC
|
|
|
|
|
Perhaps, it's so. Let him ask a clearer question on the VC++ forum if he wants to. Let this thread remain here, so people will know how to use MessageBox::Show in a mixed mode app. Helps to improve search results.
Regards,
Nish
|
|
|
|
|
Nishant Sivakumar wrote: Helps to improve search results.
Good point. I am sure others will have a similar question and hopefully they find this thread
PJC
|
|
|
|
|
Yup! I'm absolutly confused!
I have no clue what so ever what I'm doing when it comes to GUI design with Visual Studio.
I've been taught how to do console type design using emacs and compiling it with gcc but I've never used visual studio b4.
I'm sorry I'm asking so pretty dumb questions, it's just that there's no simple getting started with gui book.
I'm still trying to figure out MFC vs. windows form. I know with the windows form you can add dialogs and controls. With MFC it gives you a project whether it's MDI or SDI you choose but you also have the option to change the base class to CFormVew and then you can play with the dialog that way. Other wise I don't know how else to add dialogs and controls to and MFC...
Thanks
Kitty5
|
|
|
|
|
|
I've created a Button and what i'm trying to do is when I click the button I want a message box to pop up...
void ksclass::OnBnClickedButton1()
{
::AfxMessageBox(_T("Hello Wolrd !"));
// TODO: Add your control notification handler code here
}
the ::AfxMessageBox(_T("Hello Wolrd !")); helped with the errors but when I run then click the button... nothing happens...
Thanks
Kitty5
|
|
|
|
|
If this is an ordinary C++ application, you can use:
::MessageBox( 0, "Hello, World!", "", 0);
|
|
|
|