|
Try this (C++):
http://www.ragestorm.net/snippet?id=65
|
|
|
|
|
Can anyone help?
I have a service that’s set to interact with the current users desktop, the problem I have is I need to bring a window to front of any other window. While this works some times, in applications like Word the form does not display and is only shown in the Taskbar.
The window which is displayed by the service has the following set.
.topmost = true
.SetTopLevel = true
.Toplevel = true
And displayed using
MSCPrompt fForm = new MSCPrompt(cMessage);
fForm.ShowDialog();
Does anyone have any ideas why having set these options it still does not display on top of all other windows.
Paul
|
|
|
|
|
I tried it like this:
_instance.Show();
_instance.TopMost = true;
works!
Make shure that no other Form is set to TopMost.
All the best,
Martin
|
|
|
|
|
try .BringToFront()
Hope that works for you,
Regards,
Pramod
|
|
|
|
|
Yep, Tried this and does not work. I just can;t seem to fix this with the inbuild options of a form. may be i need to look at the Win32 API.
Cheers
|
|
|
|
|
hi,
I think i'm looking for a solution like the one you have done
May i've a look to your code?
NOthing by now;)
|
|
|
|
|
Hi All,
Am displaying icon in one of the column of the datagrid. The icon has got transperent background but while displaying on the grid it always takes white backgroud.
Can anyone help me out as how to retain the transperent background of the icon?
My Implementation Approach.
I have created a customised DataGridTextBoxColumn in which am overriding the paint method. The similar approach you will find on the net.
Any help is apprecicated.
Regards,
Kais
|
|
|
|
|
My English is very bad! I'm sorry! I am Vietname!
I want to Connect between Server and Client use Class Socket but i don't make it! Who're known? talk for me! Thankz
None Signature!
|
|
|
|
|
Use TcpClient. It is easier then Socket.
using System;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace ConsoleApplication25
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Thread serverThread = new Thread(new ThreadStart(Server));
serverThread.Start();
Thread.Sleep(1000);
Thread clientThread = new Thread(new ThreadStart(Client));
clientThread.Start();
}
static void Server()
{
byte[] buffer = new byte[1000];
TcpListener tcpListener = new TcpListener(30000);
tcpListener.Start();
TcpClient tcpClient = tcpListener.AcceptTcpClient();
NetworkStream networkStream = tcpClient.GetStream();
networkStream.Read(buffer, 0, buffer.Length);
string stringReceived = Encoding.ASCII.GetString(buffer).Replace("\0", "");
Console.WriteLine("Server received : " + stringReceived);
}
static void Client()
{
string stringToSend = "Hello World";
byte[] buffer = Encoding.ASCII.GetBytes(stringToSend);
TcpClient tcpClient = new TcpClient();
tcpClient.Connect("localhost", 30000);
NetworkStream networkStream = tcpClient.GetStream();
Console.WriteLine("Client send : " + stringToSend);
networkStream.Write(buffer, 0, buffer.Length);
}
}
}
|
|
|
|
|
Hi all.
I have the following.
MainForm; Form1; Form2;
What I want to do is to take my MainForm, set it as MDIContainer. Then I want to spilt the screen in two using panels, left hand Form1 and on the right hand Form2.
I have no idea how to work with panels.
Any help will be apreciated
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
In this case it would be better, to take UserControls instead of Form1 and Form2.
1)MainForm creates the instances of panel1, panel2, UserControl1 and UserControl2.
2)Than place the panels at your Mainform.
Mainform.Controls.Add(panel1);
.....
3)place the Usercontrols in the panel you whant.
Mainform.panel1.Controls.Add(UserControl1);
4)In your case it could be possible to Use the 'Dock' Property of panel (Mainform.panel1.Dock = DockStyle.left;)
5)And 'Dock' for the UserControls as well (Mainform.UserControl1.Dock = DockStyle.Fill;)
Hope that helps you!
All the best,
Martin
|
|
|
|
|
Thanks.
I have no idea how controls work, will look into it.
still learning the language.
He who laughs last is a bit on the slow side
|
|
|
|
|
I'm putting on-line help into an application. What is the best way to compile a help file. I looked at Microsoft html help compiler, but it doesn't let me add word documents so I would need format everything into html. Ideally I just want to add my word documents. Thanks.
|
|
|
|
|
Couldn't you just save the Word document in html format and use that?
Glen Harvy
|
|
|
|
|
I think that will do the job, although I'm not sure if that will enable you to build an index and get hyperlinks in the help file...
WM.
What about weapons of mass-construction?
|
|
|
|
|
I want to develop a distributed architecture in .NET. The working of this architecture will be as follows:
Users will log in to the site, and voluntarily allow their Processor Cycles to be used, when ever it is free. For this the Users will have to download a component from the site, and this component will get installed in their PC.
This component will communicate with the Central component, which will distribute the tasks to the Users. This component will perform the assigned tasks, whenever, the User's processor cycles are free.
I have read about these architectures being implemented with VC++.
So I would like to know your comments regarding this, and how this architecture can be implemented in .NET(C#).
|
|
|
|
|
What you need is some kind of webservice that organizes the functionality of the server. The client computer can than invoke a method on the webservice to get a new job. To increase availability you will have to save the job on the client, so that it is still available after the client is shutdown. This also enables the client to send the results of the job back to the server at a later time, in case the server is down when the job is first done...
I have no idea how you can build an app that only uses idle cpu cycles, but this could be a general idea for the communication part of the solution.
The only difference with the VC++ solution is that these solutions make use of their own communication protocol, while the .NET solution typically uses a webservice.
WM.
What about weapons of mass-construction?
|
|
|
|
|
hai all,
is it possible to change the language of messagebox button..
for eg:
MessageBox.Show("hai", "MSG", MessageBoxButtons.YesNo);
can we change the language(german,french..) of "YesNo" . i.e while installing if we select the lanaguage as german is it possible to display the yes /no button of the messagebox in german..
Rohit
|
|
|
|
|
Hi,
The text on the messagebox i guess depends on the Operating system,
I had created an application, but when that app was executed on a Japanese XP OS the messageboxes displayed Yes/No in Japanese language by default.
Regards,
Pramod
|
|
|
|
|
Have a look at the System.Globalization namespace.
HTH
Jonny
|
|
|
|
|
Hi, I have a third party control DatePicker, it seems to work well in Internet Explorer but when I use Firefox it doesn't display anymore.
Is there a workaround here?
Thank you.
Gerri
|
|
|
|
|
Compare the Html source of your page generated in IE and Mozilla.
|
|
|
|
|
They're the same. But it just doesn't display in FIrefox
|
|
|
|
|
Hi Guys,
I need to write a C# program which should
1. Connect to SQL Server Database
2. Run a query
3. Publish the query results in a nice html page
4. Send the HTML page as attachment by email.
I'm VB programmer totally new to C#. I would appreicate any sort of help to achive the above task.
Thanks.
FIFA - Go Argentina
|
|
|
|
|
What parts of doing this are you having trouble with?
|
|
|
|