|
Hello!
I am creating a cross tab report in Crystal Reports (the one that comes with the .NET 2003). I add at runtime the names of my columns and rows in two data tables in a data set. I want the columns and the rows to appear in my report in the order I introduced them in the data tables, but, somehow, the report has the columns and rows in alphabetical order. What should I do to have them in the initial order? (One more thing: In the DataSet they appear in the original order but in the report's database they are already in alfabetical order)
Thank you!
Mihaela
|
|
|
|
|
Hello!
I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed.
I use the DrawImage function of Graphics . Setting the SmoothingMode property of the Graphics object seems to have no effect.
Any idea how I can draw an image non-smoothed and scaled onto a bitmap?
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Have you tried following?
Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor;
|
|
|
|
|
That works, thanks a lot!
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
You want InterpolationMode not SmoothingMode. NearestNeighbour will not do any smoothing.
|
|
|
|
|
That works, thanks a lot!
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
byte[] data = Encoding.ASCII.GetBytes("This is a test");<br />
sokje.SendTo(data, eindPunt);<br />
}<br />
This is the code i use for sending data to the server. This goes without an error (Though im not shure if its correct so comment is welcome).
<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
sokje.Listen(5);<br />
sender = new IPEndPoint(Dns.Resolve(IPAddress.Any.ToString()).AddressList[0] , 11000);<br />
EndPoint senderRemote = (EndPoint)sender;<br />
<br />
int ontvangen;<br />
<br />
<br />
byte[] data = new Byte[256];<br />
ontvangen = Convert.ToInt16(sokje.Receive(data)); <br />
}<br />
This is the code i use to recieve messages. This gives me this error :
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
With the following comment :
Socket is not connected and sender has not given an adress
The purpose of the program :
It doesn't really have a purpose yet. Im just expirimenting with c# a bit. For the future i plan on creating some gaming stuff (poker or so) freeware offcourse.
My question :
Can someone explain to me why this is not working and the way im supposed to make it? i started networking only 1 week a go so i would preffer a (relative) easy explanation.
Kind regards Jacco
|
|
|
|
|
Hi,
My first question is that if sokje is a Socket object. If it's so then you should bind it to one ipaddress and a port number. An easy way to do that is to write something like:
Socket serverSocket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
serverSocket.Listen(5);
serverSocket.Bind(new IPEndPoint(Dns.Resolve("127.0.0.1").AddressList[0],PortNumber));
In the code you posted i don't see anywhere that you accept an incoming connection from a client. You can do that with this line of code:
Socket clientSocket = serverSocket.Accept();
Accept method is a blocking method so the program won't go further this line until a client is connected to the server. Only after you accept a client you can read what it sends.
Hope this helps.
Do your best to be the best
|
|
|
|
|
I guess this means its a prob on the server. Here is the server code.
private void Form1_Load(object sender, EventArgs e)
{
sokje = new Socket(AddressFamily.InterNetwork, SocketType.Stream
, ProtocolType.Tcp);
IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList[0];
localEndPoint = new IPEndPoint(ipAddress, 11000);
sokje.Bind(localEndPoint);
sokje.Listen(5);
}
private void button1_Click(object sender, EventArgs e)
{
sender = new IPEndPoint(Dns.Resolve(IPAddress.Any.ToString()).AddressList[0] , 11000);
EndPoint senderRemote = (EndPoint)sender
clSocket = sokje.Accept();
int ontvangen;
//sokje.Bind(localEndPoint);
byte[] data = new Byte[256];
ontvangen = sokje.Receive(data);
}
I'm really sorry but i dont understand most of the explanation. Could u give a hint what to place where? Because i onestly dont know
Kind Regards,
Jacco
|
|
|
|
|
The underdog wrote: removed = sokje.Receive(data);
if you want to use this line to read from the client then it's wrong because sokje is the server. Use this instead
removed = clSocket.Receive(data);
Do your best to be the best
|
|
|
|
|
I ow u one Tnx a lot
|
|
|
|
|
Hi,
Having some trouble with the cursor position on datasets, so now i used bindingcontext and a currencymanager to update and insert records...
But it seems that the selected record in my datagridview isn't the same in the dataset after using sort on the grid...
When using the currency.position the update a row on the dataset, a different row has been updated. (probably not correct i guess)
Does anyone know how i can change programmatically values in my dataset in the same record as selected in my datagrid ?? the controls with binding are ok. But i need to set a datetime value when the record has been changed, and this is not entered by the user.
Thx
Kurt
|
|
|
|
|
Hi all,
I want to print a pdf file if the user clicks on a print button
I'm using this code...
string CardPath = "C:\Card";<br />
Process myProcess = new Process();<br />
myProcess.StartInfo.FileName = CardPath + "\\Card.pdf";<br />
myProcess.StartInfo.Verb = "Print";<br />
myProcess.StartInfo.CreateNoWindow = true;<br />
myProcess.Start();
I get an error saying just as it executes the myProcess.Start() part of my code...
"No application associated with the specified file for this operation"
How can i specify with what application to print??
Please help.
Thank you in advance....
-- modified at 9:20 Thursday 5th October, 2006
Oh yeah...
Would you by any chance know how to send this print to a specific printer?
i can send a .html or .doc to the printer but not the .pdf as stated above.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi! How do I save the contents of a list box, so that when the user shuts down the program, they click a button called save and the next time they open it, it is still there?
|
|
|
|
|
if ur using any database the u can store it in table at the time of closing application
or u can use Xml file to store ur content.
rahul
|
|
|
|
|
It would be REAL handy to know what type of application you're talking about, but I'm assuming a Windows app.
Generally it would be really easy to save the contents to a small XML file, then at startup check to see if that file is present. If it is, put the contents back in the listbox, and if not, it would be empty.
HTH
WhiteWizard
aka Gandalf
|
|
|
|
|
Hello every 1
Can any 1 tell me if there is a .NET control / library that can be used to create trees (preferably binary)on WinForm in C# application.
I have seen tree at cp that are vertical but i want tree that grows horizontally.....
any suggestions are welcome....
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
Hi,
I have a basic doubt in using a switch case.
For the case stmt am unable to have a static or readonly value. The compiler gives a error "A constant value is expected".
i.e, if i have a variable like - private static myval = "R1";
--
switch
{
case classname.myval: // gives compiler error
}
Would be much happy to know the logic behind this.
Thanks.
|
|
|
|
|
He is Cool wrote: switch
{
case classname.myval: // gives compiler error
}
in switch steatement you should set any value .
|
|
|
|
|
yup. i am giving a static value.
|
|
|
|
|
|
Yeah, that was definately a thinker...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
switch is pretty much limited to constant values. The value needs to be known at compile time. myval can be changed in the code, so it will not always be the same.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
He is Cool wrote: Would be much happy to know the logic behind this
Only constants are known at compile time. The value must be known at compile time for it to generate a valid switch statement.
With a static the value can be changed at any time during the run of the program. With a readonly the value is set at runtime, although it cannot be changed once set.
So, you can only provide a constant value. Either a literal value or something set as a const , just as the compiler says.
|
|
|
|