?
Solved

text box question

Posted on 2001-08-15
4
Medium Priority
?
163 Views
Last Modified: 2010-04-06
this is the code im using at the moment ShellExecute(Handle, 'open',
  'Http://www.yahoo.co.uk',nil,nil, SW_SHOWNORMAL);


which works fine however i want to get it to read the url
from a edit box when i put
ShellExecute(Handle, 'open',
  'Http://'+edit1.text,nil,nil, SW_SHOWNORMAL);
it doesent work neither does


ShellExecute(Handle, 'open',
  edit1.text,nil,nil, SW_SHOWNORMAL);
0
Comment
Question by:catbecks
[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
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 total points
ID: 6388187
try this change (pchar-type is needed, you can do this via conversion)
ShellExecute(Handle, 'open',PCHAR( 'Http://'+edit1.text),nil,nil, SW_SHOWNORMAL);
                     
0
 

Expert Comment

by:david-johnstone
ID: 6388194
What you need to do is cast the string returned from the edit box as a PChar, so the statement becomes


ShellExecute(Handle, 'Open', PChar('http://' + edit1.Text), nil, nil, SW_SHOWNORMAL);

or

ShellExecute(Handle, 'open', PChar(edit1.Text), nil, nil, SW_SHOWNORMAL);

That should sort it out.

David.
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 6388200
ShellExecute(Handle, 'open', PChar(edit1.text), nil, nil, SW_SHOWNORMAL);

0
 
LVL 3

Expert Comment

by:VSF
ID: 6388473
too late guys
Meikl was the fastest!

VSF
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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 you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

765 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