View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Thu Dec 12, 2002 5:57 pm Post subject: Flatten 3D Controls |
|
|
I wish there was an option to make controls flat.
NodNarb |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 12, 2002 8:46 pm Post subject: |
|
|
I think he means like creating flat controls like buttons, checkboxes, etc.,
in other words, not 3D. I too have wanted an option like that and an option
to create the new-style menus such as those contained in Microsoft Office XP. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Dec 12, 2002 8:55 pm Post subject: |
|
|
Hi All,
Well I know to get a flat styled button you can send the button
Code: | %A = @sendmsg(@win(~BUTTON1),$0F4,10,1) | which is the BM_SETSTYLE API message. If I can find the time I will check and see if there is a way to change other VDS elements.... _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Fri Dec 13, 2002 6:46 pm Post subject: |
|
|
Well, if you puss the button, move the mouse to the side, and them release it, the flat style is gone... You could better use just a text element to do that... |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri Dec 13, 2002 10:30 pm Post subject: |
|
|
Wouldn't it be possible to periodically repeat the message? |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Fri Dec 13, 2002 11:11 pm Post subject: |
|
|
Actually, if I was just after flat buttons, I would use a bitbtn with no image and just set the caption property, then I could have tool tips too.
That's not the case. I want flat combo's, list, edit fields, progress bars... the whole kit and kaboodle.
Brandon "NodNarb" Cunningham |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri Dec 13, 2002 11:16 pm Post subject: |
|
|
If that really is the case, then why not use C++, Visual Basic, Java, Unix Scripting and a couple of other useful thingamajiggers ? |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Dec 13, 2002 11:21 pm Post subject: |
|
|
ROFL _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Dec 13, 2002 11:23 pm Post subject: |
|
|
Tommy, your last post raises a question that i have been wondering for some time and perhaps you could enlighten me: from what i can gather, a number of VDS users are also programmers in Delphi (and other programming languages?), why then would they want to use VDS which i think is not as powerful as these other languages?
Serge _________________
|
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri Dec 13, 2002 11:31 pm Post subject: |
|
|
Of course this has been discussed before. What I was trying to say is that he's just expecting
too much from VDS.
I think one of the reasons may be that the users are not advanced enough to program
full featured applications in the specific languages, while they are capable of doing the thing
in VDS.
Of course it couldn't be denied that there could also seem to be a commercial interest
(ie. shareware DLLs), even though that may proof not to come true in some cases.
Then one interest in staying with VDS I see is that the work you do is appreciated by
people. Languages like Delphi do have communities and such, but I don't see communities
as close as the VDS community. Things one does in such languages often seem like "just
another replica" of what has been done before to others.
Personally I like VDS much for writing quick tools for my own use, for example for doing
some batch operations on databases which would otherwise take very much work to
accomplish, or writing scripts to process registrations and automatically send out e-mails
and things like that.
Of course there could be other reasons, but I think those have been discussed well
enough in the past. |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Dec 13, 2002 11:46 pm Post subject: |
|
|
It's much easier and faster to write and debug, no matter
how prolific ya are in another language, and I agree with
Tommy about the VDS community.
I'd guess C/C++ usually requires about 10 times as much
(or more) written code than VDS (and isn't as forgiving with
mistakes) to do the same thing. This rate prolly goes down
as the program gets larger, because it takes so much C/C++
code just to display a window and process messages.
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Dec 14, 2002 12:12 am Post subject: |
|
|
Here's a comparison between the amount of code it takes to make a simple dialog in VDS and C++:
VDS CODE:
Code: | DIALOG CREATE,My Dialog,-1,0,240,87,NOMIN
DIALOG ADD,BUTTON,MyButton,32,40,156,24,My Button
DIALOG SHOW |
C++ CODE:
Code: | // Window and control code generated by VDS To C++ Converter v1.0
// VDS To C++ Converter v1.0 written by Mike Cherry <mike@sterlingpolice.net>
#include <windows.h>
#define NTXFONTHEIGHT(PointSize, hDC) (-MulDiv((PointSize), GetDeviceCaps(hDC, LOGPIXELSY), 72))
char WinClass[] = "";
char WinTitle[] = "My Dialog";
LRESULT CALLBACK WindowFunc(HWND, UINT, WPARAM, LPARAM);
HWND MyButton = NULL;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
HWND hwnd;
MSG msg;
WNDCLASS wcl;
// define main window class
wcl.hInstance = hInstance; //hand to this instance
wcl.lpszClassName = WinClass; // window class name
wcl.lpfnWndProc = WindowFunc; //window function
wcl.style = 0; // default style
wcl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.lpszMenuName = NULL; // no menu
wcl.cbClsExtra = 0; // no extra
wcl.cbWndExtra = 0;
//background
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
// register the window class
if(!RegisterClass(&wcl)) return 0;
// create main window
hwnd = CreateWindow(
WinClass, //class
WinTitle, //title
WS_OVERLAPPEDWINDOW, //window style -normal
CW_USEDEFAULT, // X Coordiate, default
CW_USEDEFAULT, // Y Coordiate, default
247, //width, default
91, //height, default
NULL, //no parent window
NULL, //use menu registered with this class
hInstance, //handle of this instance of the program
NULL //no additional arguments
);
// font handles
HFONT MainFont = CreateFont(NTXFONTHEIGHT(8, GetDC(hwnd)), 0 , 0, 0, 400, 0, 0, 0, ANSI_CHARSET, 0 , 0, DEFAULT_QUALITY, DEFAULT_PITCH , "MS Sans Serif");
// set window font
SendMessage(hwnd, WM_SETFONT, (WPARAM)MainFont, 0);
// controls
MyButton = CreateWindowEx(NULL, "BUTTON", "My Button", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 40, 32, 156, 24, hwnd, 0, hInstance, NULL);
if (! MyButton) return FALSE;
SendMessage(MyButton, WM_SETFONT, (WPARAM)MainFont, 0);
//Display window
ShowWindow(hwnd, nShowCmd);
UpdateWindow(hwnd);
//create the message loop
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message){
case WM_DESTROY: //terminate the program
MessageBox(hwnd, "Replace this line with code to be executed before the dialog closes", WinTitle, MB_OK);
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
} |
The VDS Code creates the dialog and adds the contents in a mere 3 lines,
while the C++ code takes about 91 lines! _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Sat Dec 14, 2002 1:10 am Post subject: |
|
|
Here is the exact form in Delphi.
first the UNIT1.DFM (form):
Code: |
object Form1: TForm1
Left = 475
Top = 226
Width = 245
Height = 118
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 32
Width = 156
Height = 24
Caption = 'My Button'
TabOrder = 0
end
end
|
Now the actual UNIT1.PAS which holds code/script:
Code: |
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
|
Of course the Form is created visually so hardly ever do you need to even modify the actual .DFM's code by hand. But still you can see the difference between VDS/Delphi if you wanted to do everything by hand. |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Dec 14, 2002 2:41 am Post subject: |
|
|
That's funny, correct me if i'm wrong, but did I just get blasted by Tommy over a feature request? These other langauges are going to advance. They are going to become easier to use. They are going to have more features. .net is a very good product, although not as easy to use as VDS now, if VDS does not advance it will be eventually...
Where i'm going with this is that if a wish list is not wanted or needed, get rid of it. VDS can become an obscure and obsolete langauge...all it has to do is nothing. No new features.
Not only that, I am being quoted out of context. VDS is my first and favorite language, that is exactly why I want to see it improved.
I feel that this mode of submissive behavior "it's just a scripting language" although true at this time...does not always have to be. SADE has an excellent product, one that does not need to be held back by what I consider to be negative thinking.
By the way Tommy, it's your board, but if you have a problem with me personally or over something I post, email me at cnodnarb@aol.com unless it violates TOS of this board, in which case take appropriate action.
Probably a little more aggravated than I should be,
NodNarb |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|