我正在使用WebBrowser来获取html页面的来源.我们的页面源包含一些文本和一些html标记.像这样 :
FONT></P><P align=center><FONT color=#ccffcc size=3>**Hello There , This is a text in our html page** </FONT></P><P align=center> </P>
Run Code Online (Sandbox Code Playgroud)
Html标签是随机的,我们无法猜测它们.那么有没有办法只获取文本并将它们与html标签分开?
这是我使用SendMessage函数填充TextBox的代码:
C := 'Hey there';
SendMessage(h1, WM_SETTEXT, 1, Integer(PChar(C)));
Run Code Online (Sandbox Code Playgroud)
现在,如何将光标移动到文本的末尾?
如何编辑mp3文件的详细信息,如描述,标题,副标题,评级,艺术家,...使用delphi.是否有任何组件可以做到这一点?
谢谢
我在一个线程中使用此代码(通过Indy Onexecute事件).有什么问题吗 ?
function TFrmMain.ShellExecute_AndWait(FileName, Params: string): bool;
var
exInfo: TShellExecuteInfo;
Ph: DWORD;
begin
FillChar(exInfo, SizeOf(exInfo), 0);
with exInfo do
begin
cbSize := SizeOf(exInfo);
fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
Wnd := GetActiveWindow();
exInfo.lpVerb := 'open';
exInfo.lpParameters := PChar(Params);
lpFile := PChar(FileName);
nShow := SW_NORMAL;
end;
if ShellExecuteEx(@exInfo) then
Ph := exInfo.hProcess
else
begin
Result := true;
exit;
end;
while WaitForSingleObject(exInfo.hProcess, 50) <> WAIT_OBJECT_0 do
begin
end;
CloseHandle(Ph);
Result := true;
end;
Run Code Online (Sandbox Code Playgroud) 如何创建executable包含DLL和图像资源文件的单个包?
然后如何在运行时从我的可执行文件中提取它们?
我已exe使用UpdateResource函数将资源文件附加到现有文件.
我该如何提取它?
编辑
这是我将资源文件附加到现有exe文件的代码:
Uses Classes, Windows, SysUtils, Dialogs;
Type
TBuffer = Array[0..0] of Byte;
PBuffer = ^TBuffer;
Var
FS : TFileStream;
ResourceHandle : THandle;
DataLength : DWord;
Data : PBuffer;
Ok : Boolean;
Begin
ResourceHandle := BeginUpdateResource(pChar('d:\someexefile.exe'), False);
IF (ResourceHandle <> 0) Then
Begin
FS := TFileStream.Create('d:\somebitmap.bmp', fmOpenRead);
FS.Seek(0, soFromBeginning);
DataLength := FS.Size;
GetMem(Data, DataLength);
FS.Read(Data^, DataLength);
FS.Free;
Ok := True;
IF (not UpdateResource(ResourceHandle, RT_RCDATA, pChar('MyNewResource'), LANG_SYSTEM_DEFAULT{MakeLangID(LANG_NEUTRAL, SUBLANG_NEUTRAL)}, Data, DataLength)) Then Ok := False;
IF …Run Code Online (Sandbox Code Playgroud) 是否可以为WebBrowser控件制作自定义菜单?
我想禁用一些现有项目并添加一些新项目。
如何使用ProgressBar SaveToFile方法?实际上我想将资源保存到文件中,并且在保存时将进度条从0%更新到100%,我该怎么做?
我想将MP3文件与Delphi 2010混合使用.
这可能吗?有没有人知道component我可以使用(套)来完成这项工作?或者也许是运行时库?有经验混合MP3文件的人提示吗?
delphi ×10
browser ×2
mp3 ×2
resources ×2
cursor ×1
delphi-2010 ×1
details ×1
download ×1
extract ×1
focus ×1
html ×1
indy ×1
menu ×1
mixing ×1
package ×1
progress-bar ×1
sendmessage ×1
shellexecute ×1
stream ×1
text ×1