|
Please do not cross post. You have posted this (correctly) in the General IT Issues.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Thanks for the suggestions...
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Hi,
I want to build one MFC dll which will act as a server using socket or any other concepts...
And then want to build one windows application using c# which will act as a client. If i click a button from the c# application, one of the server function want to invoke!.. Is it possible? If anybody know, please guide me...
Thanx in advance
Surez
|
|
|
|
|
MFC ???
This is C# WinForm, not MFC forum...
|
|
|
|
|
sorry! i'm having MFC dll, which act as a server by the way of socket concept. Could i communicate that server from my c# application?
|
|
|
|
|
You already asked this question in the C++ forum. Please follow the rules.
|
|
|
|
|
|
Hi,
yes it is possible to communicate with C# via sockets. Have a look at this article (scroll down to the middle to find the interesting socket part.
A Simple Crawler Using C# Sockets[^]
More interesting than the server is using sockets is the protocol the server speaks. So what command do you have to send to let the server do this or that. Keep that in mind while programming.
Regards
Sebastian
|
|
|
|
|
Hello I have created an application with windows form which display the camera connected to my PC via BNC.
With one of my camera everything's fine but with another one the picture is Black and white and sometimes it display pixel sh*t.
I want to know if I can change the settings for the second camera (change PAL to NTSC, color, frequency...) with my program, I display the camera with the user32 and avicap lib and I already look for all the parameter I can send in the SendMessage method. (WM_CAP_DLG_VIDEOSOURCE, WM_CAP_GET_VIDEOFORMAT and so on)
Can anyone help me?
|
|
|
|
|
WMA does not offer this sort of functionality at all, and Canon used to make the only cameras that offered full control, but they stopped some time ago. That was also just for still images, not video.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am using Nero7.2 and I uses neroClass.GetDrives from my .Net code and doing some operation with Nero.
Now thought of migrating to Nero9 and the Nero9 doesnt have NeroSDK.
Do any one has solution for this?
Regards,
Senthil
|
|
|
|
|
Well, unless anyone here works for Nero, if Nero 9 doesn't offer the SDK, you're plainly dead in the water.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Here's a novel thought - Ask NERO!
But, as far as I know, Nero stopped making and distributing their SDK with Nero 7. There is no SDK for Nero 8 and 9 and no plans to bring it back.
|
|
|
|
|
i want to get the mail recieved in outlook, i want to get this mail through C# code,is it possible to do so?????
|
|
|
|
|
I believe that outlook, being part of office, allows you to use the Microsoft Tools for Office to manipulate it through .NET code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
I have a numericUpDown1 control who have the max=100, min=0, and increment=10; so when I change the values it increment/decrement by 10 each time, right. Now, I want a thinghie, that when it reach 10, the increment change to 1, under the value of 10. Over the value of 10, it must resume to the default increment ( of 10).
I must press 2 times when it reach the value
of 10,to really increment to 20.
It stop and I must do a second click at that point then it work properly.
This is a little bug I wish to solve.
here is the working variant:
if (numericUpDown1.Value <= 11)
{numericUpDown1.Increment = 1;}
else
{numericUpDown1.Increment = 10;}
if (numericUpDown1.Value = = 11)
{
numericUpDown1.Value -= 1;
numericUpDown1.Increment = 10;
}
modified on Monday, September 28, 2009 6:20 PM
|
|
|
|
|
Try:
int lastValue = 0;
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
if (this.numericUpDown1.Value < 10)
{
this.numericUpDown1.Increment = 1;
}
else
{
this.numericUpDown1.Increment = 10;
}
if ((this.numericUpDown1.Value == 10) && (this.lastValue > 10))
{
this.numericUpDown1.Increment = 1;
}
this.lastValue = (int)this.numericUpDown1.Value;
}
I have assumed that you code came from the ValueChanged event handler, if not please let us know which method it comes from.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You have assumed correct. It worked like a charm.
____
there is though, a little bug remained: when I play around of value 10, it still become 11. After it become 11 it decrement with 10 and jump to number 1 directly. how to clean this up?
(when I am at value 10, I go up to 20, then go down back to 10, and when I click to go up again it transform to 11).
____
if ((numericUpDown1.Value == 10) && (lastValue > 10))
{
numericUpDown1.Increment = 1;
}
lastValue = (int)numericUpDown1.Value;
very nice conversion shortcut.
thank you very much.
modified on Tuesday, September 29, 2009 4:33 AM
|
|
|
|
|
|
I had a play around with this last night too - I didn't post because I couldn't make code I was totally happy with. Something always felt messy...
To be honest I've always avoided this control, I'd rather roll my own so I have more control. If it had a ValueChanging event with CancelEventArgs it would be a great improvement as invalid/not required values shouldn't get to the Value in the first place. For situations like this an integer based one as opposed to decimal would be a help too.
Maybe I'll make one and do an article... need a few extra hours in the day!
|
|
|
|
|
Couldn't agree more. Not one of M$s better controls. Some time ago I discovered a version where the up/down buttons had individual click events with cancellabilityness, which was useful, although needless to say I am unable to find it now.
As you rightly say, a ValueChanging event with cancel would solve most of its problems.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
this seems to work well for clicks, arrow up/downs, and pastes.
The assumptions are:
- value, min and max are integer numbers within the int range
- the initial value is below 10
private void nud_ValueChanged(object sender, EventArgs e) {
decimal newValue=nud.Value;
if (newValue>10) {
bool incrementing=nud.Tag==null?true:nud.Value>(decimal)nud.Tag;
newValue=((int)newValue/10)*10;
if (incrementing) newValue+=10;
}
nud.Tag=newValue;
nud.Value=newValue;
}
The state (old value) isn't kept in Increment (which I don't touch), it is in Tag.
Bonus: works fine for other increment values, although it may surprise around 10 (e.g. 0,3,6,9,20)
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hello,
I am not really sure how I want to do this and I am looking for some suggestions.
I have a sql table and this table "A" and it has 3 text values and an ID and it is bound to 3 text boxes with the id left unbound to the form.
I then have a table "B" that has a 1 to n relationship with the "A" table and it has 2 text boxes and the id to table A and its own ID (this is the table I am not sure how to handle)
Next I have table "C" which has a 1 to n relationship with table "B" on here I have a couple text fields, a decimal field which will be bound to a datagridview.
On a single form I need to display Table A(which is straight forward), B and inside this area i will have the 2 text fields and the datagridview which is actually Table C
I was thinking either tabs or docking panels. The only issue is I am just using the controls from .net
Table B however cannot be a grid.
Thanks
modified on Monday, September 28, 2009 5:01 PM
|
|
|
|
|
Just a thought.
Take a look at Microsoft Power Packs 3.0[^]. It includes a DataRepeater Control, which has similar functionality to the old VB (Pre .NET) one, if you remember that?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|