|
there is no explicit\implicit way on converting char[] to string, and overriding will cause a-lot of problems. just use this function (you can change and it's better to change the static in it):
static private string CtoS(char[] charArr)
{
string tmp = "";
for (int i = 0; i < charArr.Length; i++)
tmp = tmp + charArr[i];
return tmp;
}
NaNg
|
|
|
|
|
Thanks....
But i dot want to concatenate bcoz the string has to be over written for every line read from the file.
|
|
|
|
|
string str = new string(strdata);
|
|
|
|
|
I have a textarea for which when the text exceeds the length of the textarea the text should come down to the next line without any horizontal scroll bars appearing. This is the default behaviour in IE but in Firefox whenever the text exceeds the length of the textarea, horizontal scrollbars appear (which i do not appear).Please advise.
-- modified at 8:04 Friday 12th May, 2006
|
|
|
|
|
hi all,
i added the following code into mouseclick event :
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
if ((e.Button == MouseButtons.Left) || (e.Button == MouseButtons.Right))
notifyIcon1.ContextMenuStrip.Show();
}
>for right click there is no problem. everything works fine, i only see the contextmenustrip.
> but as for left click; apart from the contextmenustrip, the application's icon shown on 'Taskbar' and this is not something good
what should i do in order not to let the icon shown on TASKBAR for single left click on notifyicon ?
thanks in advance,
bye.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: the application's icon shown on 'Taskbar' and this is not something good
what?
either you did too many events (mouseclick and another thing)
or either that we didn't get what you wrote...
did you ment "the application's icon IS shown on 'Taskbar'"?
give a link to a pic example
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:04am.
|
|
|
|
|
as i seen... you use the show commmand (I think I told you how to do this, it looks like my code)
but you don't supply a point for it, so it just opens where it thinks to open... in the show method just write the mouse point:
this.notifyIcon1.ContextMenuStrip.Show(MousePosition);
this will be alot easyer than using notify icon contextmenustrip show cmd without pointing on the point...
|
|
|
|
|
I think he is not asking the ContextMenuStrip position, he is asking about when u right click, it creat another icon on the taskbar along with form icon..
is it correct?
|
|
|
|
|
oh... that I didn't get... emmm...
maybe you registered another method to that event to show the dialog? search any commands like that... search also "showontaskbar"...
|
|
|
|
|
Is it possible to for e.g. send a MFC CString as a System::Object^ parameter.
I’m between an unmanaged and an managed environment.
_____________________________
...and justice for all
APe
|
|
|
|
|
hi all,
i want to implement form_resize and/or form_closing event. i added these two lines in form1.designer.cs:
this.Form1_FormClosing += new System.Windows.Forms.FormClosingEventArgs(this.notifyIcon1_MouseDoubleClick);
this.Form1_Resize += new System.EventArgs(this.Form1_Resize);
and add some appropriate code in Form1.cs but when building the solution i get the following errors:
>Error 1 No overload for method 'FormClosingEventArgs' takes '1' arguments
>Error 2 No overload for method 'EventArgs' takes '1' arguments
how can i fix these problems ?
ps: codes in Form1.cs are :
private void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
this.Hide();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.WindowState = FormWindowState.Minimized;
}
}
|
|
|
|
|
No it should be like this
this.Resize += new System.EventHandler(this.Form1_Resize);<br />
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
Why did u add these codes manually, instead go to the Form1's properties window and click the events button, then double click the event u want to write.
Hope this is wat u want.
Thanks,
Srini
|
|
|
|
|
This is really annoying me, I'm sure there is a simple method but I just cant find it anywhere.
I have an 'options' form that I show when the user wants to change options, but how do I read variables from the mainform in the options form, and then change them when the user clicks ok on the options form? I have tried making the variables public with no success.
Hope someone can quickly put me out of my misery
|
|
|
|
|
Read This[^]
and try working something like this...
when you'll make the variables public and send the last form as the last form (not as type Form), then you can access them through
VarForm.Var;...
good luck
-- modified at 7:42 Friday 12th May, 2006
|
|
|
|
|
I updated the link... it wasn't the right link....
again[^]
|
|
|
|
|
No no and no!
Research Object Oriented Design and sepcifically the Model View Controller pattern, start here[^]
In MVC pattern Views do not know about each other! Forms are Views. Coupling forms is a violation of fundamental design principles.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
|
Hi,
can I qurey active directory for how many time a file was accessed?
Thanks
Heemanshu
|
|
|
|
|
Part of my univarsity degree we are doing Java, but at work I do C#. We learnt how to use class relationships using the Bradshaw Marina case study. Like for example the the Dock class can have many Slip classes, etc. You specify the relationships in the code. Is this also highly recommended in .NET C#?
Please can someone shed some more light on this topic, and where I can read some more.
Regards,
ma se
|
|
|
|
|
I'm sorry I have to write it one more time (this is something like the 4th time), but no-one has answered and I have to get them figured out! and I will keep posting it every time it crosses the next page untill I will have answers, and as you see.... this is REALY ORGENT!
please help me...
1. I'm trying to build my own ICryptoTransform-able (System.Security.Cryptography.ICryptoTransfom) class, so I could use it in CryptoStream. (I searched in codeproject articles and didn't fine something helpful, I promiss that if some-one will help me I will write an article on how to do it!)
I already built the algoritm, and I inherited from ICryptoTransform as they wanted to, and I'm using MSDN to know what methods and properties I need to do, but there are two properties, and two methods that I don't know what to do with them, and what I should return from them... the properties are InputBlockSize AND OuputBlockSize, and the methods are TransformBlock and TransformFinalBlock, I don't know what they need to get (what does every parameter stand for), and what to return, the MSDN doesn't help me very much in here.
If anyone can tell me what to do in them, and even give me an exemple I would appriciate it...
2. And one more thing, where can I save information on my application (i.e is registered, setupdate etc...), and how that it won't be able to be changed without my pass or something like that...?
Thanks alot in advance
|
|
|
|
|
My question is, is there any way to compile using only .Net Framework? The
situation is: I don't have VS.NET installed, no devenv.exe there to compile.
I just want to use command line compilation using csc.exe or some tools.
I am getting error while executing the compiled application from DOS-Prompt
I have used System.Globalization for Cultureinfo to display the date and time to German format. The Exception while running shows "Could not found resources appropriate for the specified Culture".
can any one know why this problem occurs.
|
|
|
|
|
Is there a way that i can get the "body" from a ".eml" file
and add/copy it to my mail.MailMessage's body as is?
ie taking its "body"(eml) and inserting it into the MailMessage's
body - including pictures,text,links etc.?
Or at least a way to add/embed images to the body as you would with, say
Outlook Express - Not as attachments but as part of the body.
Any help will be appreciated...
Thanks in advance.
-- modified at 10:33 Friday 12th May, 2006
|
|
|
|
|
Good day,
I cannot connect to my webservice when i'm using the ip address of my server as the Url property of my webservice, eg. http://10.1.1.1/myWebservice/service.asmx. But I could connect using the name of the server, eg. http://serverName/myWebservice/service.asmx.
How come? Any suggestions? Thanks for your time.
Arthur
|
|
|
|
|
this is clrealy not the ip of your server... search it again, try it without the C# first - go to the internet explorer and see if it opens.
|
|
|
|