|
well I'm using .Net 2.0 and I've already tried using NotifyIcon but it's not working. Probably I'm missing a trick here.
I've just made a new form for testing its functionality and I've coded like this
form1_Load()<br />
{<br />
NotifyIcon n = new NotifyIcon();<br />
n.BaloonTipText="This is the text";<br />
n.BaloonTipTitle="This is the title";<br />
n.ShowBaloonTip(5000);<br />
}
so now pz tell me what to do.
what I wanna do is to use this baloon tip to show an alert in my application and when the user clicks the baloon, it should open a new form.
Rocky
|
|
|
|
|
The notify icon is not shown by default, so you have to explicitely set its Visible property to true. Furthermore, you have to specify the icon that should be shown in the tray (assign it to the Icon property). I guess the component will throw an exception or simply does not show if you try to show it without having assigned an icon first. Finally, register to the BalloonTipClicked to open the new form.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
yes it worked when I assigned an icon to it but the strange thing is that the balloonTipClicked Event isnt working. its not responding at all. while the click and mouse click events are responding. is it bcz I'm using windows 2000 Server?? well it should be but... I can't see any other reason for it.
Rocky
|
|
|
|
|
Rocky71 wrote: is it bcz I'm using windows 2000 Server??
Maybe. Never used the balloon tip of the NotifyIcon myself, so I can't tell for sure. Try to run your code on some other machine and see if it works there.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
yes thats a good idea. I just wantd to ask one more thing... can u give me a URL where I can find some useful icons? Coz I've seen ppl using v good looking icons but I still havent been able to find any of them on the internet.
Rocky
|
|
|
|
|
Try searching the articles, there's a pretty good one for "Dan" I believe
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I am working on a web application project. I am using c# as my programming language and an oracle 10g database.
I am in a situation where I need to read a large text file and Insert it in to an Oracle database.
I have used steamreader and the Oracle's odp.net and was able to successfully insert the text into a table.
Can one of you seasoned developres show me how to do the samething using Microsoft data provider(System.Data.Oracleclient name space)and streamreader. I appreciate your help.
|
|
|
|
|
In .net 2005 I have created Application
I want to create a log file, which maintains all the internal process so at the run time I want to create a file at the source
Code:
Private string LogFileName = "ADM_Log.txt";
LogFileName = Application.ExecutablePath + "\\" + LogFileName;
This return path like this
"F:\\Joe Don't Delete\\DotNet_Samples\\ADM\\ADM\\ADM\\bin\\Debug\\ADM.EXE\\ADM_Log.txt"
1. Why the path is return with \\?
2. If I use this path in
Code:
File.Create(LogFileName);
The error message is shown like this:"Could not find a part of the path 'F:\\Joe Don't Delete\\DotNet_Samples\\ADM\\ADM\\ADM\\bin\\Debug\\ADM.EXE\\ADM_Log.txt'."
If i give manually path with single \
It creates the File.
Then
I use this function to write information in the file
At first the file is created in single \ then it goes to this function
At first line of this function it throws message "the file is exclusively opened by another user"
Private void WriteLog(string sMessage)
{
StreamWriter sw1 = File.AppendText(LogFileName);
sMessage = ("::" + sMessage);
sw1.WriteLine(sMessage);
sw1.Close();
}
Please help me these all my problems
Thank u
|
|
|
|
|
joerozarioia wrote: LogFileName = Application.ExecutablePath + "\\" + LogFileName;
Use Path.Combine to do this.
joerozarioia wrote: 1. Why the path is return with \\?
Are you looking in the debugger ? The debugger will render it like this
joerozarioia wrote: StreamWriter sw1 = File.AppendText(LogFileName);
This function tries to open the file. You have not closed the file when you created it, so you still have another lock on it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yes i am looking in debuger
plese tellme how to close the file and then i could open throw streamWriter
|
|
|
|
|
hiya
i'm back
i'm using the following code to load the webpage
private void setHtmlPage()
{
object p1="";
object p2="";
object p3="";
object p4="";
string URL1 = Application.StartupPath + "\\introduction.html";
axWebBrowser1.Navigate(URL1,ref p1,ref p2,ref p3,ref p4);
}
however the page that is displayed is of the page cannot be diplayed.... it doesn't show the contents of my web page.
what is it that i'm missing ????
|
|
|
|
|
Why do you need to provide four objects ? I never do. I think I set the Url directly tho.
Get the path in question ( the value of URL1 ) and try it in IE, to make sure it is valid.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks dude, i just found the mistake.
untill the next problem
regards
|
|
|
|
|
Hi,
Here is the architecture.
There is a business layer set up as a peoject with a class i.e. class1
Class1 has two functions. One to populate a hashtable with 10 data and the other to count the data in the hashtable.
There is a windows service i.e. WindowsService1 that calls the populate function in the business layer.
The count on the hashtable is 10
There is another windows service i.e. windowsService2 which call the same businesslayer to count the hashtable. The couont on the hashtable is 0
Do you know why this is the case and is there a solution to this please?
Thanks
|
|
|
|
|
arkiboys wrote: Do you know why this is the case
Yes[^]
arkiboys wrote: is there a solution to this please?
Yes[^]
led mike
|
|
|
|
|
Hi,
Don't quite understand the article.
Can you explain it simply please?
|
|
|
|
|
He's saying that each webservice will have an instance of hte class in their own process space. If you start Solitaire twice on your PC, the cards in one game won't change what the cards are in another. That's what you're trying to do, to make two programs share data.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes, I have now come to that conclusion. And that is exactly what I am trying to do. i.e. applications to shhare the hashtables from a common dll.
1)
What is the alternative and how can I do this please?
2)
Would you say it is better if I save the data into files on the disk and share it that way?
4)
Someone said it is possible to share the hashtable data via a webservice. What do you think?
Thanks
|
|
|
|
|
Hi,
I thought there was a property where i could say if a form maximizes at load time, but i cant find any.
Can anyone help me out on how to do this?
Thx,
Nuno
|
|
|
|
|
WindowState, I believe, is the property you want.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
open the properties of the page u want to maximize and set the property of "Window State" that is the very last property in the layout poperties if u are working with .Net 2000.
set the property to maximized
hope this helps.
|
|
|
|
|
Once again, thank you very much guys!
|
|
|
|
|
Hi,
I want to allow the user to right click on one or more files in the Explorer and then select a custom context menu entry like "Process with myProgram" (beside "Open", "SendTo" etc.).
I found out that it is quite easy to add such an entry for a Folder. To do this you just have to set up a new SZ entry in the System-Registry under "HKEY_CLASSES_ROOT -> Folder -> shell -> Process with myProgram -> Command" which contains the path to the program as value.
But that does not work with special file types. Does anybody have an idea how to do that?
Thanks in advance!
Alexander
P.S.: Working with Framework 1.1
|
|
|
|
|
This article Customize explorer's devious context menu[^] probably helps you.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank you for this interesting article. I tried the test program and unfortunately it did not work (seems not to make an entry into the System-Registry).
But I´ll have a closer look into the code tomorrow.
|
|
|
|