Delphi Pages Forums  

Go Back   Delphi Pages Forums > Search Forums

Lost Password?

Showing results 1 to 40 of 40
Search took 0.06 seconds.
Search: Posts Made By: The Smurf
Forum: General 11-18-2001, 06:32 AM
Replies: 4
Views: 995
Posted By The Smurf
RE: Exception Handler question

If you've coded your exception handlers properly, then the errors won't show up in your program at run time, though you will have to test the app to make sure.

The reason you see them when in...
Forum: General 11-18-2001, 06:29 AM
Replies: 2
Views: 2,630
Posted By The Smurf
RE: Background picture on a MDIForm

Put a TPanel on your MDI form, and put the image on the Panel.

-- The Smurf
Forum: General 08-12-2001, 12:05 AM
Replies: 2
Views: 1,080
Posted By The Smurf
Delphi 6 TShellListView

After trying absolutely everything I can possibly think of, I still can't retrieve the caption of any item in a TShellListView. Everything else works just like a normal list view. But, even though I...
Forum: General 05-28-2001, 06:11 PM
Replies: 1
Views: 2,330
Posted By The Smurf
RE: Delphi Application Error in Windows Me!!!

If the problem is occurring only on Windows Me, then the problem is Windows Me. Me and 2000 use different kernels (that's the main difference between the two, and why the merger with XP later this...
Forum: General 05-18-2001, 08:20 PM
Replies: 1
Views: 1,092
Posted By The Smurf
RE: shutting down a pc

To shut down the computer, use the ExitWindowsEx API function:

ExitWindowsEx(EWX_POWEROFF,nil);

To ignore error messages, add the EWX_FORCE flag:

ExitWindowsEx(EWX_POWEROFF + EWX_FORCE,nil);...
Forum: General 05-17-2001, 10:04 PM
Replies: 7
Views: 1,221
Posted By The Smurf
RE: Dll problem with strings

Make sure that ShareMem is the first unit in the uses clause of your main project (not the unit you're calling the function from, but the actual DPR source file).

Click on Project >> View Source....
Forum: General 05-15-2001, 03:47 PM
Replies: 9
Views: 2,361
Posted By The Smurf
RE: RE: How come I can't write to the window's registry??

I'm using Windows 2000 and I've never had any problems writing to any part of the registry.

Have you tried using TRegistry rather than TRegIniFile?

-- The Smurf
Forum: General 05-15-2001, 11:43 AM
Replies: 9
Views: 2,361
Posted By The Smurf
RE: RE: RE: How come I can't write to the window's registry??

Before opening a key for writing, depending on your Delphi version and revision, you may need to change the TRegistry value's Access property to allow write access:

Reg.Access:= KEY_ALL_ACCESS;...
Forum: General 04-24-2001, 10:56 AM
Replies: 2
Views: 1,330
Posted By The Smurf
RE: No cursor keys inside DLL form

Try using your main project's Application variable to create the form from the DLL rather than creating it as a parented window:

procedure loadForm; stdcall;
begin
Form:=...
Forum: General 04-24-2001, 10:53 AM
Replies: 3
Views: 1,158
Posted By The Smurf
RE: RE: RE: TMenuItems

The code I gave you IS how you get the form to appear when you click a menuitem. Put the code to create the new form into the menuitem's onClick event.

-- The Smurf
Forum: General 04-23-2001, 11:52 PM
Replies: 3
Views: 1,155
Posted By The Smurf
Whoa. Lots of trouble for nothing.

Why go through all of that. In the registry under:

HKEY_CURRENT_USER\Control Panel\International

just change the sShortDate value to dd/mm/yyyy.

-- The Smurf
Forum: General 04-23-2001, 11:46 PM
Replies: 1
Views: 1,657
Posted By The Smurf
RE: Media player codecs

Use FileExists to check for the codec's DLL file in the System directory.

-- The Smurf
Forum: General 04-23-2001, 11:44 PM
Replies: 3
Views: 3,629
Posted By The Smurf
RE: using MSWord to save document as HTML

To get a file to open in word, use TRichEdit1.SaveToFile to save it to a temporary file and then open it in Word from your program with ShellExecute:
...
Forum: General 04-23-2001, 11:41 PM
Replies: 3
Views: 1,158
Posted By The Smurf
RE: TMenuItems

Yes it is. If you want to show Form2, then in Form1's menu item onClick event, just put the code:

Form2.Show;

or

Form2.ShowModal;

If your project is an MDI project, you may need to...
Forum: General 04-20-2001, 07:38 PM
Replies: 3
Views: 985
Posted By The Smurf
RE: Open new instance of IE

ShellExecute(handle,nil,site,nil,nil)

Try this instead of the above...

ShellExecute(handle,'open',site,nil,nil);

-- The Smurf
Forum: General 04-19-2001, 09:20 PM
Replies: 2
Views: 1,059
Posted By The Smurf
RE: API Calls For finding Windows Key Directorys

The API function you need to use is SHGetFolderPath. Here's the prototype:

SHGetFolderPath(hwndOwnder: HWND; nFolder: Integer; hToken: HANDLE; dwFlags: DWORD; pszPath: LPTSTR);

hwndOwner should...
Forum: General 04-18-2001, 09:21 AM
Replies: 1
Views: 716
Posted By The Smurf
RE: How to play a Wav-file

To play an actual WAV file, change the third value in the function call to SND_FILENAME, and the first value to the name of the file. Here's an example:
...
Forum: General 03-11-2001, 10:30 PM
Replies: 1
Views: 2,316
Posted By The Smurf
RE: Hi,what difference between WinExeC,ShellExcute,ShellExcuteEx?

WinExec will execute only program files. ShellExecute and ShellExecuteEx will execute any program, open any file in its associated program, and can also open a directory window for exploring, or...
Forum: General 02-27-2001, 04:11 PM
Replies: 6
Views: 3,083
Posted By The Smurf
RE: RE: RE: how 2 not use dll if not avaible?

Load the DLL dynamically instead of statically...

type
TNetWkstaUserEnum = procedure(servername: LPTSTR; level: DWORD; var buffer: pointer; prefMaxLen: DWORD; var entriesRead, totalEntries,...
Forum: General 02-14-2001, 09:57 PM
Replies: 5
Views: 2,701
Posted By The Smurf
RE: access violation after my programs 'end.' ???

I've seen this problem before. Two reasons this could be happening:

Making sure that you call Free() for every object that is created in your code is the first step, and that all open handles to...
Forum: General 02-13-2001, 01:57 PM
Replies: 3
Views: 2,433
Posted By The Smurf
RE: Stopping user from closing program

In your form's OnCloseQuery event, just put the following line of code:

CanClose:= false;

That will stop the form from closing. Or if you want the form to close only if the correct password is...
Forum: General 02-08-2001, 08:32 AM
Replies: 6
Views: 4,451
Posted By The Smurf
RE: This is how they have the dll in VB.

I'm not a VB expert, but it's apparent that the code you showed isn't calling any DLL functions at all, for the simple reason that there are no API declarations. VB isn't equipped to natively deal...
Forum: General 02-06-2001, 10:45 PM
Replies: 2
Views: 1,410
Posted By The Smurf
RE: a question of calling dll

Try adding one of the DLL calling conventions to the function prototype in your code (stdcall, pascal, etc..).

-- The Smurf
Forum: General 02-03-2001, 02:50 PM
Replies: 2
Views: 1,811
Posted By The Smurf
RE: What's bad with this code?

You were just missing a semicolon. Here's the corrected code. I've cleaned it up a bit as well.

Also, watch your spacing before and after ":" and ":=". The compiler will sometimes catch you with...
Forum: General 01-11-2001, 10:30 AM
Replies: 2
Views: 3,077
Posted By The Smurf
RE: Is there something like TP's "keypressed" ?

You can catch a keypress for any component that allows it by using that component's OnKeyPress event.

I don't believe there's any way to stop a running procedure directly. However, you can work...
Forum: General 01-11-2001, 10:25 AM
Replies: 3
Views: 12,739
Posted By The Smurf
RE: Passing functions as parameters

Sorry to disappoint, but you can't directly pass a function name as a variable to another function.

I'm assuming you want to do this because you have several functions and you only want to call...
Forum: General 01-11-2001, 04:39 AM
Replies: 5
Mp3
Views: 5,314
Posted By The Smurf
RE: Mp3

If you want a dedicated MP3 player, it's going to get quite involved. Actually programming it is the easy part. Finding a component may be more difficult... at least one that's free. If you're...
Forum: General 01-11-2001, 04:36 AM
Replies: 2
Views: 12,711
Posted By The Smurf
RE: Open URL in default browser and auto fill form fields

The only way to really do this is to use the Windows API to get the handle of the browser window, and then send the text to the window.

There is an easier way to get the result you want. The...
Forum: General 01-10-2001, 05:05 PM
Replies: 6
Views: 6,286
Posted By The Smurf
RE: RE: RE: RE: RE: About the time...? nooooooo

Yes. See the thread about opening control panel applets.

-- The Smurf
Forum: General 01-10-2001, 04:17 PM
Replies: 2
Views: 5,692
Posted By The Smurf
RE: anyone know how to bring up control panel applets???

Use the ShellExecute API to call Rundll32 with the following parameters:

shell32.dll,Control_RunDLL <cpl app>,<applet>,<page>

cpl app can be one of the following:

AppWiz.cpl (Add/Remove...
Forum: General 01-10-2001, 05:51 AM
Replies: 1
Views: 3,422
Posted By The Smurf
RE: GetKeyboardState acting strange

This is a Windows behaviour. You can notice the same effect in an MDI program if you're using a mouse with a wheel on it. Move your mouse over one of the program's inactive windows and use the...
Forum: General 01-10-2001, 05:43 AM
Replies: 2
Views: 3,881
Posted By The Smurf
RE: How to keep Splash Screen shown after Application.Run

Try showing the splash screen from your MainForm, rather than from the project source.

If you put the splash screen in your MainForm's OnShow event, it will not show until Application.Run is...
Forum: General 01-09-2001, 12:13 PM
Replies: 6
Views: 6,286
Posted By The Smurf
RE: RE: RE: About the time...?

Yes you can. Just call GetLocalTime and pass a TSystemTime structure to it in the function call. Then, you can use any of the members of the structure in your program. The members are:

wYear...
Forum: General 01-09-2001, 04:12 AM
Replies: 6
Views: 6,286
Posted By The Smurf
RE: About the time...?

If you require time information, there is no other way to retrieve it except asking for the system time. A computer can't just read a clock.

There are two API functions that will retrieve the...
Forum: General 01-08-2001, 03:50 PM
Replies: 3
Views: 4,184
Posted By The Smurf
RE: strange problem with outputting the '&' character...

This isn't a Delphi problem, it's a Windows problem. In order to allow the letters of text components to be underlined (like in any program's menu), you use the & character before the letter to be...
Forum: General 01-06-2001, 10:47 AM
Replies: 2
Views: 3,850
Posted By The Smurf
RE: Share API

Try looking in isapi.pas, isapi2.pas, mapi.pas, nsapi.pas and psapi.pas.

If what you're looking for isn't there then it's either in one of the three Windows units, Windows.pas, System.pas or...
Forum: General 01-05-2001, 10:10 PM
Replies: 2
Views: 4,420
Posted By The Smurf
RE: RE: How to copy a string into a pchar???????

ShellExecute(Application.MainForm.Handle, nil, 'mailto:' + PChar(EmailAddress), '', '', SW_SHOW);

Actually, that bit of code won't work correctly. You need to cast the entire string.
...
Forum: General 01-04-2001, 06:11 PM
Replies: 1
Views: 5,814
Posted By The Smurf
RE: Manipulating windows of other programs

You need to use the EnumWindows API function to figure out the handle of each window that you want to manipulate (you may also need to use EnumChildWindows if you want to manipulate an MDI child...
Forum: General 01-04-2001, 09:36 AM
Replies: 8
Views: 8,883
Posted By The Smurf
RE: RE: RE: help with exceptions ..... i'm getting crazy!

>uhmm how can i handle it without notify the user?
>can't i just ignore it and go on?

Sometimes an empty except block works (for file I/O exceptions for example), and sometimes it doesn't (for...
Forum: General 01-04-2001, 06:32 AM
Replies: 8
Views: 8,883
Posted By The Smurf
RE: help with exceptions ..... i'm getting crazy!

>Ho do i make the VCL ignore the exception and only execute my own handler or at lease execute my handler BEFORE the VCL one?

The VCL is handling the exception itself because your code doesn't...
Showing results 1 to 40 of 40

 
Forum Jump

All times are GMT. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.