I found solution for problem!
Just replace "TicketTab" with "this". Here:
MyImage(){
image=new TImage(TicketTab); }
I hope someone finds this helpful!!
In project I provided in last post, you don't need Path pointer definition, just change default location of images (which are in the same folder as project, but however, change the path).
I just asked if someone has had this experience, since I see it is an awkward error, so ArkM if you don't...
Hmm.. let me provide more informations.
TicketTab is "available form" which is being called using this code:
TicketTab=new TTicketTab(Applicaton);
this->Hide();
TicketTab->ShowModal();
"this" presents "Auto-create form" MainTab, and its button calls TicketTab using code from above.
If we'd...
*Update*
I removed constructor
MyImage(){
image=new TImage(TicketTab); }
So it doesn't allocate memory when object of MyImage is created, but I have put allocation process into for loop:
for(int i=0;i<MAX;++i){
MyImages[i]->image=new TImage(TicketTab); //added line...
Hi ArkM,
I don't know from where did that semicolon appear. Probably during copy-paste and deleting not necessary stuff from this piece of code.
It'd show me that variable 'i' was not defined, before compiling, just as you said.
However, do you have any explanation about error that occurs...
Hi,
My problem is allocation failure.
Namely, I need to dynamically create 39 images, load pictures for them, add OnClick action and arrange them in Form.
Everything works perfectly through this code:
class MyImage{ //Class groups Index and *image, I need Index because of...
Hi 2ffat, thanks for asking!
I couldn't find the answer so I used another component - WindowsMediaPlayer, ActiveX component.
Nevertheless, there ain't such function for that component too, but there is an alternative!
You have "playState" member variable, and here you got list of its possible...
This topic is way too old, but I have faced same problem again.
However I sought for solution today and found that at Form create event I should type in
Form1->DoubleBuffered=true
And it works.
It solved my problem, so I hope it'll help to someone else too!
Hi,
This is question about MediaPlayer component from System tab in BorlandBuilder 6.0 for C++.
I am curious is there any member function of MediaPlayer that allows us to check is MediaPlayer playing something or not? For example by returning a bool variable as true for playing, and false for...
Hi, it's Stevan,
I wish to ask if anyone can explain me how to play all songs from specified folder using an ActiveX component WindowsMediaPlayer?
Or is there any way other than this one?
Thank you.
( I hope I won't be accused for spamming :D )
When I get first of those 2 errors, BCB points me to Forms.hpp and to the line:
/* TCustomForm.Destroy */ inline __fastcall virtual ~TForm(void) { }
And one more problem.
Not always, but sometimes automatically when I close dynamically created form, it gives me the following error:
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 6947CCC6 in
module 'wmp.dll'. Read of adress 00000009...
All right!
What about creating WindowsMediaPlayer withing dynamically created form?
I get the same error like above.
I tried several solutions like:
1.OnDestroy of form -> delete WindowsMediaPlayer1;;
2.OnClose -> like previous option;
3.Do nothing, just play it;
4.OnClose ->...
I made several experiments and I realized how does this work.
I do this
TForm1 *Cosmos = new TForm1(this);
Cosmos->ShowModal();
delete Cosmos;
And as long as the last form that has been called by Cosmos doesn't close, Cosmos won't be deleted (that was confusing me).
Practically I have the...
For example if I use this method:
TForm1 *Cosmos = new TForm1(this);
Cosmos->ShowModal();
delete Cosmos;
How is Cosmos going to dynamically call another form while it closes/hides itself? The same way?
If so, when will Cosmos be deleted? After last form closes?
I have one main form in...
Hi,
I have created the application which consists of several windows.
Except first window, all others are dynamically created.
They are created from windows before them and deleted after it's own closing ( they're deleted by themselves by button click ).
There is a problem.
When I wish to...
Hi,
I have created a image1 in Borland which is supposed to appear after mouse move over image2, and disappear if mouse moved over background image.
But problem shows at first moving over image1 when my image2 should appear, and it flickers.
The same happened when I created 2 images to act...
Hi,
I've just noticed that. My font has changed, it's Adobe font, but another type of font got bigger - same form.
One of forms has resized to really small dimensions.
Did you solve the problem?
( Created on Win7 and tested on XP )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.