|
DESKTOP APPLICATION.
Hi, below is the problem briefed:
In my home form I have a splitcontainer and few buttons. When the buttons are clicked respective forms are opened in the splitcontainer. The splitcontainer is anchored- top, left, right, bottom so that when the home form is resized the splitcontainer resizes itself automatically. The controls within the other forms are also anchored properly to resize themselves accordingly. But the problem is when i open a form in the splitcontainer, even if I resize the home form, the controls in the form within the splitcontainer aren't resizing. The reason is when the home form is resized the splitcontainer is resizing itself accordingly but the form inside the splitcontainer isn't (as forms don't have anchor or dock properties so I couldn't set them). As a result though the controls in the sub form are anchored to resize themselves yet they aren't. How to solve it.
In short I want the form in the splitcontainer and all the controls in it to resize automatically when the home form/splitcontainer is resized. Regards.
|
|
|
|
|
AFAIK a Form is a Control, and hence has an Anchor property. It will only work when its TopLevel property is set false.
If that does not work, and assuming the Form is resizable, I would add a handler to the SplitContainer's panel, and write the code that resizes the Form it is holding. The Controls inside the Form will then do whatever their designer decided they should do.
|
|
|
|
|
Never mind! I missed a small property. When you call the subform in the splitcontainer of the main form just set the property Dock to Fill.
dim objFrmSubForm as New frmSubForm()
objFrmSubForm.Dock=DockStyle.Fill
objFrmSubForm.Show()
objFrmSubForm=Nothing
Regards.
|
|
|
|
|
User user = FillObject(o);
opContext.AddToUsers(user);
opContext.SaveChanges();
opContext.AcceptAllChanges();
Fill Object is my private method which returns an user object.
Savechanges does not save changes to the database at the same time
does not throw error.
I am using sql express 2008 express edition and visual studio 2010
release candidate. Let me know if some body has the same problem.
Is there any setting on sqlserver express edition which i have to turn on.
The piece of code seems to work when i use sql server 2005 on a different
machine
Any help is greatly appreciated
|
|
|
|
|
EF is really agnostic when it comes to versions, if it works with SQL Server 2005 it will work with SQL 2008, Express or otherwise, so I don't buy that it works with one and not with the other. Try debugging through your code, there is obviously something wrong but without seeing whats in FillObject we can't comment.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Nothing is there in Fill object
private User FillObject(UserInfoDO o)
{
User user = new User();
user.UserId = o.UserId;
user.LastName = o.LastName;
user.FirstName = o.FirstName;
user.Password = o.Password;
user.Lockout = o.Lockout;
user.Active = o.Active;
user.Email1 = o.Email1;
user.Email2 = o.Email2;
user.HomePhone = o.HomePhone;
user.MobilePhone = o.MobilePhone;
user.WorkPhone = o.WorkPhone;
user.CreateTime = o.CreateTime;
return user;
}
It is just transefring data from one place to another
|
|
|
|
|
I'll assume UserId is the primary key for the entity. In which case AddToUsers will not always work as I think you are expecting it to. If a user already exists then you want to update it not add a new one.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I agree with you. But for testing purposes iam sending a new userid every time.
and it still does not work and more importantly does not throw an error
|
|
|
|
|
A wild guess: could it be you have two databases, one you are looking at, and one your app is working with (and which gets copied by your build process)?
|
|
|
|
|
I am getting this message when I attempt to run a report in my WinForms app:
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception
I have spent the last week Googling and researching this. I have tried many different things, and I'm still getting it. It doesn't occur on my development machine, only on my test box.
I know there's not much here to go on, but I'm really stuck and I have to deliver this soon.
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
Among the things you tried, did you do a reinstall?
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Reinstall what?
I have reinstalled my app multiple times. Reinstalled CR multiple times.
Been there, done that.
Everything makes sense in someone's mind
|
|
|
|
|
i ve developed an audio mixer working for wave files.i need to save the recorded wave file in compressed format.so need a c# code for that.also code for taking mic input........
|
|
|
|
|
Are you expecting someone to write code for you?
I'll do it, but I charge $100/hour. If you're interested, email me. Otherwise, take a look here:
http://lmgtfy.com/?q=C%23+Audio+Mixer[^]
Everything makes sense in someone's mind
|
|
|
|
|
Man, you're expensive.
Regards,
Rob Philpott.
|
|
|
|
|
You get what you pay for.
Everything makes sense in someone's mind
|
|
|
|
|
I'll take the offshore approach and do it for $40/hour
Of course it will be late, of poor quality and need to be rewritten
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yup. You get what you pay for.
Everything makes sense in someone's mind
|
|
|
|
|
how about 10$/hr... i will keep billing u... and u can keep waiting
|
|
|
|
|
Afternoon,
Subject just says it all really. I need to communicate with a mobile device over bluetooth from a PC. I've been reading stuff that suggests a virtual COM port is the way to go, but I'm hoping there's a better way.
Anyone had any experience of this stuff?
Regards,
Rob Philpott.
|
|
|
|
|
|
Thanks dude. Any good do you know?
Regards,
Rob Philpott.
|
|
|
|
|
The library which you can download has a good set of classes which can be used to do a variety of tasks.
|
|
|
|
|
Hi,
I want to take a screenshot of a mdi child in my parent form.
But i can't seem to be able to get the exact location of the child form.
The result of the screenshot is always taken to high and to much to the left.
How can i get the absolute position on the screen of the mdi child?
grtz
|
|
|
|
|
I'm trying to use my Qt application to implement WCF. I would like to know if Qt supports WCF... Pls suggest..
|
|
|
|