•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 456,603 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,509 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 5189 | Replies: 23
![]() |
| |
•
•
Join Date: Nov 2007
Posts: 44
Reputation:
Rep Power: 2
Solved Threads: 0
Hello DaniWeb. I'm new to this site and will just have to say some words before asking my question. I'm Loyen and I am 14 years old and lives in Sweden. I've just started on an upper secondary school about IT and there I'm going one class that's called "programming" there we're learning the basics in Pascal.
Now, I'm really interested in this, and just wanted to know, how do I do a basic popup window that just gives you a message? Can I make one that has no buttons just a clean window without any "minimazers, closers" and all?
Write it here.
Thank you all for your time and hopefully somebody knows how to do a basic popup window.
//Loyen
Now, I'm really interested in this, and just wanted to know, how do I do a basic popup window that just gives you a message? Can I make one that has no buttons just a clean window without any "minimazers, closers" and all?
Write it here.

Thank you all for your time and hopefully somebody knows how to do a basic popup window.
//Loyen
Last edited by Loyen : Nov 7th, 2007 at 12:28 pm.
•
•
Join Date: Nov 2007
Posts: 15
Reputation:
Rep Power: 2
Solved Threads: 0
Loyen,
Are you using Delphi for this class?
If so, there are several ways to go about doing this, although I would suggest having at least an "OK" button for closing the pop-up window.
One approach, in Delphi, would be to use a MessageDlg.
A question for you to consider is, if you create a pop-up window
, how do you plan to close the window and exit the program?
Are you using Delphi for this class?
If so, there are several ways to go about doing this, although I would suggest having at least an "OK" button for closing the pop-up window.
One approach, in Delphi, would be to use a MessageDlg.
MessageDlg('Test with no buttons',mtInformation,[],0);A question for you to consider is, if you create a pop-up window
•
•
•
•
that has no buttons just a clean window without any "minimazers, closers" and all
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,878
Reputation:
Rep Power: 13
Solved Threads: 193
•
•
Join Date: Nov 2007
Posts: 44
Reputation:
Rep Power: 2
Solved Threads: 0
program WindowsApp;
Uses
Messages, Windows
Begin
<code>
function MessageDlg( const msg: string; dlgType: tMsgDlgType; buttons: tMsgDlgButtons; helpctx: longint ): word;
</code>
approach and you do NOT want any buttons (which is still a most curious concept), you would write something like:
<code>
MessageDlg('your message goes here', mtInformation,[],0);
</code>
END.
Uses
Messages, Windows
Begin
<code>
function MessageDlg( const msg: string; dlgType: tMsgDlgType; buttons: tMsgDlgButtons; helpctx: longint ): word;
</code>
approach and you do NOT want any buttons (which is still a most curious concept), you would write something like:
<code>
MessageDlg('your message goes here', mtInformation,[],0);
</code>
END.
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,878
Reputation:
Rep Power: 13
Solved Threads: 193
You need to read up on how to use procedures and functions.
Here's a nice tutorial.
Also, to use the MessageDlg function, you will need to put the Dialogs unit in your uses clause.
Good luck.
Here's a nice tutorial.
Also, to use the MessageDlg function, you will need to put the Dialogs unit in your uses clause.
Good luck.
Last edited by Duoas : Nov 9th, 2007 at 4:19 pm.
•
•
Join Date: Nov 2007
Posts: 87
Reputation:
Rep Power: 2
Solved Threads: 1
Im not sure about FP but I know if they are compatible as Duaos mentioned... Then simply do something like:
Again, I dont know if that will work in FP. But if you can get that to work, then great! Then goto (if you have this) object inspector and remove anything you dont want there. click on the form itself first of course and then look for the minimize and close options in there.
I am probably way off base on what you need, but I am trying anyway. lol
Procedure TForm.FormCreate(Sender: TObject); begin label.caption := 'write what you want to here'; end;
Again, I dont know if that will work in FP. But if you can get that to work, then great! Then goto (if you have this) object inspector and remove anything you dont want there. click on the form itself first of course and then look for the minimize and close options in there.
I am probably way off base on what you need, but I am trying anyway. lol
Last edited by squidd : Nov 9th, 2007 at 6:32 pm.
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,878
Reputation:
Rep Power: 13
Solved Threads: 193
That would work.
You would have to create a new form, and show it to display the message, and hide it to stop displaying the message. The trick is to let the user dismiss the form, which means responding to button presses or the [X] button or "Close" option of the window menu or if the user presses ENTER or ALT+F4. To do that stuff you'd have to display the form with showmodal, which I don't think you know enough to do easily.
If you are using Free Pascal and not the GNU Pascal (the Bloodshed Dev IDE works with both), then make sure you have the Dialogs unit in your uses clause:
and to display a message use:
This displays a popup with the message and an OK button.
Or use:
to display the dialog without buttons. (I have never tried to show one without buttons. It may or may not work. Either way, you will still be able to click the [X] button or press ESC to terminate the dialog.)
Hope this helps. (And please read-up like I asked.)
You would have to create a new form, and show it to display the message, and hide it to stop displaying the message. The trick is to let the user dismiss the form, which means responding to button presses or the [X] button or "Close" option of the window menu or if the user presses ENTER or ALT+F4. To do that stuff you'd have to display the form with showmodal, which I don't think you know enough to do easily.
If you are using Free Pascal and not the GNU Pascal (the Bloodshed Dev IDE works with both), then make sure you have the Dialogs unit in your uses clause:
uses Windows, SysUtils, Dialogs, Messages;and to display a message use:
showMessage( 'Hello world!' );This displays a popup with the message and an OK button.
Or use:
messageDlg( 'Hello world!', mtCustom, [], 0 );to display the dialog without buttons. (I have never tried to show one without buttons. It may or may not work. Either way, you will still be able to click the [X] button or press ESC to terminate the dialog.)
Hope this helps. (And please read-up like I asked.)
![]() |
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Popup window on button click (ASP.NET)
- Help with popup window (Visual Basic 4 / 5 / 6)
- how to pass the value in popup window (PHP)
- Please help me with my javascript popup window! (ASP.NET)
- Javascript Popup Window (JavaScript / DHTML / AJAX)
- Popup window (ASP.NET)
- Make An Asp Popup Window--help Me About This... (JavaScript / DHTML / AJAX)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: help file creation
- Next Thread: How would I find a system's IP address in Delphi?




Hybrid Mode