|
Hi!
You'll have to override WndProc for this and scan the messages for WM_SCROLL and related messages.
Regards,
mav
|
|
|
|
|
Hi !
Please for me a exemple : Send Pack Data from Server To Client In C# by Tcp Socket programing ?
EX :
Data pack :
+ CodeStudent
+ NameStudent
+ MarkStudent
How do you Send Data pack this from Server to Client ?
After that Show Data Pack this !
Please Send your result for me by Email :
My Email : dlugroup@yahoo.com
Thanks ! ! !
Please help me !
-- modified at 0:41 Thursday 13th October, 2005
|
|
|
|
|
Or....Not. We're not in the business of answering homework problems here. If you have a question once you've started, feel free to ask...but you need to show some work before we're going to start helping you.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
What is the best way to handle an invalid input?
void DrawComplexNumber1(Graphics g)
{
Pen p = c_xy.GetNextPen();
p.DashStyle = DashStyle.Dot;
c_xy.SetOrigin(xIndent + graphRect.Width/2, yIndent + graphRect.Y/2);
cmplxValue1.Real = Convert.ToDouble(textComplex_1Real.Text);
//wHAT IF INVALID? need CODE
cmplxValue1.Imaginary = Convert.ToDouble(textComplex_1Imaginary.Text);
//WHAT IF INVALID? need CODE
g.DrawLine(p, 250, 250, (float)(250 + (xIndent * cmplxValue1.Real)), (float)(250 - (yIndent * cmplxValue1.Imaginary)));
}
thanks a lot....
|
|
|
|
|
Hi all,
I'm trying to implement a view of a grid simliar to a view that you would see on an AS400. The same data is display for all views, but the columns (left to right) change based on the view selected.
grid col 1,2,3,4,5,6,7,8,9,10
user changes to view based on #4
4,3,2,1,5,6,7,8,9,10
user changes to view based on #8
8,9,10,1,2,3,4,5,6,7
I hope this defines it accurately. Same data, same columns, same table, same dataset, just juggle the columns around based on a user defined criteria.
Any help at all would be greatly appreciated!
BTW, I'm new to C# so URL's, references to help text, etc. is greatly appreciated as well .
TIA
|
|
|
|
|
I am using Color.FromArgb to draw a transparent image pixel by pixel. It is pretty slow. Is there a faster way to render a transparent image?
|
|
|
|
|
|
There is no transparent setting in drawimage func. My major problem is I have to change the degree of transparency frequently, so I cannot render the image once and paste the same image with drawimage.
|
|
|
|
|
I want to draw a rectangle while moving the mouse. But the event handlers below would preserve all the intermediate rectangles in the window. How to erase the intermediate rectangles and only show the last rectangle?
Thanks.
private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
firstpoint = new Point(e.X,e.Y);
}
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
Graphics g = this.CreateGraphics();
Pen dotPen = new Pen(Color.Black, 1);dotPen.DashStyle=DashStyle.Dot;
g.DrawRectangle(dotPen,firstpoint.X,firstpoint.Y,e.X-firstpoint.X,e.Y-firstpoint.Y);
}
private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
secondpoint=new Point(e.X,e.Y);
Graphics g = this.CreateGraphics();
Pen dotPen = new Pen(Color.Black, 1);dotPen.DashStyle=DashStyle.Dot;
g.DrawRectangle(dotPen,firstpoint.X,firstpoint.Y,e.X-firstpoint.X,e.Y-firstpoint.Y);
}
|
|
|
|
|
I think you should draw your rectangle in the Form's Paint event
As per my knowledge using the CreateGraphics() draws a drawing permanently
-- modified at 8:18 Thursday 13th October, 2005
|
|
|
|
|
Hi All,
I wondered if anyone could make sense of this undocumented object (System.Runtime.Remoting.Proxies.__TransparentProxy) being returned from the static method call to System.Appdomain.CreateDomain(...).
Normally (in my mono-assembly testing application), System.Appdomain.CreateDomain(...) returns the documented System.Appdomain that is expected.
When I stitch the code into my multi-project solution, however, the call returns a __TransparentProxy object that raises exception further on in code when I call a member on it (of what is supposed to be the System.Appdomain object). The exception demands that all sorts of classes (and their members!) be marked as serializable. I'm not interested in doing that for various reasons.
Any help is greatly appreciated.
Rein
|
|
|
|
|
Rein_Petersen wrote:
I wondered if anyone could make sense of this undocumented object (System.Runtime.Remoting.Proxies.__TransparentProxy) being returned from the static method call to System.Appdomain.CreateDomain(...).
It makes sense. It returns a remoted object.
Rein_Petersen wrote:
Normally (in my mono-assembly testing application), System.Appdomain.CreateDomain(...) returns the documented System.Appdomain that is expected.
Mono either doesnt support real remoting or they have it implemented incorrectly or their debugger displays the 'real' type of the transparent proxy.
Rein_Petersen wrote:
I'm not interested in doing that for various reasons.
You will have to. Remember you can use the Nonserializable attribute on fields that dont require to be serialized. I know its a pain, but you have to do, what you have to do.
xacc-ide 0.0.99-preview2 (now with integrated debugger)
|
|
|
|
|
Hi Leppie,
Thanks very much for responding. I realize that my wording was somewhat ambiguous and I think you mistook my reference to my "mono" assembly test appplication was to the mono project [ http://www.mono-project.com ]. I was trying to indicate that the testing application (which I often use to break down more complicated code into it's most fundamental bits for my own better understanding) was a single (mono) assembly.
My actual application has several projects constituting the entire solution. It is that distinction that I believe causes System.Appdomain.CreateDomain(...) to return the __TransparentProxy instead of the desired|expected System.Appdomain (as it does in the single project test app).
I'm still stymied on that.
Rein
|
|
|
|
|
Hello again everyone. I am writing this function that checks when a string has a blank in it, and if it does, I want to replace it with an underscore, but when I compile my program I get this error:
Property or indexer 'string.this[int]' cannot be assigned to -- it is read only.
Here is my function, it is very simple:
<br />
public void File_Fix_Spaces(string original_file, string text)<br />
{<br />
bool done = false;<br />
<br />
string new_filename = "";<br />
<br />
for(int i=0; i<original_file.Length; i++)<br />
{<br />
if(original_file[i]==' ')<br />
{<br />
original_file[i] = '_';<br />
done = true;<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Yep, that's right. Strings are immutable in the .NET Framework. You'll have to recode your function to convert the string to a StringBuilder object instead. StringBuilder will hold your string as an array of bytes or characters that you can then manipulate any way you want, then, at any time, you can have the StringBuilder recompile the array back into a String simply by calling it's .ToString() method.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What Dave said is correct but just as a hint: The .Net framework has a function to do what you want:
string newFileName = oldFileName.Replace(' ', '_');
|
|
|
|
|
Very true! I've been getting a little tunnel vision lately. Work stress is getting to me...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Iam just starting to try and use resource files to embed images and icons rather than have them as files that need to be available when running the application.
I have tried many different examples of code in my application but can not get any of them to work. The best I have managed is to create the resource file, add some code to the application and compile it without error, when I try to run it I get a :
Application has generated an exception that could not be handled
error every time.
Please could someone point me in the right direction.
I have created a 'MyRes.rs' file with the following text :
MyResImage1 IMAGE Image1.jpg
MyResIcon ICON MyIcon.ICO
used rc.exe to build the res file and that created a 'MyRes.RES' file
The trouble now is that I do not know how to access the resourse in my application to, for example:
use the Image1.jpg in an image list
use the MyIcon.ICO as an icon for the application in the status bar
Please could someone help (example code, or pointers to example code, would be very helpfull as I am fairly new to C# programming)
Thank you
Paul
-- modified at 15:25 Wednesday 12th October, 2005
|
|
|
|
|
Hello,
Is there a way of assigning null value to a decimal. Or, do I have to declare it as a string, and keep converting it to the decimal?
Thank you
|
|
|
|
|
C# 2.0 supports nullable types, if you;re using an older version you'll have to kluge it in one way or annother.
|
|
|
|
|
Thank you.
String conversion it is then.
|
|
|
|
|
If you're using .NET 1.x, then no, you can't assign null to a decimal. .NET 2.0 has nullable types, which means you can. However, that would require you to develop for 2.0 only, which will be released in November. So...it's up to you.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
This doesn't result in a null value. This results in the decimal type have a value of 0. Value types cannot be null in the .NET Framework 1.0 and 1.1.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i've just posted a question like this, but i've got an answer not adapted at what i mean...
I explain better.
I can open a .avi file using this:
string file_path = @"c:\myfile.avi";
string sComand = "open \"" + file_path + "\" type mpegvideo alias...";
mciSendString(sComand, null, 0, IntPtr.Zero);
OK it just works, but i need to open a file from memory stream (System.IO.Stream, otherwise byte[] ) instead to load a file from the HardDisk.
How???
|
|
|
|
|
Well, you can't really hand off a stream to whatever you're using to play an AVI file because it probably doesn't understand streams. However, you could use the System.IO.IsolatedStorage classes to store the stream to a file in a temporary location and then open it from there. Just a thought...
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|