|
Hi Guffa,
My problem is that I don't know how to write a bytearray chunk by chunks.
Say I already have byte[] Data, and I want to write it 1024 bytes at a time.
Regards
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Use a loop.
Example:
int pos = 0;
int left = data.Length;
while (left > 0) {
int len = Math.Min(left, 1024);
stream.Write(data, pos, len);
pos += len;
left -= len;
}
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Exactly what I needed! Thank you!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
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)
|
|
|
|