- Joined
- Apr 13, 2009
- Messages
- 88
- Reaction score
- 0
Hi, I'm messing about in Delphi 7 out of boredom anyways, I tried to do a basic If statement... the IDE stops right where the If starts which makes next to no sense to me the statement is inside a timer and it basically is :
If frmMain.Height <> 477 Then
WebBrowser1.Height := NewHeight
end;
I declared NewHeight as an integer in the Vars bit, and defined it above the If statement just shown :
NewHeight := frmMain.Height - 40
anyways, this is my first attempt at Delphi, what I'm trying to do is simple, when I resize my form I want it to resize my WebBrowser1 component (which I should really rename, but I'm too lazy atm) I thought it would be as simple as making a simple 'formula' for substracting the forms height by 40 (the height difference between the form and the webbrowser component) and declaring the variable of NewHeight as an Int, then doing a simple if statement, OH and since I didn't know where to put the code, I made a Timer (lol) since idk where the hell else I could put in it, if needed I'll upload full source (but I don't think anyone here even has Delphi...) which brings me to my other issue, I doubt anyone here does delphi (unless by some divine miracle someone does) anyways, any help would be appreciated, and sorry for my sloppyness I'm rather tired, and I get sloppy when tired.
If frmMain.Height <> 477 Then
WebBrowser1.Height := NewHeight
end;
I declared NewHeight as an integer in the Vars bit, and defined it above the If statement just shown :
NewHeight := frmMain.Height - 40
anyways, this is my first attempt at Delphi, what I'm trying to do is simple, when I resize my form I want it to resize my WebBrowser1 component (which I should really rename, but I'm too lazy atm) I thought it would be as simple as making a simple 'formula' for substracting the forms height by 40 (the height difference between the form and the webbrowser component) and declaring the variable of NewHeight as an Int, then doing a simple if statement, OH and since I didn't know where to put the code, I made a Timer (lol) since idk where the hell else I could put in it, if needed I'll upload full source (but I don't think anyone here even has Delphi...) which brings me to my other issue, I doubt anyone here does delphi (unless by some divine miracle someone does) anyways, any help would be appreciated, and sorry for my sloppyness I'm rather tired, and I get sloppy when tired.

