• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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

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
kungfool
Asked:
kungfool
  • 3
  • 2
  • 2
  • +1
1 Solution
 
kretzschmarCommented:
>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
 
kretzschmarCommented:
after reviewing your profile,
i recognized that you are a fun bird

;-)
0
 
geobulCommented:
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
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!

 
jbshumateCommented:
Happy April 1st to you.
0
 
kungfoolAuthor Commented:
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
 
kungfoolAuthor Commented:
Yes, me and my friends have asked some stupid questions in EE :-)
0
 
geobulCommented:
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
 
kretzschmarCommented:
:-)) sorry i have no XP
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now