| View previous topic :: View next topic |
| Author |
Message |
Lorrenzo Moderator
Reputation: 4
Joined: 02 Jun 2006 Posts: 3744
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Mon Mar 24, 2008 2:21 am Post subject: |
|
|
you can either make the form have no caption bar, which is easy, or you can disable the maximize button which i think works like this:
| Code: | | Form1.BorderIcons := Form1.BorderIcons - [biMaximize]; |
put that before the rest of your code, in form load or something
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Mon Mar 24, 2008 3:45 am Post subject: |
|
|
Or you can make a fixed dialog border style.
| Snootae wrote: | you can either make the form have no caption bar, which is easy, or you can disable the maximize button which i think works like this:
| Code: | | Form1.BorderIcons := Form1.BorderIcons - [biMaximize]; |
put that before the rest of your code, in form load or something |
He could do that through the properties and then you can still resize.
You could always make the image stretch.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Mon Mar 24, 2008 4:35 am Post subject: |
|
|
Well, I did just mess with this yesterday.
You can "hook" the maximize message and change it so it does nothing.
Like that:
| Code: | private
procedure MenuHook(var Msg:TMessage); message WM_SYSCOMMAND;
public
{...} |
And:
| Code: | procedure TForm1.MenuHook(var Msg:TMessage);
begin
if Msg.wParam = SC_Maximize then
begin
Msg.WParam := 0;
end;
inherited;
end; |
I made this yesterday to hook the Close message (when you click on the X on the bar) and changed the wParam to SC_Minimize.
(I didn't test it, but it should work)
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Mon Mar 24, 2008 5:50 am Post subject: |
|
|
yeh, symbol, but for some reason i cant edit it in the properties tab thingy, dunno why, but how does that code make it so you cant resize? it should just make it without maximize
woah reak, thats nice, i remember trying to do something like that cos i found the draggable form code which was similar, could you make it so if you clicked an image, it would make it so it was actually clicking a button or something, that would be really handy
_________________
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Mon Mar 24, 2008 6:18 am Post subject: |
|
|
| Snootae wrote: | | woah reak, thats nice, i remember trying to do something like that cos i found the draggable form code which was similar, could you make it so if you clicked an image, it would make it so it was actually clicking a button or something, that would be really handy |
You mean, changing the OnClick procedure of an Image/Button ?
Or a adding a OnClick procedure to an Image?
|
|
| Back to top |
|
 |
Lorrenzo Moderator
Reputation: 4
Joined: 02 Jun 2006 Posts: 3744
|
Posted: Mon Mar 24, 2008 7:22 pm Post subject: |
|
|
| Snootae wrote: | you can either make the form have no caption bar, which is easy, or you can disable the maximize button which i think works like this:
| Code: | | Form1.BorderIcons := Form1.BorderIcons - [biMaximize]; |
put that before the rest of your code, in form load or something |
Thanks a lot. Works like a charm.
_________________
LAWLrrenzolicious |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Mon Mar 24, 2008 9:41 pm Post subject: |
|
|
nps, btw reak i meant so you press the image, and its changes it to button.click or something, could you help me?
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Mar 25, 2008 4:08 am Post subject: |
|
|
You mean, you want to call Button.Click?
So Button1.Click;?
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Tue Mar 25, 2008 4:08 am Post subject: |
|
|
| Snootae wrote: | | nps, btw reak i meant so you press the image, and its changes it to button.click or something, could you help me? |
You could just set the OnClick event of the image to the procedure of the button.
Or do you mean changing the OnClick event in OnClick ?
I don't really get your problem.
But with that
| Code: | | Image1.OnClick := Button1Click; |
You can change the OnClick procedure of the Image while the program is running.
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
|
| Back to top |
|
 |
|