delphi-7

ActiveX pop-up dialogue window hides IE from tasklist

▼魔方 西西 提交于 2019-12-12 10:26:57
问题 This seems to only happen in IE6 I have an activex form written in Delphi 7. A dialogue window opened from within the activex control in IE6 gets displayed on the taskbar - the users (for some reason) do not want the dialogue to show in the taskbar. So I set the dialogue's borderStyle to bsToolwindow. This hides the dialogue from the taskbar but also has the (side-) effect of hiding IE from the task list in windows, which means that you cannot <alt>Tab back to IE if you tabbed away. Question:

Delphi - logging in to webpage from code

走远了吗. 提交于 2019-12-12 10:22:21
问题 I am using Delphi 7 and require some help with a problem, and yes, I have searched everywhere for an answer, yet the supplied code isn't documented , so I have no idea how it works or how to adjust it to fit my needs. What I am trying to achieve is to log in to the website http://kissanime.com/login .. The problem I'm experiencing is that I need to stay logged in while my program does some work on that website's HTML ( Basically I want to parse out the download links of a certain series, but

Exporting a list to OpenOffice Calc from Delphi

一个人想着一个人 提交于 2019-12-12 09:46:06
问题 I'm using Delphi 7 and I'd like to export the contents of a list from my program to OpenOffice Calc using automation, instead of using files. The task is simple: create new document, iterate through rows/columns and change cell data. I've found some code but it's not complete, and I was hoping someone has some example code ready to accomplish this very simple task. It could save me a few hours of trying. Thanks in advance! Edit: I'd like to automate OpenOffice Calc to achieve what I wrote

Opening webpage in default browser with double-quotes (") inside url

走远了吗. 提交于 2019-12-12 09:39:36
问题 When I try to open any site that has double-quotes ( " ) inside the link , for ex. user.php?name="stackoverflow" it just cuts " or sometimes it redirects me to Google!? Used code: ShellExecute(0, 'open', PChar('open'), PChar(URL), nil, SW_SHOW) ; 回答1: You need use a fully qualified URL including the http:// and escape/encode the URL by replacing the double-quotes ( " ) with %22 . Also you are passing wrong parameters. See MSDN: Use ShellExecute to launch the default Web browser Example:

Jabber / XMPP library for Delphi 7 [closed]

非 Y 不嫁゛ 提交于 2019-12-12 08:15:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am looking for xmpp / jabber protocol implementation for Delphi 7. IP*WORKS! is one of solutions, but it is expensive. I saw Any complete library for Jabber in Delphi? question and JOPL was the answer, but it is not for Delphi 7. What do you use for Jabber and Delphi 7? 回答1: I'd suggest taking a look at the

How to make a Digital clock in delphi7?

霸气de小男生 提交于 2019-12-12 07:58:24
问题 I am pretty new to delphi , and would like to start with something easy . Could someone please show me an example how to make a Digital clock that will transfer the "time" ( hour , min , sec ) to a label ? Or something like that 回答1: Exercise 1 Drop a TLabel and a TButton on your form. Double-click the button, and write procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption := TimeToStr(Time); end; Exercise 2 To get the time to update automatically, add a TTimer to your form,

Nothing but “packed” records — should I fix it?

冷暖自知 提交于 2019-12-12 07:17:58
问题 While reviewing some code in our legacy Delphi 7 program, I noticed that everywhere there is a record it is marked with packed . This of course means that the record is stored byte-for-byte and not aligned to be faster for the CPU to access. The packing seems to have been done blindly as an attempt to outsmart the compiler or something -- basically valuing a few bytes of memory instead of faster access An example record: TFooTypeRec = packed record RID : Integer; Description : String;

Delphi7 Canvas.TextOut can't write new lines

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:09:05
问题 I am trying to replace all "#" with new lines to draw: Canvas.TextOut(0,0,''+StringReplace('a#b','#',#13#10,[rfReplaceAll])); but nothing. TextOut prints "a#b" like the the replaced part doesn't even exist (But it does exist ofcourse): ab Instead of this: a b #13#10 is the new line (Windows) right? Then why this isn't working? Thank you. 回答1: You need to use DrawText to produce multi-line text: var R: TRect; .... R := Rect(0, 0, Width, Height); DrawText( Canvas.Handle, PChar(StringReplace('a

Memo line split

情到浓时终转凉″ 提交于 2019-12-12 02:48:57
问题 i have text in memo each line is something like something = anything I need to use Edit1 and Edit2 with button click event, so that edit1 will carry something and edit2 anything 回答1: procedure TForm1.Button1Click(Sender: TObject); var iPos : Integer; sText : String; begin sText := Memo1.Lines.Strings[0]; iPos := POS('=',sText); Edit1.Text := copy(sText,1,iPos - 1); Edit2.Text := copy(sText,iPos + 1,length(sText)); end; 来源: https://stackoverflow.com/questions/32754500/memo-line-split

TStringGrid with SpeedButtons

。_饼干妹妹 提交于 2019-12-12 02:45:02
问题 I want to have a button with icon at the end of each row. Like here: I tried this procedure TMyFrame.sgrd1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var canvas: TCanvas; sgrd: TStringGrid; point: TPoint; btn: TSpeedButton; begin sgrd := TStringGrid(Sender); canvas := sgrd.Canvas; canvas.FillRect(Rect); if (ACol = 1) then begin point := Self.ScreenToClient(ClientToScreen(Rect.TopLeft)); btn := TSpeedButton.Create(sgrd); btn.Parent := sgrd; btn.OnClick :