|
I'm trying to get MSMQ to talk to my application.
I will be using com+ when i'm done, but for the moment i'm using a standalone exe, just to get the idea of things.
I've set up the app using static void Main(Args[]) and i can get the parameters. Apart from the message body. I've converted the string that i get passed to the correct format but i'm missing the final character. It's using xmlserialization for the moment so i've just added a > on the end and my code works, but i'll be switching to binary later so i won't be able to predict what the character is meant to be.
Anyone got any idea how this should work?
Thanks
Russ
|
|
|
|
|
Hello,
I need to create a IE Extension in C#. I want to add a button to IE standard toolbar and then make IE call the DLL when button is clicked.
I have started with the following code
<br />
[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]<br />
public struct OLECMDTEXT<br />
{<br />
public uint cmdtextf;<br />
public uint cwActual;<br />
public uint cwBuf;<br />
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=100)]public char rgwz;<br />
}<br />
[StructLayout(LayoutKind.Sequential)]<br />
public struct OLECMD<br />
{<br />
public uint cmdID;<br />
public uint cmdf;<br />
}<br />
[ComImport,<br />
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
public interface IOleCommandTarget<br />
{<br />
void QueryStatus(ref Guid pguidCmdGroup, UInt32 cCmds,<br />
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] <br />
OLECMD[] prgCmds, ref OLECMDTEXT CmdText);<br />
void Exec(ref Guid pguidCmdGroup, uint nCmdId, uint nCmdExecOpt, <br />
ref object pvaIn, ref object pvaOut);<br />
}<br />
[ClassInterface(ClassInterfaceType.None),<br />
ComSourceInterfaces(typeof(COM_Events))]<br />
public class COMAddin: IOleCommandTarget<br />
{<br />
public void QueryStatus(ref Guid pguidCmdGroup, <br />
UInt32 cCmds, OLECMD[] prgCmds, ref OLECMDTEXT CmdText)<br />
{<br />
}<br />
public void Exec(ref Guid pguidCmdGroup, uint nCmdId, <br />
uint nCmdExecOpt, ref object pvaIn, ref object pvaOut)<br />
{<br />
}<br />
}
But I don't know what to do next.
I know that I have to add a key in HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions.
And I have to somehow register the COM DLL (regasm?), and create some GUIDs. I don't know where to put those GUIDs, in which class, should I do it over attributes or over assembly... This is a managed DLL, all articles that I find on the net are related to plain native C++. And I need to get the IE Document data somehow (IHTMLDocument2 or something?), but that is not primary here.
Can anyone point me to a good article for this, or help me directly?
Thank you in advance,
Milos
|
|
|
|
|
I have a picture box inside a panel control. AutoScroll property for the panel is set to true. picture box is large enough to show the horizontal or vertical scrollbars of the panel control.
I am trying to Crop the picture box (with RubberBand effect).
When I bring the mouse near the Right Or Bottom Edge of the panel control, the panel control does not scroll.
Can somebody help scroll the panel control?
A code snippet will surely save me some time.
|
|
|
|
|
I'm not certain but I suspect you'll need to do this manually. I can't think of a way to do so without using a 2nd thread though.
My thought is using the MouseMove event, getting the mouse position out of the event args, and if it's within N pixels of the border, starting a thread to scroll the image one pixel N times/sec. IF the mouse isn't within N pixels terminate the scrolling thread (if neccesary).
|
|
|
|
|
I'm using an fsw to monitor a shared save directory for my application, the problem is that when my app saves the datafile the Changed event fires 4 times for the file.
-- modified at 9:51 Friday 14th October, 2005
Make that upto 4 times, with a larger file it's only firing twice.
|
|
|
|
|
Which events and how many times they fire depends HEAVILY on how your application is saving the file. For example, when you open a Word document, it makes a copy of the original file, with a temp filename, and opens the copy. When you save your changes, the file is saved to the copy, then the original file is deleted and the copy renamed to the original filename.
There are no settings to filter out multiple firings of the events.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok. The update I'm doing doesn't cause enough of a performance hit to matter, I was just worried I was doing something wrong.
The files are xml, and except for xml version descriptor, and a comment are written entirely by an xml serializer so there's not much I can do to influence the write behavior.
|
|
|
|
|
I show the client a message via messagebox.
But message is not shown as formatted.
For example
Do you want to delete Record?
ID : 3
NAME : Angel Koverk
CLASS : 4
I like it will shown as
Do you want to delete Record?
ID____: 3
NAME_: Angel Koverk
CLASS_: 4
how can i do?
|
|
|
|
|
Did you try the "\t" escape sequence?
string msg = "Do you want to delete Record?\nID\t: 3\nNAME\t: Angel Koverk\nCLASS\t: 4";
www.troschuetz.de
|
|
|
|
|
Hi your MessageBox should be like this
MessageBox.Show("Do you want to delete Record?" +"\n" + "ID:" +"\t" + "3"+ "\n"+ "NAME:"+ "\t" +"Angel Koverk"+ "\n" +"CLASS:"+ "\t" + "4" );
Regards
|
|
|
|
|
Is it possible to tell when the OS starts and stops a screensaver, from inside a C# service which is running under the SYSTEM account?
-- modified at 6:06 Monday 17th October, 2005
|
|
|
|
|
Hai all
I am working on project inwhich i ahve to dislay the live telecast of an video capturing device at one corner of the winform.
Please suggest me a control which can slove my problem.
Advance thanks.
sukanyavarma
|
|
|
|
|
use directx.Capture namespace
Mess With The Best And Die Like The Rest
|
|
|
|
|
Dear snouto,
Thanks for your information.
I think it is an activex control.
I am trying to write wrapper for inter operability.
Regards
SukanyaVarma
Sukanyavarma
|
|
|
|
|
I have a system where several accounts can exist, in several flavours. I decided to use XML files for storage where each account gets it's own file. At startup, the system loads all accounts in memory.
Have a look at this class diagram.
When mass deserializing, I don't know how to specify of what type (Administrator, Business or Member) an account will be. I tried setting up the deserializer with the root type (Account) but any attempt throws an error about unexpected type.
XmlSerializer serializer = new XmlSerializer(typeof(Account));
Then I tried specifying extra types but the same error arises.
XmlSerializer serializer = new XmlSerializer(typeof(Account), new Type[] { typeof(Administrator), typeof(Business), typeof(Member) });
Any idea how this problem could be resolved?
|
|
|
|
|
I use raw data printing in an accountancy program. XP Clients has no problem with that , but i cannot print any report from Windows me client..
And i use Oki 520 and 310 printers, they have three mode for Fonts ("NLQ","HSD","UTILITY") to print. But i cannot choose which one will be used when printing. I s there any method. Thank you.
|
|
|
|
|
Cross-posting to multiple forums is considered rude, so don't do it please.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi!
i've a question about Trace.
i want to use the trace (System.Diagnostic nemaspace) mechanism to generate (on demand) error and/or state messages for the eventlog. but it's only possible to generate information messages (Type=Information), no warnings or errors?! or is it possible anyway?
here's my code:
TraceListener Listener=new EventLogTraceListener("myApp");
Trace.Listeners.Add(Listener);
...
void doSometing()
{
try
{
}
catch(Exception e)
{
Trace.WriteLine(e.Message,"Error");
}
}
thanks in advance!
|
|
|
|
|
If you're wanting specifically to work with the eventlog, try using the System.Diagnostics.EventLog class. This will provide all of the writing methods you will need -- including writing an "error" event.
|
|
|
|
|
Hai all
I want to use the serial port class of vsnet 2005.
Presently iam using vsnet 2003.
how can i get the corresponding Dll, so that I can add the Reference and use it in my project.
If above procedure is not feasible suggest me any new way.
Please help me
varmag
|
|
|
|
|
You can't use the classes from the .NET Framework 2.0 in your VS.NET 2003 project's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks For your information.
I am new to .Net.
Please suggest me any alternative.
Thanking You
|
|
|
|
|
Just Google for "VB.NET Serial Port", and you'll find a bunch fo home-brewed solutions. One of which can be found here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
how can i get array value form arraylist of arrays?
<br />
<br />
ArrayList objXLIST=new ArrayList();<br />
objXLIST.Add(arrXValue);
<br />
<br />
<br />
how can i get values from objXLIST?
|
|
|
|
|
Just use an index on the list:
gotTheArray = objXLIST[0];
---
b { font-weight: normal; }
|
|
|
|