|
Hai to all
I am learning C# from the past 1 and 1/2 month. I am working on Global Hooks. I am able to get the mouse and keyboard events. I need some help on how to do to record and play back the recorded events(mouse or keyboard). Desparately and urgently
Please help me out
Warm regards
Naresh Nelluru
|
|
|
|
|
|
Hi,
I m willing to use Dundas Charting Tool to draw 3D Charts in Windows Forms in .Net 2.0
I want to generate a chart having all 3 axes plotted on the screen i.e. X(Customer_acctbal),Y(supplier_acctbal) and Z(Compilation Cost).
The requirement is in as shown in the image below.
My questions are:
1) Is this possible to draw using Dundas Charts?
2) If yes, then please guide us how to generate charts using all the 3 axes ,if possible, kindly provide sample project/code to do so.
Thanks & Regards.
Vikas.
+919999190313
|
|
|
|
|
This would be better asked and answered by Dundas. There may not be many people here who have the Dundas library.
1) Surely this can be answered by looking at the Dundas website where they have some sample graphs with are in 3D
2) If it is at all possible then there will be in all likely hood samples in either the documentation or on the website.
PS, I do know this is possible but seeing this can be answered by some simple research I'm not going to bother doing it for you when you have the documentation at your fingertips and I dont.
|
|
|
|
|
I have used this code: http://www.codeproject.com/useritems/dotnetscr.asp
When i open .exe it work fine. but when i copied it to another computer i get error message: initialization error(0xc0000135)
what is the problem?
|
|
|
|
|
Why not get in touch with the author by posting this question on the forum? They are the most likely person to be able to help you.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Possibly, the target machine doesn't have the .NET Framework installed, or doesn't have the correct version of it installed.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how could i iterate in nested child node of a xml data.i have given the xml data below which is stored in my xml file.
now i want to write a function which will read all the child node under transaction node.suppose there are 3 child node under
/P2DXML/Sender/Recipient/Document[@Transactions='3']/Transaction node.
in a loop i want to read value from those child node.when read will be complete the control will go out of scope.
in my case Document[@Transactions='3' so only child node related to this will be read.
when Document[@Transactions='4' then only child node related to this will be read.if my question is clear then pls give me the answer with sample code.
<P2DXML Version="1.05.67" Documents="12">
<!-- This XML conforms to 1.05.67 or Earlier -->
<Sender HubId="30556" Documents="12">
<Recipient HubId="29552" Documents="12">
<Document Type="Sales Invoice" Transactions="3">
<InvoiceNumber>H74014</InvoiceNumber>
<InvoiceDate>05/01/2007</InvoiceDate>
<InvoiceTaxPointDate>05/01/2007</InvoiceTaxPointDate>
<InvoiceName>NEW LOOK RETAILERS LTD V1163</InvoiceName>
<InvoiceAccount>NEW13</InvoiceAccount>
<InvoiceAddress1>NEW LOOK HOUSE</InvoiceAddress1>
<InvoiceAddress2>MERCERY ROAD</InvoiceAddress2>
<InvoiceAddress3>WEYMOUTH</InvoiceAddress3>
<InvoiceAddress4>DORSET</InvoiceAddress4>
<InvoicePostcode>DT3 5HJ</InvoicePostcode>
<InvoiceCountryCode/>
<InvoiceContact/>
<DeliveryName>MODA FASHIONS</DeliveryName>
<DeliveryAccount>NEW13565</DeliveryAccount>
<DeliveryAddress1>UNIT C2, ENSIGN ESTATE</DeliveryAddress1>
<DeliveryAddress2>BOTANY WAY</DeliveryAddress2>
<DeliveryAddress3>PURFLEET</DeliveryAddress3>
<DeliveryAddress4>ESSEX</DeliveryAddress4>
<DeliveryPostcode>RM19 1TB</DeliveryPostcode>
<DeliveryCountryCode/>
<DespatchContact/>
<Terms>60 Days</Terms>
<DueDate>06/03/2007</DueDate>
<CurrencyCode>GBP</CurrencyCode>
<NettAmount>764.48</NettAmount>
<TaxAmount>133.79</TaxAmount>
<GrossAmount>898.27</GrossAmount>
<Transaction>
<LineNo>1</LineNo>
<Type>Product/Service</Type>
<OrderNo>1241932</OrderNo>
<ManufacturerCode>14491:SH41RU:WHITE</ManufacturerCode>
<BuyerCode>1206243</BuyerCode>
<DespatchNoteNumber>D64508</DespatchNoteNumber>
<DespatchDate>04/01/2007</DespatchDate>
<Description>"WHITE "NEW LOOK" 3062309"</Description>
<Quantity>2800</Quantity>
<UnitofMeasure>100</UnitofMeasure>
<Price>11.32</Price>
<NettValue>316.96</NettValue>
<TaxPercent>17.50</TaxPercent>
<TaxValue>55.47</TaxValue>
<GrossValue>372.43</GrossValue>
</Transaction>
<Transaction>
<LineNo>2</LineNo>
<Type>Product/Service</Type>
<OrderNo>1241932</OrderNo>
<ManufacturerCode>15034MO:CPIP36:WHITE</ManufacturerCode>
<BuyerCode>1206243</BuyerCode>
<DespatchNoteNumber>D64508</DespatchNoteNumber>
<DespatchDate>04/01/2007</DespatchDate>
<Description>"WHITE "NEW LOOK""</Description>
<Quantity>1920</Quantity>
<UnitofMeasure>100</UnitofMeasure>
<Price>21.85</Price>
<NettValue>419.52</NettValue>
<TaxPercent>17.50</TaxPercent>
<TaxValue>73.42</TaxValue>
<GrossValue>492.94</GrossValue>
</Transaction>
<Transaction>
<LineNo>3</LineNo>
<Type>DeliveryCharge</Type>
<OrderNo>1241932</OrderNo>
<ManufacturerCode>CARRIAGE</ManufacturerCode>
<BuyerCode>1206243</BuyerCode>
<DespatchNoteNumber>D64508</DespatchNoteNumber>
<DespatchDate>04/01/2007</DespatchDate>
<Description>"CARRIAGE CHARGES"</Description>
<Quantity>1</Quantity>
<UnitofMeasure>EACH</UnitofMeasure>
<Price>28.00</Price>
<NettValue>28.00</NettValue>
<TaxPercent>17.50</TaxPercent>
<TaxValue>4.90</TaxValue>
<GrossValue>32.90</GrossValue>
</Transaction>
</Document>
<Document Type="Sales Invoice" Transactions="1">
<InvoiceNumber>H74015</InvoiceNumber>
<InvoiceDate>05/01/2007</InvoiceDate>
<InvoiceTaxPointDate>05/01/2007</InvoiceTaxPointDate>
<InvoiceName>NEW LOOK RETAILERS LTD V1163</InvoiceName>
<InvoiceAccount>NEW13</InvoiceAccount>
<InvoiceAddress1>NEW LOOK HOUSE</InvoiceAddress1>
<InvoiceAddress2>MERCERY ROAD</InvoiceAddress2>
<InvoiceAddress3>WEYMOUTH</InvoiceAddress3>
<InvoiceAddress4>DORSET</InvoiceAddress4>
<InvoicePostcode>DT3 5HJ</InvoicePostcode>
<InvoiceCountryCode/>
<InvoiceContact/>
<DeliveryName>SYNERGY LOGISTICS GROUP</DeliveryName>
<DeliveryAccount>NEW13456</DeliveryAccount>
<DeliveryAddress1>104-106 BRANTWOOD</DeliveryAddress1>
<DeliveryAddress2>BOOK IN MIKE 0208 880 9420</DeliveryAddress2>
<DeliveryAddress3>LONDON</DeliveryAddress3>
<DeliveryAddress4>LONDON</DeliveryAddress4>
<DeliveryPostcode>N17 0XW</DeliveryPostcode>
<DeliveryCountryCode/>
<DespatchContact/>
<Terms>60 Days</Terms>
<DueDate>06/03/2007</DueDate>
<CurrencyCode>GBP</CurrencyCode>
<NettAmount>10959.96</NettAmount>
<TaxAmount>1917.99</TaxAmount>
<GrossAmount>12877.95</GrossAmount>
<Transaction>
<LineNo>1</LineNo>
<Type>Product/Service</Type>
<OrderNo>1241932</OrderNo>
<ManufacturerCode>15034MO:CPIP36:WHITE</ManufacturerCode>
<BuyerCode>1206243</BuyerCode>
<DespatchNoteNumber>D64509</DespatchNoteNumber>
<DespatchDate>05/01/2007</DespatchDate>
<Description>"WHITE "NEW LOOK""</Description>
<Quantity>50160</Quantity>
<UnitofMeasure>100</UnitofMeasure>
<Price>21.85</Price>
<NettValue>10959.96</NettValue>
<TaxPercent>17.50</TaxPercent>
<TaxValue>1917.99</TaxValue>
<GrossValue>12877.95</GrossValue>
</Transaction>
</Document>
</Recipient>
</Sender>
</P2DXML>
tbhattacharjee
|
|
|
|
|
You could load the Xml file into a XmlDocument and use the its SelectNodes method to select the nodes you want. The method returns a collection of selected nodes over which you can iterate and retrieve the wanted values.
"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
|
|
|
|
|
Hello gurus,
I'd like to know how I can get connected to the default instance of SQL Server with user login?
Where can I find a code snipet that shows how to do that with Windows authentication and SQL Server authentication?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
bouli wrote: I'd like to know how I can get connected to the default instance of SQL Server with user login?
By just specifying the machine name, without any instance part.
You can find lots of examples of connection strings for SQL Server here: http://www.connectionstrings.com/?carrier=sqlserver[^]
|
|
|
|
|
Also, if you just want some examples related to your local databases you could look at the connection string that is located in the properties dialog when you select a database server in the server viewer section of VS2005.
Aaron
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
This should get you started.
try<br />
{<br />
SqlConnection connection = new SqlConnection("server=localhost; database=yourdb; user=yourusername; password=yourpassword);<br />
connection.Open();<br />
}<br />
catch (SQLExcepton SqlE)<br />
{<br />
//Do you exception handling here<br />
connection.Close();<br />
}
Remember, you need to include the System.Data.Sql namespace for this
|
|
|
|
|
Hi experts!
I trying to write a program to read a byte[] from IrDA port.
The IrDA device is onboard (laptop), and in the BIOS this device uses: COM2, but, using the component SerialPort from .NET 2.0, using the COM2 and invoking the method Open() i retrieve a exception: COM2 doesn't exist.
This device is correctly installed and working with windows. I tried add a new COM port, using same IRQ from IrDA, but, this conflicted with IrDA device
How i can use my IrDA device in .NET 2.0?
Thanks in advance
|
|
|
|
|
How do you open the port?
|
|
|
|
|
I add a SerialPort component in the form, with name: serialPort1
and in the code:
serialPort1.PortName = "COM2";<br />
serialPort1.Open();<br />
The exception says the com2 port doesn't exist.
It´s wrong?
|
|
|
|
|
No i think that's ok..
Take a look at the Infrared Device in the DeviceManager.. maybe you need to configure it when you want to use it as comPort under windows
|
|
|
|
|
Does Hyperterminal see the port? If not then neither can .NET. Another possibility would have been if the com port used by the IrDA does not begin with COM, there's a retarded check in the Open method which checks to see if the port name begins with COM! At least MS are going to remove this check for the next release thanks to my comment :->
|
|
|
|
|
No, the COM2 don´t appears in the HyperTerminal, but, the IrDA device to file transfer with windows works perfect.
How i know whats name of my port?
|
|
|
|
|
If Hyperterminal can't see it then it's almost guaranteed that it's not operating as a standard Windows COM port. It's probably got a proprietry driver, check through the documentation to see if there's an SDK or something like it available to talk to the com port.
Alternatively see if you can find out which library or executable is being used for the transferring and look with depends.exe to see which library it's calling to talk to the IrDA port.
|
|
|
|
|
First of all it would be a good idea to check all ports on your computer first. I use it like this.
public enum PortAvailabillity
{
Available, InUse
}
public static Dictionary<int, PortAvailabillity> GetPorts()
{
string[] availablePorts = SerialPort.GetPortNames();
Dictionary<int, PortAvailabillity> portStatus = new Dictionary<int,PortAvailabillity>();
foreach (string s in availablePorts)
{
int number = int.Parse(s[s.Length - 1].ToString());
try
{
SerialPort p = new SerialPort(s);
if (!p.IsOpen)
portStatus.Add(number, PortAvailabillity.Available);
else
portStatus.Add(number, PortAvailabillity.InUse);
}
catch (IOException err )
{
#if DEBUG
Console.WriteLine("Error getting port: " + err.ToString());
#endif
}
}
return portStatus;
}
Also you might want to set some more parameters when opening the port (baudrate and such). Always make sure no other program is using the port when you try this.
Standards are great! Everybody should have one!
|
|
|
|
|
Thanks! I try this, and, later i write the result.
|
|
|
|
|
I've extended the PictureBox control to create my own user control. Now I want to capture the OnMouseWheel . I've done this many times, and it's usually enough to override like this
protected override void OnMouseWheel(MouseEventArgs e) . Unfortunately the overidden method is never called when I turn my mousewheel. I've also tried tying the MouseWheel even to my own method. Weird enough, this isn't called either... Could this be related to the parent control the box is placed in? Any suggestions?
Standards are great! Everybody should have one!
|
|
|
|
|
You might try creating a user control that you know has the OnMouseWheel event enabled. Another option would be to inherit from the picturebox and override its WndProc with information related to the mouse wheel.
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
The picture box should have this event enabled. I've tried the following and found it to be working: The form is placed within a SplitContainer control. Since I was guessing it might be the parent container that was the problem, I tried tying my method to SplitContainer.Panel1.MouseWheel event first. When this wasn't working, I tied it to SplitContainer.MouseWheel . This actually works. This seems very strange because I've always thought that events were passed from the toplevel container on to the back. The solution isn't very charming, since this means the control I made will have to be hooked differently to it's parent controls, depending on the type of parent it's placed In.
Overriding its WndProc seems like a good idea, it's just that I have no idea of how to do this. If you can give me a pointer that would be very welcome, it's almost weekend for me and I don't feel like starting it with leaving an annoying problem like this unsolved
Standards are great! Everybody should have one!
|
|
|
|