?
Solved

makes me mad!!!!!!!!!!

Posted on 2003-04-01
8
Medium Priority
?
220 Views
Last Modified: 2010-04-06
Ok,
I have been using visual basic for years and I recently started to learn delphi. I find it very irritating. For example I wanted to print out a messagebox containing an integer. In Delphi you can only use a String. There are also so many different characters type variables. Why can't they just have a string and char, instead of making it so confusing.

Now in Delphi 7 there is a MessageDlg function. TMsgDlgType:Button parameter. Instead of being able to enter a number you have to enter the constant value. I find Delphi extremely fussy and these annoying little problems make me mad.  Can someone give me some tips about this stuff I have mentioned.

I also know in Delphi 7 there is a XPManifest control. If I place this control on my form is that all I need to make the controls appear in the XP style (on XP computers, obviously)

BYe
0
Comment
Question by:kungfool
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8245170
>I wanted to print out a messagebox containing an integer
showmessage('This is an Integer-Message: '+IntToStr(100));

>TMsgDlgType:Button parameter. Instead of being able to
>enter a number you have to enter the constant value
then you will think that the-api is fussy too
(delphi just redeclares the win-api-constants)

anyway,
what is your problem, except to be worry about delphi?

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8245314
after reviewing your profile,
i recognized that you are a fun bird

;-)
0
 
LVL 17

Expert Comment

by:geobul
ID: 8245498
Hi,

You may use:

procedure TForm1.Button1Click(Sender: TObject);
begin
  windows.MessageBox(0, 'Text', 'Caption', 33);
end;

which means OK, Cancel buttons with Question mark.

Regards, Geo
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:jbshumate
ID: 8245830
Happy April 1st to you.
0
 

Author Comment

by:kungfool
ID: 8252866
I don't remember specifically, but I had one type of string and I wanted to print that in the messagebox but it wasn't compatible with the messagebox type, so what do you do then.

What about if I wanted to create a string for example

"Your score is: " & intScore

I had troubles doing this aswell. Everything in delphi is such a nuisance.

Also what about the XPManifest control. No one answered my question about that yet.
0
 

Author Comment

by:kungfool
ID: 8252880
Yes, me and my friends have asked some stupid questions in EE :-)
0
 
LVL 17

Accepted Solution

by:
geobul earned 200 total points
ID: 8253061
windows.MessageBox(0, PChar('Your score is: ' + IntToStr(intScore)), 'Caption', 33);

or

windows.MessageBox(0, PChar(Format('Your score is: %d',[intScore])), PChar('Information'), 33);

PChar type is C string (null-terminated, 8-bit) used in WinAPI functions;
PWideChar is a pointer to a null-terminated string of 16-bit characters, also used in WinAPI;
String type is Pascal string;

String is reference-counted while PChar is not.

I'm sorry but I don't have Delphi 7.

Regards, Geo
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8253075
:-)) sorry i have no XP
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question