[QUOTE=adatapost;966908][URL="http://www.codeproject.com/KB/cs/SystemConfiguration.aspx"]Read/Write App.Config File.[/URL][/QUOTE]
Thanks for reply.
In application configuration file, I can use method Configuration.AppSettings to read value which setting in section of AppSetting ; I can use method Configuration.ConnectionStrings to read value which setting in section of ConnectionString . However , there is no any method provided to read value in section of system.runtime.remoting......
if I intent read value from the section, how can I do?

csy Light Poster

I need to build a small application to read/set the figure in app.config file, which in remoting section channel port value,
how to do it programmatically?

as following example, how can I read/set the 209 value in coding?

pls help!Thanks!
csy Light Poster

I got a set .net c++ 2003 source code, I need to call some of the functions from it in c# 2005, how can I do? I heard that .net c++ 2003 is managed code it can directly communicated with c#, but I dont know how to do, is need to build the c++ code to dll and directly add reference by c# project?
Please help. Thanks!

try to change
dgHistoric.DataSource = dsComp;
dgHistoric.DataSource = dsComp.Tables[0];

if there is only a table in the dataset.

hope it help.

Thanks adatapost,Serkan Sendur for the replies.

1.) data read in dirty is acceptable for me, i just afraid exception thrown when read dataset once it is updating the dataset, will it? or this is thread safe for read and write, and only write by multiple just will cause the exception?

2.That mean even this is only single-writer, I still need to synchronize (e.g apply lock ) both of read and write?

can you embody it?

Thank for help!

csy Light Poster

I used a dataset in multiple-reader and single-writer design in my application , but the 'read' and 'write' is possible happend at a same time .
will it thread safed ? or I need to apply any locking mechanism?
but i don't wish to lock the 'read' to be single thread being.


csy Light Poster

How would I change the TabPage's Color to for example Red.
I don't want to change the entire TabPage's Color to red, but specifically the background of the Tab with the Name of this tabpage.

Thank you.

you can try
1.) datagrid.Refresh()


2.) reset datasource bindingsource

csy Light Poster

I tried to create an Instance as :
Form tempForm = (Form)Activator.CreateInstance(t);

t is a type from reflection.

However, there is a paramater required for the construct of form t , how to pass the parameter when create the instance?


csy Light Poster

I am using C# 2005. How to show a child form fix into a main form which panel alocated when I click a button in main form. Thanks!

Yeah! Hide succesfull ~~ ^o^
Thanks & Thanks~~
if you are around I must treat you a lunch...haha
really help me a lot ~ :D

THANK you~~ ^O^

[QUOTE=Duoas;461612]BTW, were you able to get that last bit of code I gave you to work (to display the main form's button instead of the application's button on the taskbar)?[/QUOTE]

This one not yet :(
What the request is totally hide the application (only trayicon but application or mian form whichsoever must nothing in task bar after call the hide function). However I tried and tried , after hide, application ( or main form?) still show in taskbar. :(

[QUOTE=Duoas;461603]OK, I found the component on the web.

All you need is the [B]TIcon[/B] you wish to display. You can load it by sticking a [B]TImage[/B] component on your form, setting its [B]visible[/B] property to [B]false[/B], and accessing the TImage's [B]picture.icon[/B] property.

Then just set the icon property of the tTrayNotifyIcon component:
TrayNotifyIcon1.icon := Image1.picture.icon;
The icon on the taskbar should update automatically. Keep in mind that if you may have to save the old icon if you want to restore it later.

Hope this helps.[/QUOTE]

Dear Friend,
Thanks so much! Your solution really help me a lot!!:icon_lol:

  1. I have add a trayicon component into form , TrayNotifyIcon1: TTrayNotifyIcon

  2. there is a property 'Icon', click into the 'Icon' property, I able to load icon image for it.


Thanks for reply!
It is write the code as following?


csy Light Poster

I am using Delphi 5.
I've add a trayicon in application and need to make the trayicon bright or change colour in different status. Anyone can help?

Thanks and Thanks.:$

Don't part with your illusions . When they are gone you may still exist , but you have ceased to live. (Mark Twain , American writer)

csy Light Poster

Il pleure dans mon coeur

Comme il pleut sur la ville

Quelle est cette langueur

Qui pénètre mon coeur

O bruit doux de la pluie

Par terre et sur les toits

Pour un coeur qui s'ennuie

le chant de la pluie

Il pleure sans raison

Dans ce coeur qui s'écoeure

Quoi? Nulle trahison

Ce deuil est sans raison

C'est bien la pire peine

De ne savoir pourquoi

Sans amour et sans haine

Mon coeur a tant de peine

~ Paul Verlaine

<<不能说的秘密>>(Secret). :)

Happy Birthday!! ^o^

Thanks your encourage.:)

Here is my simple testing :

File: [B]ChildForm.pas[/B]
unit ChildForm;


Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

TForm2 = class(TForm)
{ Private declarations }
{ Public declarations }

Form2: TForm2;


{$R *.DFM}


File: [B]MainForm.pas[/B]
unit MainForm;


Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
TrayIcon, StdCtrls, ExtCtrls;

TForm1 = class(TForm)
TrayNotifyIcon1: TTrayNotifyIcon;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TrayNotifyIcon1DblClick(Sender: TObject);
procedure TrayNotifyIcon1Click(Sender: TObject);
{ Private declarations }
procedure createchildform;
{ Public declarations }

Form1: TForm1;

uses ChildForm;
{$R *.DFM}

procedure TForm1.createchildform ;
var tempChildForm : TForm2;
tempChildForm := TForm2.Create(Self);
tempChildForm.FormStyle := fsMDIChild ;


end ;

procedure TForm1.Timer1Timer(Sender: TObject);
Timer1.Enabled := False;
createchildform ;
End ;

procedure TForm1.FormCreate(Sender: TObject);

TrayNotifyIcon1.IconVisible := True;


procedure TForm1.TrayNotifyIcon1DblClick(Sender: TObject);
show ;

procedure TForm1.TrayNotifyIcon1Click(Sender: TObject);


I'd set Application.ShowMainForm := False before application run.

Thanks friend.
As the example, I need to custom the trayicon component, right?

I'll try it!:idea:

What my application request is :
At the starting only tray icon , after click the tray icon, the form display, after press the [x] to close the form, the form hidden but tryicon still fuction, only right click the trayicon and select the "terminate" the application will be terminate completly.

But I tried quite a long time still can't make the application hide completely (still display in task bar) as MDI child form. :'(

Thank you so much! thanks for your willing help!! :D

Dear friend, thanks for reply! I've try your advice, but the result same.
After closed the main form, taskbar should be nothing only trayicon there. However the main form still in taskbar as which contain a MDI child form (I've tried to take out the child form then result OK :the taskbar show nothing ).

Any advice? :( :(

My FormClose coding about :

procedure TFrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
Action := caNone;

csy Light Poster

[B]I try to use trayicon in delphi 5, but I can't hide the main form completely as which contain a MDI child form. Any solution for it? [/B] :(