|
Hi, I have a datagrid boud to a dataset. I am saving the changes by usign the DataAdapter.update(DataSet) method. This woks fine except when the user is position on the last row of the datagrid (the addnew row) with every field DBnull. In this case I am gettin a NonNull alowed exception. I think what I have got to do is cancel the edit on the last row ,when the primary key is Null, and then position the datagrid to the last valid row. If anyone can help I´d be very thankfull.
Thanks,
Pedro
Pedro
|
|
|
|
|
I don't allow records with nulls in required (primary etc.) fields. User must fill them or delete the records.
Hi,
AW
|
|
|
|
|
Thaks, it was alot simpler than what I was trying to do.
|
|
|
|
|
Hi ...
Since I couldn't find a converter from .rc to cs forms i wanted to write one by myself.
Now the problem that arises is, that though the alignment is right (so the buttons and radio boxes are at the right places) the scale is smaller.
I try to explain:
all controls are closer to each other and smaller, so you can't read them.
It's about the factor 1.5 -> 2 .. don't know exactely.
Does any one of you know where this might come from and how i can fix it ?
Thanks
P.S.: I used the values directly from the rc file and write them directly to the cs form file.
and sorry for my bad english
|
|
|
|
|
Somnatic wrote:
I used the values directly from the rc file and write them directly to the cs form file.
I think that is part of the problem. If I remember correctly, the values in the rc file are in DLU's; not pixels like .NET uses. You'll have to find some formula to convert from DLUs to pixels given the current font size.
DLUs are used so that the dialog will scale properly if the user has large fonts but the developer doesn't or vice versa. In .NET, there is a property on the form which does the proper scaling so pixels can be specified in the control source.
James
At Jethro Tull's August 28, 2003 concert Ian Anderson mentioned that the group would be performing several songs in a row and that they were all title tracks. The songs were "Songs from the Wood", "Too Old to Rock and Roll; Too Young to Die"; and from the Heavy Horses album, "Stairway to Heaven"
|
|
|
|
|
Hi there,
I was wondering how to really unregister the Tcp Server Channel.
I create the Server channel like this:
hts = new TcpServerChannel(8000);
ChannelServices.RegisterChannel(hts);
RemotingConfiguration.RegisterWellKnownServiceType(typeof (BankDetailsClassLibrary), "RemoteClass", WellKnownObjectMode.Singleton);
then I try to disconnect the Sever channel using
ChannelServices.UnregisterChannel(hts);
But when I disconnect the server, the client still works. I can even write to the database. What could that be?
Thanks a lot
Chris
|
|
|
|
|
Hi,
can i use ms tapi to make the computer dial a number , and then play a recorded message when the other end picks up the phone?
here is what i want to do;
the comupter dials a number.
wait till someone answers
play a recorded message
listen to the users keypresses (on the phone that is)
play other messages based on the users choices.
can someone tell me what i need to do this?
will a voice modem do this?
do i need ms tapi?
do i need any extra hardware?
//Roger
|
|
|
|
|
TAPI will allow you to do 95% of this. (You'll need to use a Multimedia API such as winmm.lib to actually play the WAV).
A lot depends on the capabilities of your voice modem and it's TSPI support.
I wouldn't recommend using C# for this though, I'd stick with C++.
The Platform SDK Tapi samples will be of great use to you.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
|
Hello,
I would like to make a visual effect of selection on my own userControl, like the multi-selection behavior of ListView (i.e when I mouseDown and then move, there a rectangle dot frame displayed correspond to my mouse movement.)
Is there an easy way to Enable the selection effect?
actually, I'd like to allow multi-selection of objects on my own userControl, but I don't know should I draw it by myself?
Could any experts give me some ideas?
Please help me... Thank you!!!
|
|
|
|
|
hi !
i have a server and a client communicating whith each other using the remoting tcpChannel.
now my problem:
if i kill the client while he is waiting for the return of the just called server-function,
my server crashes:
An unhandled exception of type 'System.NullReferenceException' occurred in system.dll
Additional information: Object reference not set to an instance of an object.
somehow understandable. when the server wants to "return" .... whereto.
but how can I catch that exception?!
thank you!
andi
--
still not having a meaningful aphorism to use as a signature
|
|
|
|
|
I canretreive data from SQLServer as XML,now I want to know how can I do reverse mode.DataSet has a ReadXml() method so it can be filled with xml file but this DataSet is not bind to any DataAdpater to update DataBase,or something like that.So anybody has any idea about how to fill databse with xml file,create table , fill it and so on.I don't have SQLServer on my machine to do any test.
Mazy
No sig. available now.
|
|
|
|
|
Is it possible to use UxTheme in order to make XP look for my application?
VikramS
|
|
|
|
|
Sorry, it's not possible to do this. If people want an XP look for Win2000, they have to use WindowBlinds.
The control library my team is making, Fluid UI Toolkit[^], will have fully skinnable controls.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
thank you for the Information.
VikramS
|
|
|
|
|
Instead of ranting about how pissed I am at Carlos Perez, I'll just ask a legal question. Is he allowed to retract what was once public domain? From some broad searching on IP stuff it looks like the answer is no. Can anyone help clear this up? If anyone has a copy of his original license agreement, please post! Thanks in advance.
|
|
|
|
|
Well, my quick thought as well, and mind me I am NOT a lawyer at all, is that he can do what ever he wants. License agreements and such are only as good as someone is willing to defend them. Do what you want and let the courts sort it out latter, if it ever comes to that.
My impression is that if Carlos ever tries to copyright them he will have problems because his work was in the public domain for so long.
It seems to me that he should have just left what he had in the PD and continued on with the ones he wanted to keep for selling. There was enough differences that it should not have been a problem. I am not sure about why he did what he did. It was his decision, so he has to live with that. I also don' think that he has a leg to stand on as far as people that downloaded the code BEFORE he changed the agreement.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
He cannot restrict your use of his original code - that which he posted on CodeProject. But he can remove it from CodeProject so that no one else can download it, and that's what he did. But if you have a copy, you can use it.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
i agree,
if i downloaded some code when it was OK to use it.
and never came back to codeproject so that i wouldnt know that he has retracted teh rights to use it ... would i then be doing something illegal w/o knowing it??
that cant be right can it?
//Roger
|
|
|
|
|
More to the point, suppose I had used his controls in my app, and then he changed the license? Would I be required to pull my app from the market and/or replace the controls with a new library? No! He released it with no license, which essentially means that the code is free for people to do anything they like with it. But what he can do, and what he did, is to take it off CodeProject so that people can't easily get a hold of it anymore.
So, we're left with a gap on CP that his controls once filled, and that needs to be filled by something else. Chris is going to have a contest to fill that gap, and I intend to help fill it with controls from the FLUID[^] control library.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
best of luck on the fluid project and thanks for the reply. this is actually what happened to me; i started using utility library over a year ago, only to check back a few months ago and see the licensing change.
btw - carlos never had docking tabs, xp visual style support or designers. there's plenty of room for you to do a better job!!
|
|
|
|
|
James Cadd wrote:
best of luck on the fluid project
Thanks!
James Cadd wrote:
carlos never had docking tabs, xp visual style support or designers. there's plenty of room for you to do a better job!!
Definitely.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
As you know, in a standard mdi application the parent form has a client area (usually dark gray). The client area has a 3d border style. I would like to change that border style to either none or fixed single. How is this done?
|
|
|
|
|
subclass the mdi client and handle the wm_ncpaint and wm_paint messages
//Roger
|
|
|
|
|
How can I load a new image into a PictureBox when the user clicks on that PictureBox?
|
|
|
|