Hola lisette.
No entiendo bién el contenido de tu mensaje pero en respuesta al título y en forma muy resumida, te pongo un ejemplo de como cargar una página web.
Agregá un
TPanel (
Align=
alTop) y dentro de él un
TEdit, 3
TSpeedButton, y un
TCppWebBrowser alineado
alClient (pestaña Internet).
Luego el siguiente código:
Código:
/* OnKeyDown, si Key = return => Ir */
void __fastcall TForm1::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key == VK_RETURN) {
wchar_t *wchar = new wchar_t[Edit1->Text.WideCharBufSize()];
CppWebBrowser1->Navigate(Edit1->Text.WideChar(wchar,
Edit1->Text.WideCharBufSize()));
delete wchar;
}
}
/* SpeedButtonGo = Ir */
void __fastcall TForm1::SpeedButtonGoClick(TObject *Sender)
{
Edit1->SetFocus();
keybd_event(VK_RETURN, 0, 0, 0); // => OnKeyDown
}
/* SpeedButtonForward = Atras */
void __fastcall TForm1::SpeedButtonForwardClick(TObject *Sender)
{
CppWebBrowser1->GoForward();
}
/* SpeedButtonStop = Parar */
void __fastcall TForm1::SpeedButtonStopClick(TObject *Sender)
{
CppWebBrowser1->Stop();
}
Saludos.