|
Hi Guys
I am trying to write GoalSeek method of excel in c#, can anyone help me to get the algorithm behind Goal Seek, do not give me the VB examples, need something more generic.
Thanks in advance.
happy coding!
|
|
|
|
|
Have you Googled for [^]?
(At first sight, your task appears a bit complex )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi,
Hope this is the right place to ask, I have the following problem:
I have a .Net 2.0 Forms/C# solution in visual studio 2005, running on windows Vista Ultimate (both fully up to date with patches).
When I open up VS2005 and select the project from the VS Start page, weird stuff starts to happen: While loading the project, VS decides to spontaneously start up the application (without me having touched any buttons).
I can't stop the program once it's running from the IDE: shift-F5 and the debug menu don't work. But as soon as I close my app manually, Visual Studio sometimes crashes immediately.
This happens about a third of the times I open my Visual Studio project. But if it doesn't, there's always a chance of it happening at some random time while I'm happily coding about: My project will just start to run spontaneously: No compiling or anything, just running the version I last compiled.
I've had this VS installation for over a year now, never had any problems with it. The problem only seems to occur with one specific solution: I don't have it with any other solutions I made.
Any advice?
Standards are great! Everybody should have one!
|
|
|
|
|
You have an exe maybe in your source control? I have never heard of this, so that is the best guess
|
|
|
|
|
Nope, no exe files in my solution. Haven't been able to even find someone with the same problem on the net and have been searching all day. This must be the weirdest problem I ever had.
Standards are great! Everybody should have one!
|
|
|
|
|
That is weird indeed. Maybe something stuck in the addin manager? Maybe a rogue plugin?
|
|
|
|
|
I need to display content printed from a third party control in another third party PrintPreview control (SpreadsheetGear and Infragistics controls, by the way). The c# Printdocument only allows you to "draw" what is to be printed manually, by means of the Graphics interface. For my data that is contained in a spreadsheet and can therefor be anything at all, that is not a valid solution at all. Is there any way at all to rather "intercept" a PrintDocument from a print job, and then bind that to a PrintPreview control?
Armand Smit
S-Tech Software Developers cc
|
|
|
|
|
I am working on a program to display pupil essay homework data.Making the program define class pupil and class homework. Program to display hardcoded data for homework such as 150words, word friend in text etc. User of program to be able to enter keywords to be checked for and be able to request to see such essay homework data for a pupil.
Any clues how to get on such a task ?
|
|
|
|
|
Learn a programming language, learn the associated libraries that go with the language and then create the application.
All of this should be relativly straight forward with books and online resources such as the MSDN, or you could even find someone to teach you.
|
|
|
|
|
As a beginner am confused on the whole thing
|
|
|
|
|
|
Really confused on how to connect objects of class student and objects of class homework.
|
|
|
|
|
Buy a book, take a class, or learn how to use Google. I know this is going to sound harsh, but we expect people here to at least have an understanding of the very basics of what they're trying to accomplish. We can't possibly be expected to teach you the basics.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi there,
how can I add any number of radio buttons to a panel in C# code , in other words : how can I add radio buttons during run time to a panel in C# application
Thanks in advance
|
|
|
|
|
You can use a RadioButtonList and add the items in the serverside code, you can also use its datasource property and dtabound method to bind the list from the database, or just use Items.Add if you want to hardcode the list.
<edit> sorry i assumed that you were using asp.net fogot i changed forums. there my be a similar control in winforms i cant remember, or you might be able to add them to the forms or panels control collection, but positioning them correctly would be difficult, it may be easier to have a fixed number and just show or hide them.
modified on Monday, May 19, 2008 8:56 AM
|
|
|
|
|
thanks for answering ,
but I did not find such control in windows form
and I need the number of the radio to be for example from the user , so I should create as many as the user needs
when I tryed to use Controls.Add of the panel , it added only one radio button,
should I change some of the properties of the panel ?
Thanks
There is always something to learn
|
|
|
|
|
each time you call Add it will only add one button you'd have to use a loop to add multiple, but then finding them in the form to do something with becomes slightly difficult but not impossible. or if you knew the maximum number of controls you could have them already there but just invisible then go through and make them visible for each case. I'm not sure how well the layout will work if you add them via a loop and the Controls.Add method, and you have the possibility of adding controls that the user cant see or interact with.
|
|
|
|
|
mmmmm, thanks for replying
the fact is: there is no max number of those radio buttons ,
also I am already using loop , but still I only see the first radio button in the run instead of all of them
any other ideas!
thanks again
There is always something to learn
|
|
|
|
|
If there's no max number, then you'll have to resize the form to fit all of the controls.. However Have you tried creating a new control in the code i.e. RadioButton rb = new Radiobutton(); then setting its x,y coordinates to something, they may be defaulting to 0,0 and just appearing on top of each other. you'll have to use those settings to make sure that they are all visible to the user and visible so that they can be clicked on. Also if you do this after the form has been shown they user may notice a delay and/or see the controls appearing and the form resizing, which isnt the best in terms of UI, some users may freak out a little bit.
|
|
|
|
|
that was very helpful,
Thaaanks a lot
There is always something to learn
|
|
|
|
|
You're welcome and thanks for ranking my replies. helps me know how good my answers are.
|
|
|
|
|
Hey guys...
i need so send a couple of parameters to a crystal report...
does anyone know any good articles on the subject?
thanX
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
|
Hi there,
After reading msdn, looking for answers in google and testing a lot of different things, I gave up and now I'm here hoping for an answer.
The Problem:
I'm having a big problem trying to delete a row from a DataTable wich is related to its father. The exception I'm receiving is "Null Reference exception" (or something like that, my visual studio isn't in english)
The structure:
DataSet dsData contains:
DataTable dtbClients -> PrimaryKey: 'MotherAccount'
DataTable dtbAccounts -> PrimaryKey: 'ClientName'
DataTable dtbProducts -> PrimaryKey: 'CodeProduct'
Wich are related like this:
dtbClientes -> dtbAccounts (through column 'MotherAccount')
dtbAccounts -> dtbProducts (through column 'ClientName')
The data:
In this specific case, dtbClients has only 1 client wich has 1 account (in dtbAccounts) with no products.
What am I tried to do:
First I tried to remove the client directly because I though that the cascade constraint automatically created when we make a relation would take care of deleting the associated row in dtbAccounts. But that didn't happend.
The application threw and Null Referenec exception, and the stackTrace pointed to a function with 'Cascade' in its name.
Question 1): Is it possible to fix this exception and make c# delete everything associated to the removed client?
Well, with this exception I quited trying to delete the client directly and tried something else.
This time I'm removing the account related to the client first, this way when deleting the client there would be no problems since there are no rows related to it (I've no problems deleting clients with no accounts associated).
The problem:
It gives me the same Null Reference exception when trying to delete the account first! And it doesn't have any product related to it. My guess is that somehow the parent row(client) is related to it, so I can't delete it.
Question 2): How do I delete this account?
Can anyone help me with this ?
I hope I was clear enough.
Oh, another thing,
What I'm trying to do over there is actually one part of a mergin process of 2 datatables.
Actually is not a merge, it is an update.
The old dataset will be updated to look exactly like the new one, wich means that new rows will be added, old rows will be updated and old rows will be removed.
Well, I've just discovered the DataSet.Merge(DataSet) function and it is quite usefull.
The problem is that it doesn't seem to remove old rows in the target dataset that are not in the (updated version) source dataset.
Is there a way to do this not manually? A function? A property? I don't know... something that would make the Merge function delete rows from the target dataset.
Thanks in advance!
Oscar
|
|
|
|
|
Hello,
I'm trying to read messages from an outside source that orks on 30HZ (every 33 msec there is a new message).
I tried to use the udp classes in .Net but I discovered that althogh 80% of the time the messages reciveing interval is about 33 msec, sometimes i get picks of 50 and more.
1. How would you solve it ?
2. Is it beacuse it is a UDP connection ?
3. Can I recieve in a diffrent way (using dllimport to some udp recieving dll for example ?).
thanks,
|
|
|
|