<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Skyterror's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/341532/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user Skyterror.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Fri, 24 May 2013 17:09:29 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Re: Repetitions in array</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;You mean like this?&lt;br /&gt;
&lt;br /&gt;
Searching the element which is same with input&lt;br /&gt;
&lt;br /&gt;
int i=0;&lt;br /&gt;
while((i&amp;lt;10) &amp;amp;&amp;amp; (a[i] != input)) i++;&lt;br /&gt;
&lt;br /&gt;
if(i == 10)&lt;br /&gt;
/* &lt;br /&gt;
ADD YOUR CODE HERE:&lt;br /&gt;
&lt;br /&gt;
it means that our loop never found input in array. This is because all the condition of loop is true (remember logic table of and / &amp;amp;&amp;amp;)&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
else &lt;br /&gt;
/* &lt;br /&gt;
ADD YOUR CODE HERE:&lt;br /&gt;
&lt;br /&gt;
it means that our loop is break in middle of operation so the value of i is never achieve 10. This is done because there are at least 1 condition which get false as the loop operate.&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;</description>
      <pubDate>Fri, 29 Oct 2010 18:24:22 -0700</pubDate>
    </item>
    <item>
      <title>Re: linker error: unresolve external</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;From your message, i notice this:&lt;br /&gt;
__Fastcall_Advgrid::TAdvstringGrid::AutosizeCol(const int, const int) referenced from C:\MHSS\Gamespaceframe.OBJ&lt;br /&gt;
&lt;br /&gt;
is the __Fastcall use 'F' instead 'f'?? because we know that C++ is case sensitive and different character cause different interpretation of compiler. C++ Builder use __fastcall not __Fastcall.&lt;br /&gt;
&lt;br /&gt;
next, i notice that the __Fastcall and _Advgrid is linked as a word. If it is, then compiler will consider it as one symbol. Maybe you can give a space between them.&lt;br /&gt;
&lt;br /&gt;
Hope it help you&lt;br /&gt;</description>
      <pubDate>Tue, 27 Apr 2010 03:52:33 -0700</pubDate>
    </item>
    <item>
      <title>Re: SOS!!previous next button!!</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;This post has been deleted.</description>
      <pubDate>Mon, 26 Apr 2010 19:12:47 -0700</pubDate>
    </item>
    <item>
      <title>Re: SOS!!previous next button!!</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;This post has been deleted.</description>
      <pubDate>Mon, 26 Apr 2010 19:11:52 -0700</pubDate>
    </item>
    <item>
      <title>Re: SOS!!previous next button!!</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;Hello taouki,&lt;br /&gt;
&lt;br /&gt;
You can use a simple file to read and write for memorize the step you have done... *I have done the same as you do now*&lt;br /&gt;
&lt;br /&gt;
Why i use a file? not write down the code only in the app itself? because I want to make an app that can be renewable without change it source.&lt;br /&gt;
&lt;br /&gt;
For the app, i use .ini file and write some data there.&lt;br /&gt;
There is a data name TIniFile on IniFiles.hpp header that you can use.&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
&lt;br /&gt;
For example we have 4 images to be shown. So we need one variable to store the total image number. Next we need the file or image that want to be shown. Remember that the path must be clear or we must specify the full path of those images.&lt;br /&gt;
&lt;br /&gt;
So our .ini file will be like this&lt;br /&gt;
&lt;br /&gt;
[slideshow]&lt;br /&gt;
total=4&lt;br /&gt;
image[0]=d:\my image\picture1.jpg&lt;br /&gt;
image[1]=d:\my image\picture2.jpg&lt;br /&gt;
image[2]=d:\my image\picture3.jpg&lt;br /&gt;
image[3]=d:\my image\picture4.jpg&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
you can name the file anything you want, but for in this example i want to use that filename&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
We have 2 button which is PrevButton and NextButton. A TImage which is SlideImg. Else we have a form *of course we we need it&lt;br /&gt;
&lt;br /&gt;
Declare this variable on your form by insert it inside the class (your Form class). You can put in either public or private section.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
int TotSlide; // for your total slide number
int CurSlide; // Current displayed slide
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now write this on your OnLoad method of your form&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
//---------------------------------------------------------------------------
void __fastcall TVirusForm::FormCreate(TObject *Sender)
{
	TIniFile * ini = new TIniFile("D:\\My File\\setting.ini");
	// We specify the path of our ini file. For example it's name
	// is setting.ini
	
	TotSlide = ini-&amp;gt;ReadInteger("slideshow","total",0);
	// the section is in [slideshow] section. the data is located
	// on total indent. If there is no the data, it will return 0

	CurSlide = 0;  // I use a zero-based index so 0 means first
}
//---------------------------------------------------------------------------
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now write this on your NextButton OnClick code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
	if(CurSlide &amp;lt; (TotSlide-1)) {
		// Remember zero-based index		
		CurSlide += 1;
		// increasing the current preview slide
		SlideImg-&amp;gt;Picture-&amp;gt;LoadFromFile( 
			ini-&amp;gt;ReadString("SlideShow",
				"image["+CurSlide+"]",
				"d:\my image\error.jpg
			)
			// read the filename, if it's error it will
			// return an error image
		);
	}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now write to your PrevButton OnClick method&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
	if(CurSlide &amp;gt; 0) {
		CurSlide -= 1;
		// decreasing the current preview slide
		SlideImg-&amp;gt;Picture-&amp;gt;LoadFromFile( 
			ini-&amp;gt;ReadString("SlideShow",
				"image["+CurSlide+"]",
				"d:\my image\error.jpg
			)
			// read the filename, if it's error it will
			// return an error image
		);
	}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
We'are done...&lt;br /&gt;</description>
      <pubDate>Fri, 23 Apr 2010 22:21:51 -0700</pubDate>
    </item>
    <item>
      <title>Re: Password login screen</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;I assumed that you know the basic of events and can create other form in your application (Multiple Forms)&lt;br /&gt;
&lt;br /&gt;
For this sample, you must use 2 forms. first we call &lt;span style="color: Red;"&gt;Form&lt;/span&gt;1 and other we call &lt;span style="color: Red;"&gt;Form2&lt;/span&gt;. Form1 is the main form for your application and Form2 is your login screen.&lt;br /&gt;
In Form2 we have a &lt;span style="color: Red;"&gt;Label1&lt;/span&gt; which is a TLabel variable. That label has a text for asking user's password. We also have a &lt;span style="color: Red;"&gt;Edit1&lt;/span&gt; which is a TEdit variable. It will store password that user entered. And next we have a &lt;span style="color: Red;"&gt;Button1&lt;/span&gt; which is a TButton variable. We use this button to send a confirmation to program that user have done typing his password :)&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
First, include the header of Form2 in Form1. We must do it to let Form1 know that there is &lt;br /&gt;
&lt;br /&gt;
#include "Form2.h"   // This is for example&lt;br /&gt;
&lt;br /&gt;
then, write down this code to OnCreate Method of 1st form&lt;br /&gt;
void __fastcall TForm1::FormCreate(TObject *Sender)&lt;br /&gt;
{&lt;br /&gt;
TForm2* Form2 = new TForm2(Application) // We create instance of form2&lt;br /&gt;
Form1-&amp;gt;Hide();    // This will hide your main form for a moment&lt;br /&gt;
Form2-&amp;gt;ShowModal();    // This will display your child / 2nd form&lt;br /&gt;
Form2-&amp;gt;Hide();&lt;br /&gt;
delete Form2;&lt;br /&gt;
Form1-&amp;gt;Show();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
write down this code to your OnClick method of Button1&lt;br /&gt;
void __fastcall TForm2::Button1Click(TObject *Sender)&lt;br /&gt;
{&lt;br /&gt;
/*&lt;br /&gt;
First we compare the text in Edit1 with our password.&lt;br /&gt;
If both are match, then form2 will close and program will open form1. But if it's not it will prompt that user have enterd wrong password&lt;br /&gt;
*/&lt;br /&gt;
if(Edit1-&amp;gt;Text == "YourPaswordHere") // Any password you want :)&lt;br /&gt;
{&lt;br /&gt;
Form2-&amp;gt;Close&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
MessageBox(Application-&amp;gt;Handle, "You have entered wrong password", "Error", MB_ICONERROR);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
write down this code to OnClose method of Form2&lt;br /&gt;
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &amp;amp;Action)&lt;br /&gt;
{&lt;br /&gt;
/*&lt;br /&gt;
This will close application if user click the "x" button on upper-right of Form2 form. If we don't this, everytime user click thos close button, program will load the main form :(&lt;br /&gt;
*/&lt;br /&gt;
Application-&amp;gt;Terminate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we have donw writing our login-screen program :)I assumed that you know the basic of events and can create other form in your application (Multiple Forms)&lt;br /&gt;
&lt;br /&gt;
For this sample, you must use 2 forms. first we call &lt;span style="color: Red;"&gt;Form&lt;/span&gt;1 and other we call &lt;span style="color: Red;"&gt;Form2&lt;/span&gt;. Form1 is the main form for your application and Form2 is your login screen.&lt;br /&gt;
In Form2 we have a &lt;span style="color: Red;"&gt;Label1&lt;/span&gt; which is a TLabel variable. That label has a text for asking user's password. We also have a &lt;span style="color: Red;"&gt;Edit1&lt;/span&gt; which is a TEdit variable. It will store password that user entered. And next we have a &lt;span style="color: Red;"&gt;Button1&lt;/span&gt; which is a TButton variable. We use this button to send a confirmation to program that user have done typing his password :)&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
First, include the header of Form2 in Form1. We must do it to let Form1 know that there is &lt;br /&gt;
&lt;br /&gt;
#include "Form2.h"   // This is for example&lt;br /&gt;
&lt;br /&gt;
then, write down this code to OnCreate Method of 1st form&lt;br /&gt;
void __fastcall TForm1::FormCreate(TObject *Sender)&lt;br /&gt;
{&lt;br /&gt;
TForm2* Form2 = new TForm2(Application) // We create instance of form2&lt;br /&gt;
Form1-&amp;gt;Hide();    // This will hide your main form for a moment&lt;br /&gt;
Form2-&amp;gt;ShowModal();    // This will display your child / 2nd form&lt;br /&gt;
Form2-&amp;gt;Hide();&lt;br /&gt;
delete Form2;&lt;br /&gt;
Form1-&amp;gt;Show();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
write down this code to your OnClick method of Button1&lt;br /&gt;
void __fastcall TForm2::Button1Click(TObject *Sender)&lt;br /&gt;
{&lt;br /&gt;
/*&lt;br /&gt;
First we compare the text in Edit1 with our password.&lt;br /&gt;
If both are match, then form2 will close and program will open form1. But if it's not it will prompt that user have enterd wrong password&lt;br /&gt;
*/&lt;br /&gt;
if(Edit1-&amp;gt;Text == "YourPaswordHere") // Any password you want :)&lt;br /&gt;
{&lt;br /&gt;
Form2-&amp;gt;Close&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
MessageBox(Application-&amp;gt;Handle, "You have entered wrong password", "Error", MB_ICONERROR);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------&lt;br /&gt;
write down this code to OnClose method of Form2&lt;br /&gt;
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &amp;amp;Action)&lt;br /&gt;
{&lt;br /&gt;
/*&lt;br /&gt;
This will close application if user click the "x" button on upper-right of Form2 form. If we don't this, everytime user click thos close button, program will load the main form :(&lt;br /&gt;
*/&lt;br /&gt;
Application-&amp;gt;Terminate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we have done writing our login-screen program :)&lt;br /&gt;</description>
      <pubDate>Thu, 01 Apr 2010 04:26:54 -0700</pubDate>
    </item>
    <item>
      <title>Change Component Icon on Component Palette</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the C++ Builder forum.&lt;/p&gt;Hi guys,&lt;br /&gt;
&lt;br /&gt;
Now I'm making a component which is derived from TComponent object. I have write it and succesfully compile it to .lib format. What i want to ask now is how can i change the bitmap of those component in Component Palette so i can use my own graphics or icon for my component??&lt;br /&gt;
&lt;br /&gt;
In default condition, when i derived component from TComponent object (it named MyComponent), the icon for MyComponent is the same icon with TComponent. It would be nice if i can use my own icon to represent MyComponent.&lt;br /&gt;
&lt;br /&gt;
Please help me...&lt;br /&gt;
Thanks before :)&lt;br /&gt;</description>
      <pubDate>Fri, 05 Mar 2010 21:43:40 -0700</pubDate>
    </item>
    <item>
      <title>Perform "Syntax Highlighting" in TRichEdit</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the C++ Builder forum.&lt;/p&gt;Hi, guys&lt;br /&gt;
Currently I have a very confusing problems. Lately I am developing a small project. In my project, I use a RichEdit component. I wonder how can we perform action like in IDE programs which it is syntax highlighting. If user enter some word that program recognized, it will changes the words color to red or blue (depend on what syntax) while the others that are not the syntax are remain black.&lt;br /&gt;
&lt;br /&gt;
Is there anybody could help me solve this problem?&lt;br /&gt;</description>
      <pubDate>Sat, 16 Jan 2010 02:47:41 -0700</pubDate>
    </item>
    <item>
      <title>Re: Checking Instance of Application</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;Thank you for your reply, but actually i've done it in another way&lt;br /&gt;
&lt;br /&gt;
I open main source&lt;br /&gt;
&amp;gt; project -&amp;gt; View Source&lt;br /&gt;
&lt;br /&gt;
Searching for WinMain function which is like this&lt;br /&gt;
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)&lt;br /&gt;
&lt;br /&gt;
Normally if there is no another instance before, the 2nd argument value will be initialized with NULL value, then i will check the 2nd argument which is hPrevInstance. If it's not NULL value, then there must be another instance before. So i give some change to 2nd argument like this&lt;br /&gt;
&lt;br /&gt;
Then in 2nd argument, i change it become like this&lt;br /&gt;
HINSTANCE hPrevInstance&lt;br /&gt;
&lt;br /&gt;
Then the codes become like this&lt;br /&gt;
&lt;br /&gt;
WINAPI WinMain(HINSTANCE, HINSTANCE hPrevInstance, LPSTR, int) {&lt;br /&gt;
&lt;br /&gt;
if(hPrevInstance != NULL) Application-&amp;gt;Terminate();&lt;br /&gt;
&lt;br /&gt;
// and bla bla bla&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 15 Jul 2009 01:40:29 -0700</pubDate>
    </item>
    <item>
      <title>Checking Instance of Application</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the C++ Builder forum.&lt;/p&gt;Hi, now I'm working on some school projects..&lt;br /&gt;
&lt;br /&gt;
I want to make an application that before it start running, it will check if there is another instance have already running before. If there is a previous instance found, it will show some message and then close itself. If not it will show it's form and run normally...&lt;br /&gt;
&lt;br /&gt;
thanks before..&lt;br /&gt;
&lt;br /&gt;
Best regards,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Satria Ady Pradana&lt;br /&gt;</description>
      <pubDate>Sun, 05 Jul 2009 08:32:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: Link all libraries to single executable file ??</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C++ Builder forum.&lt;/p&gt;Thanks for the advice,&lt;br /&gt;
&lt;br /&gt;
I'm using Borland C++ Builder 6.0 , is it same for both Builder 6.0 and 2009 ??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well, maybe i should give it a try&lt;br /&gt;</description>
      <pubDate>Fri, 03 Jul 2009 05:59:35 -0700</pubDate>
    </item>
    <item>
      <title>Link all libraries to single executable file ??</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the C++ Builder forum.&lt;/p&gt;Hi guys, i have a little problem...&lt;br /&gt;
&lt;br /&gt;
When i programming in C++ builder i found that every programs that i made always need some .dll files to load. Without this my programs couldn't run.&lt;br /&gt;
&lt;br /&gt;
The problem is, I want my programs can be ported to another computer without using those library. Is that any way to compile all the components or .dll files to become single executable file that can run independently?&lt;br /&gt;
&lt;br /&gt;
Please, help me&lt;br /&gt;</description>
      <pubDate>Thu, 02 Jul 2009 01:49:35 -0700</pubDate>
    </item>
  </channel>
</rss>