|
Looking in the toolbox I see: NumericUpDown.
---
b { font-weight: normal; }
|
|
|
|
|
Hey guys, could someone give me a tip, how to distinguish between send and receive data in a terminal program ? What I want to do is, I will write my own terminal program, like tera term - in C#. But one issue to me is how could I distinguish between data I've written into the textbox and sent this data via com-port and data which is received via com-port and written into the textbox. The event to update the textbox is textchange, maybe I should use an other event but which? Thnak's for your help.
|
|
|
|
|
Hello,
I have a string: str = "1~2~1";
Also I have a statement:
DataRow[] cashRows = this.dataset.Tables["CashFlow"].Select ("IndentLevel = "+str);
It gives me an error, that the expression contains unsuppoerte operator '~'. Is there a way of making the select statement work?
Thank you.
|
|
|
|
|
Just a guess, do you need to escape the ~ "1\~2\~1"
|
|
|
|
|
DataRow[] cashRows = this.dataset.Tables["CashFlow"].Select ("IndentLevel = '" + str + "'");
|
|
|
|
|
I am installed ActiveReports and I cannot see the viewer icon and where on the tool box. Mt Question is, how do I add the ActiveReports viewer control to my Visual Studio toolbox.
Thank you all.
Nana
|
|
|
|
|
I'm having problems with a get/set property, and I want to know how to use it. Declaration in the library where it is says this:
public abstract new bool Mute [ get, set ]
Member of Microsoft.MediaCenter.Extensibility.AudioMixer
Thanks in advance,
Theo
|
|
|
|
|
*edit* Woops, just looked it up, it's a native .NET library. Cool . So just add a reference to Microsoft.MediaCenter.dll in your Visual Studio project, then go something like:
using Microsoft.MediaCenter.Extensibility;
...
AudioMixer mixer = AddInHost.AudioMixer;
bool isMuted = mixer.Muted;
mixer.Muted = true;
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
This code does not work Keep in mind the AudioMixer is an interface, not a class.
|
|
|
|
|
Ok, you didn't ask how to get the AudioMixer, so I assumed you already knew. The article I linked to has some examples; I don't know offhand because it's a 3rd party extension that I've never used before. I suggest you create another post if you need help creating the AudioMixer.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
I am trying to find a way to remove data from a file using C#.
I know how to edit using FileStream.Seek and a StreamWriter, and I know how to append data to the end, but I haven't found a way to actually remove data from the end of a file.
Due to file size and memory constraints, reading the whole thing in, saving it as a new file, and then deleting the old file is not an option.
Is there a way to write an EOF where I specify, and that's that? (if so, how do you actually do that?) Or do I have to go about doing this some other way?
Thanks in advance for the help,
Jonathan Mitchem
|
|
|
|
|
No matter what you do, you'll have to get the file stream. This is standard. You can Seek to a position (or .Position) the position of the stream, write data to it, then save it, overritting the previous file. That's probably your best bet.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
|
Use the SetLength method of the FileStream class.
---
b { font-weight: normal; }
|
|
|
|
|
I have a control inherited from ComboBox. In constructor I add some items. Now, when my control is have been putted onto form designed calls to constructor and item collection is automatically updates. How can I prevent this action, some directive or attribute that tells to designer not to call to constructor during the design time?
|
|
|
|
|
Please see this page[^] for information about how to write design-time aware code.
Also, the designer will always call the default constructor (i.e. the constructor that takes zero parameters). If you want to create a constructor that gets called only by your code, create a second constructor that takes a parameter.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
-- modified at 13:30 Thursday 15th September, 2005
|
|
|
|
|
There is a lot of information there... unfortunately I have not found what I need, but thanks.
Declare additional constructor with different from void parameters will be not so "right" way. It must be something that resolves this problem...
|
|
|
|
|
If your control inherits from System.ComponentModel.Component (or System.Control, which inherits from System.ComponentModel.Component), then you can get the value from the protected DesignMode property to indicate whether you're in design mode.
public class MyControl : Control
{
public MyControl()
{
bool designMode = this.DesignMode;
}
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
thanks that is exactly what I need
|
|
|
|
|
I have a gif file with 3 pictures, next to next in one image. Seperated by black lines.
Each picture has a width of 100pix, the black seperation line has 2 pix. Max width is 306.
Now I want to copy the first picture into the imagebox. How can I copy the first picture into the imagebox?
I never have worked with sprites, so I don't know how to get this.
|
|
|
|
|
It's seems that your problem is to separate one peace of entire image from other. If there is width of each peace is constant it will be very easy, but if not, you need to "search for black line"...
What exactly you want to know?
|
|
|
|
|
I know exactly the positions.
1st 1-300
2nd 303-603
3rd 606-906
no dynamic problem, all pictures positions are placed logical, like sprites.
|
|
|
|
|
there is your code, I believe it works
<br />
Image src = Image.FromFile();<br />
<br />
Graphics gr = Graphics.FromImage(src);<br />
<br />
Point point = new Point(1, 0);<br />
<br />
for (int i=0; i<3; i++)<br />
{<br />
Bitmap bitmap = new Bitmap(300, , gr);<br />
<br />
gr.DrawImageUnscaled(src, point);<br />
<br />
point.Offset(303, 0);<br />
<br />
bitmap.Save("filename.bmp", System.Drawing.Imaging.ImageFormat.Bmp);<br />
}<br />
|
|
|
|
|
thx
|
|
|
|
|
Hi,
I need to implement node copy/paste functionality in my treeview control. What is a good way of accomplishing this?
Thanx
|
|
|
|