Tags:Hkey_local_machineRemove Desktop IconsShow Desktop Icon

In Windows Vista, it is very easy to remove the desktop icons. If you do not like to have any icons on the desktop, you can simply right click on the desktop, select the "View" > "Show Desktop icon" and click it, so that you can remove or restore the desktop icons. While if you do not mind the icon on the desktop but just the "Recycle Bin". Ok, here I would give you a way to remove the single desktop icon, let me take the example of...

Operating system - Windows

Q: How to Make My Computer to Shutdown at a Specified Time?

A: To shutdown the computer in a specified time, from your "Start" menu, click "Run", then enter "Shutdown.exe -s -t 3600" in the text line and press "Enter" key. This means to shutdown the computer automatically after 60 minutes, "3600" means the time, it was calculated in seconds.

After set up an automatic shutdown operation, if you want to cancel, you can use the same method mentioned above to enter "shutdown -a" in the "Run"...

Operating system - Windows

Q: My computer can not enter the standby mode now, each time an error message raise: “The service Microsoft.NET Framework v1.1.4322 Update is preventing the maching from entereing hibernation.Try stopping this service and try again.” I would like to know what would cause this problem? How to stop the service? And what would the system affected if I stopped the service? Thanks!

A: This is an online update service, when the update service runs, it need the CPU, memory and network...

Operating system - Windows


Have you ever used photoshop? When you use the selection tool to select a region in the picture, a flowing line would appear around the selection area. Do you want to realize this function in your programs?

This is an example written by Delphi, you could convert it to other language as your need.

Put a timer component to the from, then assign the following codes.

  LineStep: Byte;


{$R *.DFM}

procedure DrawFlowLine(X, Y: Integer; Canvas: TCanvas)...

Programming - Delphi


A basic formula of color graphics to grayscale algorithm.

For color to grayscale, there is a very well-known formula:
Gray = R * 0.299 + G * 0.587 + B * 0.114 

An integer algorithms

For the daily apply, we want to avoid a complex and lower floating-point computing, it is necessary to get an integer

Note the accuracy of coefficient is three digit. We now scale them 1,000 times bigger to achieve an integer arithmetic

Gray = (R * 299 + G * 587 + B *...

Programming - Delphi


In C++Builder, there is a useful component TCppWebBrowser, which could allow us to access internet web pages easily. While to manipulate the table elements is not so easy. The following are some codes doing this.

TCppWebBrowser* pWebBrowser;
IHTMLDocument2* pHtmlDoc2;

//Query IHTMLDocument2 interface
HRESULT hr = pWebBrowser->QueryInterface(IID_IHTMLDocument2, (void**)&pHtmlDoc2);
if(hr != S_OK)
    return FALSE;

//Getting table...

Programming - C++Builder


When read the the Image field data from a table, program raise an exception as following:
"project abc.exe raised exception class EJPEG with message 'JPEG error # 52'".

This is caused by a bad jpeg format. A jpeg format use 2 position to verify the format.
The first two bytes and the last two bytes are 0xD8FF and 0xD9FF. In Delphi or cpp-builder, an TJPEG class use these 2 word to check if a jpeg file is correct. If it not meet, an error of "JPEG error #52" would raise.

To avoid...

Programming - C++Builder


Well, let us just to see the example. This example use a TButton and a TWebBrowser component in a form. Double click the button, add the following codes.

procedure TForm1.Button1Click(Sender: TObject);
strHtml String;
  if Webbrowser1.OleObject.Document.Selection.type = 'Control' then
    strHtml = Webbrowser1.OleObject.Document.Selection.CreateRange.CommonParentElement.innerHtml;      ShowMessage('The selected object's inner html...

Programming - Delphi


This is an example on how to use scanline to quick access and manipulate the pixels of a bitmap in C++Builder.

Ok, create a project, drag an image and a button onto the from. Then in the form's crate handler, adding a line of code to load an exists picture.

void __fastcall TForm1::FormCreate(TObject *Sender)

//Then in button1 click handler, assign following codes to use scanline to...

Programming - C++Builder

More Articles...