Jump to content

Linuxuser1234

Members
  • Content Count

    65
  • Joined

  • Last visited

Everything posted by Linuxuser1234

  1. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 i just had to restart the ide to get rid of the container form not set message
  2. I would like my sphere to act as a canvas so i can draw lines images etc over a bitmap image of the earth how can i accomplish this
  3. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 now i get this and also when i click on the design tab i keep getting a error saying container form not set and i changed the name from ignore the first error i got it fixed but im still getting the second error //second error line LIdx := AAngle div 15.0;
  4. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 i put the function under public still wont work private { Private declarations } public { Public declarations } function TForm7.KnobLabelStationAngle(const AAngle : Single) : String; overload; function TForm7.KnobLabelFreqAngle(const AAngle : Single ) : Single; overload; end; procedure TForm7.KnobClick(Sender: TObject); begin //Knob Knob.RotationAngle := Knob.RotationAngle - 15.0; Rectangle4.RotationAngle := Knob.RotationAngle - 15.0; Label2.Text := Format ('%s', [KnobLabelStationAngle(Knob.RotationAngle), KnobLabelFreqAngle(Knob.RotationAngle) ] ); end; function TForm7.KnobLabelStationAngle(const AAngle : Single) : String; const CStationLabel : array[0..24-1] of String = ('KEC61', 'WXK30'); var LIdx : Integer; begin LIdx := AAngle div 15.0; Result := CStationLabel[LIdx]; end; function TForm7.KnobLabelFreqAngle(const AAngle : Single ) : Single; begin Result := (AAngle / 162.550 * 162.525 * 162.500 * 162.400 * 162.475) end;
  5. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 sorry if this question sounds basic but i cant figure out how to fix this error TForm7 does not contain a member named KnobLabelStationAngle i have put the function line under the procedure and in public/private nothing worked
  6. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 also how would i change a tlabel text based on what angle the knob is set to for example if the angle is at 15deg the tlabel would display another text and i do know how to set the text just not sure how to set the text based off the knob angle
  7. Linuxuser1234

    How to rotate a RoundRect on click

    @Rollo62 ignore this comment
  8. Linuxuser1234

    How to rotate a RoundRect on click

    procedure TForm7.KnobClick(Sender: TObject); begin //Knob property RotationAngle: Single read GetRotationAngle write SetRotationAngle; end; @Rollo62 this causes Expected END but received Property
  9. Linuxuser1234

    Media player causing weird issue

    also this MediaPlayer1.FileName := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3.myext'; shows unsupported media type
  10. Linuxuser1234

    How can i have my sphere act as a canvas in viewport

    @Pat Foley
  11. Linuxuser1234

    How can i have my sphere act as a canvas in viewport

    @Pat Foley What Procedure would i use to use the equation
  12. in delphi i made a popup window that looks like a weather radio and i would like to stream audio from a website url using idHTTP and then streaming the audio from that website using Tmediaplayer component i cant find any working examples anyone have any suggestions on how i can connect to a website and stream audio from a mediaplayer on button click
  13. Linuxuser1234

    How can i stream audio from mediaplayer with idhttp

    and yes i have check the stackoverflow answers from the link that you sent and i still get the same result MediaPlayer1.FileName := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3';
  14. Linuxuser1234

    How can i stream audio from mediaplayer with idhttp

    @Remy Lebeau i dont hear any audio and after i close the popup window i cant close out of my main application like i have to go to task manager and close it from there but the main app doesn't freeze or anything i can still open my popup windows procedure TForm7.Button1Click(Sender: TObject); //This Button Connects to weatherusa radio server and change //a few labels caption begin Label2.Text := '162.550 MHz'; Label6.Text := 'Status: Connected'; Label5.Text := 'KEC61'; //default Wx radio Station Label7.Text := 'AL'; //default state Label8.Text := 'Mobile'; Button1.Text := 'Click to disconnect from weatherusa.net'; MediaPlayer1.FileName := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3'; MediaPlayer1.Play;
  15. Linuxuser1234

    How can i stream audio from mediaplayer with idhttp

    @Remy Lebeau i wrote this idhttp how would i use this procedure when i click on a button i have tried override but that wouldn't work procedure TForm7.IdHTTP1Authorization(Sender: TObject; Authentication: TIdAuthentication; var Handled: Boolean); var get_url: string; resp: TmemoryStream; begin // connect to weatherusa get_url := 'https://radio.weatherusa.net/NWR/KEC61_2.mp3'; resp := TMemoryStream.Create; idHTTP1.Get(get_url+'v', resp); end;
  16. How can i make a slider that moves from left to right or in vise versa i have tried this youtube tutorial but every time i moved the RoundRect i keep getting access violation error and here is what my slider looks like
  17. @Sherlock that what they did in the video tutorial they added F
  18. im trying to add a custom font 'DSEG' which is basically a seven segment display does anyone have any code examples i can use i have tried some before but i couldn't get the code working
  19. Linuxuser1234

    Deleted

    i fixed the issue
  20. Linuxuser1234

    Deleted

    I fixed this issue
  21. Linuxuser1234

    How can i add a custom font to a windows fmx application

    @vfbbi got it working thanks
  22. Linuxuser1234

    How can i add a custom font to a windows fmx application

    @vfbb ok so i added that to my dbr project file so in my unit7 file how would i apply that font to TLabel2
  23. @Sherlock i commeted each line to see what throws the error all of these lines shows the error under the 2nd then begin //L:=TLine(TLayout(F).Children[0]); //R:=TRoundRect(L.Children[0]); //P:=TLayout(F).AbsoluteToLocal(T.Location); //P.X:=R.Position.X; //P.Y:=P.Y - 10 - R.Height * 0.5; //R.Position.Point:=P;
  24. Linuxuser1234

    How can i add a custom font to a windows fmx application

    here is the full unit file code unit Unit7; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.Effects, FMX.Edit, FMX.ComboEdit, FMX.Media, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, IdMessage, IdAttachment, IdAuthentication; type TForm7 = class(TForm) ArcDial1: TArcDial; Rectangle1: TRectangle; Label1: TLabel; Label2: TLabel; Label4: TLabel; Label5: TLabel; ShadowEffect1: TShadowEffect; ComboEdit1: TComboEdit; Image1: TImage; Button1: TButton; Image2: TImage; Label3: TLabel; Button2: TButton; Image3: TImage; Image4: TImage; RoundRect1: TRoundRect; Line1: TLine; Rectangle2: TRectangle; Rectangle3: TRectangle; GlowEffect1: TGlowEffect; Label6: TLabel; MediaPlayer1: TMediaPlayer; IdHTTP1: TIdHTTP; Label7: TLabel; Label8: TLabel; RoundRect2: TRoundRect; Label9: TLabel; procedure Button1Click(Sender: TObject); procedure IdHTTP1Authorization(Sender: TObject; Authentication: TIdAuthentication; var Handled: Boolean); private { Private declarations } public { Public declarations } end; var Form7: TForm7; implementation {$R *.fmx} procedure TForm7.Button1Click(Sender: TObject); //This Button Connects to weatherusa radio server and change //a few labels caption begin Label2.Text := '162.550 MHz'; Label6.Text := 'Status: Connected'; Label5.Text := 'KEC61'; //default Wx radio Station Label7.Text := 'AL'; //default state Label8.Text := 'Mobile'; Button1.Text := 'Click to disconnect from weatherusa.net'; end; procedure TForm7.IdHTTP1Authorization(Sender: TObject; Authentication: TIdAuthentication; var Handled: Boolean); begin // connect to weatherusa end; initialization TSkTypefaceManager.RegisterTypeface('C:\Boltgui\Popups\Font\DSEG14ClassicMini-Bold.ttf'); end.
  25. Linuxuser1234

    How can i add a custom font to a windows fmx application

    @vfbb i also get a undeclared identifier errors initialization TSkTypefaceManager.RegisterTypeface('C:\Boltgui\Popups\Font\DSEG14ClassicMini-Bold.ttf'); end.
×