最近比较烦,比较烦,比较烦....(100分)

Q

QQ

Unregistered / Unconfirmed
GUEST, unregistred user!
最近比较烦,比较烦,比较烦....
分数只剩下从前的一半!
要作的选择多的实在乱!
写程序也遇到不少麻烦!

最近比较烦,比较烦,比较烦....
写程序的工具看的眼花缭乱!
VC、VB、DELPHI!
还来了一个BCB!

最近比较烦,比较烦,比较烦....
有人说写程序一定用VC+!
BCB、DELPHI到底哪个更好?
而VB实在是简单!
//VB VC BCB DELPHI应该选择哪个?要有说服力

最近比较烦,比较烦,比较烦....
安装工具实在很乱!
INSTALL SHEILDER PROFASIONAL,INSTALL SHEILDER EXPRESS,WISE INSTALL TOOL。
Setup Specialist好象没有序列号!
//它们哪个更好?顺便求SS的序列号!

最近比较烦,比较烦,比较烦....
写程序遇到麻烦!
谁能给ANI MENU 98的狸子?//D4
执行外部程序如何知道它的结束?
//cheng-jian@163.net

最近比较烦,比较烦,比较烦....
所有家当一起用完!
怎样让程序不在任务烂显示?
请详细解释ExitWindowEx的用法!

最近比较烦,比较烦,比较烦....
网络述评实在太烂!
如何参加INPRISE新闻组?
什么是DELPHI MAIL LIST?
//如何参加?

最近比较烦,比较烦,比较烦....
分数只剩下从前的一半!
问题问的实在太多!!
希望大侠们多包含!!!
 
这几个Tips连我自己都不记得从哪里来的! *_^

1. 怎样执行一个程序,并等待此程序的运行结束?

function WinExecAndWait32(FileName:String; Visibility :
integer):integer;
var
zAppName:array[0..512] of char;
zCurDir:array[0..255] of char;
WorkDir:String;
StartupInfo:TStartupInfo;
ProcessInfo:TProcessInformation;
begin
StrPCopy(zAppName,FileName);
GetDir(0,WorkDir);
StrPCopy(zCurDir,WorkDir);
FillChar(StartupInfo,Sizeof(StartupInfo),#0);
StartupInfo.cb := Sizeof(StartupInfo);

StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow := Visibility;
if not CreateProcess(nil,
zAppName, { pointer to command line string }
nil, { pointer to process security
attributes }
nil, { pointer to thread security
attributes }
false, { handle inheritance flag }
CREATE_NEW_CONSOLE or { creation flags }
NORMAL_PRIORITY_CLASS,
nil, { pointer to new environment block }
nil, { pointer to current directory name }
StartupInfo, { pointer to STARTUPINFO }
ProcessInfo) then Result := -1 { pointer to PROCESS_INF }

else begin
WaitforSingleObject(ProcessInfo.hProcess,INFINITE);
GetExitCodeProcess(ProcessInfo.hProcess,Result);
end;
end;

2. 怎样隐藏desktop 上的icon

var
hDesktop : THandle;
begin
hDesktop := FindWindow('Progman', nil);
ShowWindow(hDesktop, SW_HIDE);
 
现成的东西,被你抢了!
 
呵呵,还有其他问题就交给你了! *_*
 
好象有个叫RegisterServiceProcess的api, 可以让你的程序不在任务栏中出现,
并且按"ctrl+alt+delete"也找不到. D3的win32.hlp中没该项说明.
 
Here are examples of how to restart Windows and also how to
reboot the system:

procedure TMainForm.RestartWindowsBtnClick(Sender: TObject);
begin
if not ExitWindows(EW_RestartWindows, 0) then
ShowMessage('An application refused to terminate');
end;


procedure TMainForm.RebootSystemBtnClick(Sender: TObject);
begin
if not ExitWindows(EW_RebootSystem, 0) then
ShowMessage('An application refused to terminate');
end;


关于MailList
请参看<a href="http://www.gislab.ecnu.edu.cn/delphibbs/DispQ.asp?LID=72911">Delphi有那些论坛</a>

<h3><a name="Delphi_Mail">Delphi Mailing lists</a></h3>
<p>Mailing lists are great information resources which allow you to share your
experiences with others and ask questions yourself to hundreds of subscribers.<br>
Mails with questions and answers are usually sent to a Mailinglist-Server which will
distribute them to all subscribers worldwide. TRY IT OUT - it's a great help !</p>
<p>At e-mail <i>subsriptions</i>, please <i>let the subject line empty</i> and <i>use only the first line of the message body.</i><br>
Once you subscribed, most of the lists provide commands to <i>retrieve past articles</i> via the listserver. Beside
that, some of the lists are archived by Reference.com - see description here or on my
"Tips and Tricks" section.<br>
At some of the mailing lists the correct subscribing-commands change from time to time -
if one of them doesn't work, just try it again with the correct syntax which you'll
receive from the mailing list server. Please don't forget to send me a short
 
我来说ExitWindowsEx的用法。
它的返回值是一个boolean型。如果调用成功,返回非0值,调用不成功,
返回0值,用GetLastError(VOID)函数可以获取错误码。
两个参数:一个是uFlags,UINT类型,用来控制关闭操作,另一个是dwReserved,
DWORD类型,通常被忽略,置0就行了。

1。EWX_FORCE 强制程序关闭并退出Windows,也就是说,不发QUERYENDSESSION
和 WM_ENDSESSION这两个消息给应用程序。帮助说
只能用于紧急可是我们这边的同志们凡是用到ExitWindowEx,
没有不加上这个参数的(主要是不想让别的程序烦)。
2。EWX_LOGOFF 只是进行重新登录,95里的“用另一个用户名登录”、98
里的“注销”,就是这个意思。
3。EWX_POWEROFF 顾名思义,就是关电源了。不过得有ATX哟。
4。EWX_REBOOT 重新启动(热启动)。
5。EWX_SHUTDOWN 关闭计算机。(就是“您可以关闭你的计算机了”)。

3、4、5在NT里都必须有SE_SHUTDOWN_NAME权限才行。

另外,还听说有一个隐藏参数,可以不启动Windows而关闭Exploer,好东东啊!
也就是说可以动态刷新注册表了!有那位大虾知道,还望告知。
 
HI,QQ,我用过两年的VC,最近才开始学Delphi,学VC前用过BC4.5,
前几天看过几个BCB的程序。感觉是这样的:
首先,VC无疑是作“精密”程序的首选。他的深入系统的特点是我所喜
欢的。而且,考虑到MS作东西,总是给自己留一手,如果写系统程序,
可能非VC莫属了。还有DIRECTX程序,外面满天飞的控件虽然很多,但是
一旦你要自己做程序,你会发现合用的没几个。还不如用VC直接些。

其次,Delphi是我最喜欢的东东。她能实现VC的几乎所有功能(不说全部,
是因为有一个朋友经常跟我争得面红耳赤,不好意思让他不高兴)。而且
Delphi众多的控件、做程序的方便,是VC不可比拟的。基本上作一般的程序
或工程,用她最好了(我还没说到Delphi犀利的数据库方面呢)。

最后,说起BCB,我只看过程序,没有作过东西,它给我的感觉是Delphi的
C++版本,我唯一看到的不一样是BCB比Delphi多了个消息映射(VC里有的)。
没有用过没有发言权,不过我的最爱是Delphi和VC。
 
我使用EXITWINDOWEX时,用FORCE,总是从新登陆,不能关闭计算机!
另:在NT中如何关闭,请详细!

VB呢?
BCB号称支持所有MFC/OWL?
Another_eYes如何使用,在哪个DLL中?
 
ExitWindowsEx( EWX_FORCE+ EWX_SHUTDOWN, 0); 用于关机;
ExitWindowsEx( EWX_FORCE+ EWX_LOGOFF, 0); 用于重新注册;
ExitWindowsEx( EWX_FORCE+ EWX_REBOOT, 0); 用于重新启动.
一分钟以前刚试过(吸取教训,每次回答都要打代码)。
以上均是强制性的。
如果还不行的话,把源程序寄来吧!
<a href="mailto:jingjiang@990.net">jiangjiang@990.net</a>
现在我的机器是98,主服务器是NT,可是老师不让关机,没法子了!
暑假里我在NT4(中文)上用过关机功能,那时我有最高权限,好像没问题。

(如果在NT下,注意权限问题)
 
RegisterServiceProcess(NULL, RSP_SIMPLE_SERVICE)
However, this is Win95 only, i.e., cann't be used on NT.
 
>另外,还听说有一个隐藏参数,可以不启动Windows而关闭>Exploer,好东东啊!
>也就是说可以动态刷新注册表了!有那位大虾知道,还望告知。

在"关闭计算机"的对话框中
按住Alt+Ctrl+Shift, 然后选择"No"/"取消"
Explorer 就关闭啦!
 
To access RegisterServiceProcess, retrieve a function pointer using
GetProcAddress() on KERNEL32.DLL.

Parameters:

- dwProcessId: Specifies the identifier of the process to register as a
service process or NULL to register the current process. An
application receives the process ID when it uses CreateProcess() to
start the application.

- dwServiceType: One of the following values:

Define Value Meaning
RSP_SIMPLE_SERVICE 0x00000001 Registers the process as a
simple service process.

RSP_UNREGISTER_SERVICE 0x00000000 Unregisters the process as a
service process.

Return Value:

The return value is 1 if successful or 0 if an error occurs.
 
RegisterServiceProcess
The RegisterServiceProcess function registers or unregisters a service process. A service process continues to run after the user logs off.

To call RegisterServiceProcess, retrieve a function pointer using GetProcAddress on KERNEL32.DLL. Use the function pointer to call RegisterServiceProcess.

DWORD RegisterServiceProcess(
DWORD dwProcessId,
DWORD dwType
);

Parameters
dwProcessId
Specifies the identifier of the process to register as a service process. Specifies NULL to register the current process.
dwType
Specifies whether the service is to be registered or unregistered. This parameter can be one of the following values. Value Meaning
0 Unregisters the process as a service process.
1 Registers the process as a service process.

Return Value
The return value is 1 if successful or 0 if an error occurs.
 
Re:pegasus
我当然知道这个办法,我说的是用程序实现,老哥!
 
真对不起, 刚刚看到: 在问题27--如何使应用程序不显示在关闭程序对话框任务列表中?
里有RegisterServiceProcess的说明,不过我可是刚从MSDN上Cut下的.

Pegasus, 我当然知道"按住Alt+Ctrl+Shift" 的方法,我要用程序实现!!!
 
RegisterServiceProcess简直太好,下面是我试过的Delphi中的定义:
const
RSP_SIMPLE_SERVICE = $00000001;
RSP_UNREGISTER_SERVICE = $00000000;
// Parameter dwProcessId can be 0, same effect as GetCurrentProcessId
// Return Values: True(1) means success
function RegisterServiceProcess(dwProcessId, dwServiceType: DWord): Bool; stdcall;
// Place in "implementation" session
function RegisterServiceProcess; external 'Kernel32.dll' Name 'RegisterServiceProcess';
// Example:
// RegisterServiceProcess(0, RSP_SIMPLE_SERVICE);
// RegisterServiceProcess(0, RSP_UNREGISTER_SERVICE);


pegasus:Explorer关闭后怎么打开呢?我试了一下,Ctrl+Esc失效了,只有
关机,有点可笑。
 
将程序的窗口样式设为TOOL窗口,可避免在任务条上出现
SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
 
顶部