|
Hi Skynyrd,
Thanks for you time on this. I tried creating a delegate and using the Invoke method and the same thing happends.
The way the code works is as follows:
Main App---> thread -->taskbarNotification.show()
Main app creates a thread that loops checking the server for new messages. When there is a new message the thread calls the taskbarNotification1.Invoke...
This is when the line appears at the bottom of my screen. The line looks like a border and is the same width as the bitmap background specified for the popup window. Like I said previously if I call MessageBox.Show("anything") after I call the taskbarNotification1.Invoke the program works perfectly with an annoying messagebox every time.
Thanks again for your time!!!
Mark
|
|
|
|
|
Well, after a lot of testing trying to duplicate your error… I think I found your problem. Any normal class belongs to the thread that new(ed) it. However, form and control classes are a different story because they are not actually initialized until they are used, thus the show function takes part… I repeated your error by initializing (Constructor) the taskbarNotifier in one thread and then invoking the show function. When I used the constructor on the interface thread and invoked the Show function from another thread, the problem disappeared. So move taskbarNotifier1 = new taskbarNotifier();
|
|
|
|
|
Hi ACorbs,
That was it.. I had the taskbarNotifier1 instance of the TaskbarNotifier() constructor created in the Thread1() of my new thread. I moved the taskbarNotifier1 and as you said the problem went away. Awesome!!!! Thanks!!!!
Time to move on.....
Thanks alot ACorbs,Skynard and Mav for your kind help!!!!
Mark
|
|
|
|
|
Hi all,
We are developing a web farm project using .Net, we need to make our sessions available across multiple servers. We planed to keep the sessions in outproc mode and kept the sessions in SQL server. We tried to put some session data into SQL server through one web server and tried to retrieve the same data from another web server, but we didn't get required result. Instead different session id's were generated by servers for the same session variable. Session id's are not mapped.
We have also configured the application path and machine key to be same on both servers still no result. How to make sessions available across servers irrespective of NLB support? Even if we go for NLB is there any possible way without any sticky mechanism?
|
|
|
|
|
Your question has nothing to do with C#. You might be better served if you posted your question in the ASP.NET Forum[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all, i'm trying to copy a file to a location but i'm getting the above error. Basically i'm copying an exe but it's being used at the time, how do i stop the exe from running so i can overwrite it with the new one?
Cheers
Kev
|
|
|
|
|
Kev:
If the .exe is running then you are definetly not going to be able to copy it.
One thing you might do is use some code like this:
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcesses();
foreach(Process p in processes)
{
if(p.ProcessName == "ProcessName")
{
p.Kill();
}
}
That would kill the process (you should also consider p.close(); and then killing if that fails).
I hope this helps,
Jim
|
|
|
|
|
A modal form is called. It's parent form has a textbox.
I want access it from the modal one, but it's impossible.
My first try was to make a new constructor, which sends the parent form object.
FrmMain (Parent)
FrmConfiguration (Child)
Child's constructor
Public FrmConfiguration(FrmMain frmMain)
When I am trying to access frmMain, the Intellisense tool doesn't show me the textbox object.
Second try with "parent" doesn't work too.
Is there a way to access the parent form and all its objects ?
|
|
|
|
|
Seraphin wrote:
When I am trying to access frmMain, the Intellisense tool doesn't show me the textbox object.
Sounds like your textbox is declared private in the FrmMain class (default accessor when created with Form Designer). Changing its access modifier to internal or public should solve the problem.
www.troschuetz.de
|
|
|
|
|
Hello gurus,
I would like to know how I can use in C# a DLL that contains C code?
The set of functions is this one:
UINT PASCAL foo1( int argc, char **argv )
UINT PASCAL foo2( int argc, char **argv )
UINT PASCAL foo4( int argc, char **argv )
UINT PASCAL foo5( int argc, char **argv )
Can anyone tell me how I can call these functions in C# while these functions are in a DLL written in C?
Best regards to all.
There is no spoon.
|
|
|
|
|
Hi there. Im doing a project on this and was wondering if ne1 out there can point me in the right direction? an excellent site? code examples are always good too! =)
thanks!
|
|
|
|
|
I think you should determine which protocols, codecs you'll use. H323? SIP? Is it a mobile network? LAN? WAN?..
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Dont know much about this.. but done message sending over Lan TCP/ip..
I want to do this over LAN.
wat would be the difference between:
1) this and WAN?
2) this and VoIP??
Can this be extended to be used over internet(the LAN one)
How do i choose a protocol?
Thanks so much!
|
|
|
|
|
If this is an office/work project, you'll probably only use LAN and you will have a faster connection between peers like 100Mbps so sending packets to each other can be handled easier respectively. No voice-data compressing might be needed, but you'll see it when you test it.
If this system will have a few clients (and/or voice conferance), you'll definetely need to write a server application too.
And if this project will run on WAN, you'll need codecs to compress the data to improve upstream/downstream quality.
Choosing the protocol depends on your needs and abilities. For example, if you'll consider a system that talks to any cell or land phone from a desktop application, H323 can be a choice. (www.h323.org[^]) This is an open source project designed for C++ mostly but I don't know if they implemented the .NET version. You can have the server app in C++ and clients in C# (or else) with an ActiveX H323 control for the server comm.
VOIP (Voice Over Internet Protocol) enables telephone calls via a broadband internet connection. High-speed connection is a must for clear conversations. You'll need a provider like AT&T to distribute your calls internationally, if this is a professional VOIP project. (VOIP may have many different network-phonesys setups)
But through a LAN, you don't need VOIP and your local connection is all you need if it's not a telephone you're calling.
You can use sockets for voice communication between PC clients.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Im designing this for an office setup (LAN) so the connection will be fast (100Mbps). But would be nice if it worked on WAN too! Want it to be like IRC Chat, but with voice conferencing and possibly video too! Where can i find How to do this?
If many people use the voice at once.. then maybe compression is a good idea?
Yes i want a Server and client architecture.
I like C# or java.
Thanks again!
|
|
|
|
|
Hi,
Would any gentleman be kind enough to answer my query;
"How can I give XP look to my C# application".
Actually I was developing a payroll application and out of sudden, client asked for additional requirement ; that is, he wants my application to have XP look even when he would run it on Windows 2000, Windows 98.
Can anyone help....????
|
|
|
|
|
hi ...
this can only be acheived on non-XP systems if all controls on ur application are built by hand (don't use .Net controls).
u can find bunch of them here.
Mr.Cooper
|
|
|
|
|
For XP os:
-------------------
you should use a ".manifest" file.
1. Open notepad and paste the following code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="0.9.0.0"
processorArchitecture="X86"
name="BarryJ"
type="win32"
/>
<description></description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
2. Save the file as the core executable name with ".manifest" extension at the end. Example: MyApp.exe.manifest
3. Move the file to the directory where your application runs.
4. Set "FlatStyle" properties of each control to "System" (if has this property)
For other os:
-------------------
The only way is to create xp-similar controls by code but I would have told your client it's doable but won't worth the trouble.
<b>Radgar</b>
<i><font size=1>"Imagination is more important than knowledge." - Albert Einstein</font></i>
|
|
|
|
|
I need to start the drag operation when i just drag my picturebox...
I would to show at the place of the simple drag cursor, the normal cursor but a semi-trasparent picturebox that follow my cursor sicne the end of the operation.
How can i do?
|
|
|
|
|
I need to add a new option to Windows textbox context menu, how could i do?
|
|
|
|
|
You can do it for your app but I don't think it's possible for Windows context menu.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Hello,
Can anyone help me. I have 3 text boxes in my form. I wish to create .txt document which contain values(each one in new row) collected from these 3 text boxes.
I am beginner, so please help me
|
|
|
|
|
using (StreamWriter sw = new StreamWriter("File.txt"))
{
sw.WriteLine(textBox1.Text);
sw.WriteLine(textBox2.Text);
sw.WriteLine(textBox3.Text);
}
www.troschuetz.de
|
|
|
|
|
thx, but i don't know where to put that code
|
|
|
|
|
It depends. When do you want to save the values of these textboxes?
www.troschuetz.de
|
|
|
|