|
ekynox wrote:
oMailItem.HTMLBody += sHtml;
Instead, try
oMailItem.HTMLBody = sHtml + oMailItem.HTMLBody;
Does that work?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hello Senthil
thank you thank you thank you so much. Yes it does work. I couldnt believe it was so simple ..
thanks
Vee
|
|
|
|
|
Hi All
Export to excel data from ultrawebgrid rows, Each data row contain one worksheet in excel sheet like as
row1 data contain sheet1
row2 data contain sheet2
row3 data contain sheet3
this opertaion getting at a time on pressing one button.
we have pressing one button ultrawebgrid rows data to export excel sheet, In excel sheet each worksheet contain one grid row deatails,
for example grid have 10 rows ,pressing any button,
In excel sheet 10 worksheets will occure and each worksheet contain 1 row data of grid pls send me a solution for this example
sunny
|
|
|
|
|
I have created nothing but a new C# Form1. I want to draw an X and Y axis that has an origin at the center of the form. I when the event 'fires' the code works as desired. However, when I resize the form the Y axis no longer is in the center of the Form1. Please help and thanks a lot...
//Problem is here ->
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen myPen = new Pen(Color.Black, 1);
Rectangle rect = new Rectangle();
g.DrawLine(myPen, rect.Size.Width/2, rect.Size.Height, rect.Width/2, rect.Size.Height);
}
//
|
|
|
|
|
Try this in your form's constructor:
<br />
SetStyle(ControlStyles.ResizeRedraw, true);<br />
Wout
www.woutware.com (DXF reading/creating/writing/viewing .NET component)
|
|
|
|
|
Try this :
this.ResizeRedraw = true;
override void Form1_Paint(object sender, Forms.PaintEventArgs e)
{
e.Graphics.DrawLine(Pens.Black,new rectangle());
}
void Form_Resize()
{
this.Invalidate();
}
|
|
|
|
|
i've changed in my application the standard cursor with my own.
the trouble came when i load it infact it is showed with 0,0 on the top left area of the arrow.
I want set that zone as the central of my own cursor, how can i do?
|
|
|
|
|
If you are referring to the HotSpot in the cursor, cursor editing programs let you specify where this is. VisualStudio.NET's editor I believe offers the feature as well (try right-clicking? - i'm not in front of my system at the moment).
|
|
|
|
|
What exactly are you doing? Calling Socket.Close() cancels all pending Asynchronous events on that socket. Which should include all BeginAccept's that you have called.
|
|
|
|
|
hey all
i have a c++ dll which was developed by someone else and in his documents it says
typedef int (_stdcall *pConnect) (void);
this function uses a trhead to send a connect message to the controller. a reply is sent via a WM_COPYPDATA message and then the thread is destroyed.
some more notes:
WM_COPYDATA, COPYDATASTRUCT record types
the message parameter of the WM_COPYDATA function is a standard windows message structure.
the LParam field of this structure should be cast as a pointer to a standard windows COPYDATASTRUCT.
The COPYDATASTRUCT fields are used as follows:
dwData (DWORD) used to represent the record type defined below
cbData (DWORD) used to represent record size
lpData (PVOID) used to point to the data
...
i can use PInvoke to use his functions but how do i set WM_COPYDATA, COPYDATASTRUCT in c# so i can get a reply from the controller?
any suggestions?
thanks
Kids don't try this at home!
|
|
|
|
|
Hi , C# fellows,
I have one dll and one windows form,
this dll send messages to windows form. the windows form has a message filter;
my problem is : when I use PostMessage() in dll, the message Filter can trap it; however, if I use sendMessage() , then doesnt work.
Can anyone explain Why???
|
|
|
|
|
Can you post the code for the message filter? PostMessage and SendMessage messages go to different queues, maybe the message filter is coded incorrectly?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
OK,here is the source code::
// in the main function , do the following
MyMessageFilter msgFilter = new MyMessageFilter();
System.Windows.Forms.Application.AddMessageFilter(msgFilter);
// filter implementation
public class MyMessageFilter : System.Windows.Forms.IMessageFilter
{
public bool PreFilterMessage(ref System.Windows.Forms.Message m)
{
//custom message is 0x0800,...
if (m.Msg == 0x8000)
{ System.Windows.Forms.MessageBox.Show("Data ming" + m.Msg);
}
return false;
}
}
// and in dll , two way of send message
...
case 0x8000: PostMessage(...);break;
case 0x0801: SendMessage(...);break;
the problem is only the message by PostMessage can be trapped in the filter.
is that strange????
|
|
|
|
|
Does the DLL function that executes PostMessage/SendMessage run on the UI thread that is running the message pump for the HWND to which you send/post messages?
For eg, if your DLL function gets executed when the user clicks a button (on the HWND that you are sending/posting messages), then SendMessage will directly call the WndProc and won't go through the message pump. Which also means that the message filter won't work.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
the Dll is in another thread,
its really confusing...
|
|
|
|
|
I know it is impossible to set for two forms at the same time the state of active, but it is possible set for both (or more) the title bar in "active state" (just the aspect).
I know it is possible overrinding some Windows message in WndProc.
Can you tell me how?
Please it is very important.
Thanks.
|
|
|
|
|
Active in what sense? If you mean you need the user to be able to switch between the two forms , it is possible with modeless forms. Just call Show instead of ShowDialog .
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
You are absoultley out way.
I mean photoshop's like GUI. its toolbar is a child form that remain like active at the same time of the main...
I need to override some winows message, but none know what?
|
|
|
|
|
Oh, you mean MDI style applications? That's fairly easy, you don't need to override WndProc for that. All you need to do is set the main form's IsMdiContainer property to true and set the MdiParent property of child windows (toolbox, in your example) as the main form itself.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
i don't want a mdi application just a free child form
|
|
|
|
|
He want's the title bars of both forms to show active at the same time. In WindowsXP default, both title bars would be blue instead of one being blue and the other form fading to light blue. He's asked this question a few times now.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have two interfaces on the server side.
they are implemented such as:
<code>
public class IndexServerObject : MarshalByRefObject, ISend
{.....}
public class PeerClientObject : MarshalByRefObject, IPeer
{....}
</code>
however when I try to call them from my client only the second executes...why???? the PeerClientObject works, but not the first one...do I need to have multiple channels?
my client app is doing this:
<code> RemotingConfiguration.Configure "PeerCLientForIndexServer.exe.config");
IndexServerApp.IndexServerObject indexServer = new IndexServerApp.IndexServerObject();
IndexServerApp.PeerClientObject peerClient = new IndexServerApp.PeerClientObject();
</code>
this is the config file for the server:
</code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="IndexServer">
<service>
<wellknown mode="Singleton"type="IndexServerApp.IndexServerObject, IndexServerObject" objectUri="IndexServer" />
</service>
<channels>
<channel port="9000" ref="tcp">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
<lifetime leaseTime="1M" renewOnCallTime="2M" />
</application>
</system.runtime.remoting>
</configuration>
</code>
and the client side:
<code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="PeerClientForIndexServer">
<channels>
<channel ref="tcp" port="0"/>
</channels>
<client>
<wellknown type="IndexServerApp.IndexServerObject, IndexServerObject" url="tcp://localhost:9000/IndexServer" />
</client>
</application>
<code></system.runtime.remoting>
</configuration></code>
</code>
_ra
|
|
|
|
|
|
Hi everyone
I have a base form, which have some code in its _Load event, which tries basically to get all the components in the inherited form, took the ones which are Entities ( a component developed by us) and change some properties in the control.
The is working, but only for the component in the base form
Even I can get the inherited form in my event in my base class, and I can see the components collection variable, I can't use it directly, because I must done a cast to the inherited class, and if I do so, it does not work for other classes...
I've research a little, and know that by reflection I can do what I want, but I would like an easier way....
I tried to use the Site form's property, as it is the one that is used in desig time, but it didn't work....
Some suggestions?
I'm really afraid of using Reflection...
Thanks
BG
|
|
|
|
|
Reflection is easy, but slow. Can you specify an interface for the classes you need to access, so that you can use get/set methods defined in the interface that are common to all the classes you need to work with?
Marc
My website
Latest Articles:
Undo/Redo Buffer
Memento Design Pattern
|
|
|
|