|
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,
|
|
|
|
|
You're using an inaccurate clock. The Windows tick timer (Environment.TickCount ) ticks at a frequency of around 15-16ms, so you will normally see durations measured with this timer as being some multiple of 16ms. Try using the Stopwatch class instead, if using .NET 2.0 or later.
That said, UDP is always susceptible to network delays. Routers can delay or drop packets if a link is saturated. LANs will drop packets and have to retransmit if two stations try to send at the same time (this is referred to as a collision). You would need a dedicated link to avoid the possibility of a collision.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
nope, i'm using the multimedia timer, which is just as accurate as the Stopwatch.
|
|
|
|
|
Hello everyone,
Here is my code to make a duplicate value copy of all the Values in a dictionary instance -- not just reference. So, I use CopyTo method.
My current issue is, I think my code is stupid but do not know how to solve it. My specific concern is,
1.
the code Foo[] FooArray = new Foo[3] creates 3 new instances of Foo, the code dic.Values.CopyTo(FooArray, 0) will overwrite the 3 new instances of Foo? So, seems it is stupid to create 3 new instances of Foo in Foo[] FooArray = new Foo[3], but never use them and overwrite them? Any ideas? Is it an issue?
2.
Maybe I am wrong, the code Foo[] FooArray = new Foo[3] creates only references variable of Foo class? Not class instances variable themselves?
class Foo
{
public int abc;
public Foo (int i)
{
abc = i;
}
}
public static void Main()
{
Dictionary<int, Foo> dic = new Dictionary<int,Foo>();
dic.Add(1, new Foo(10));
dic.Add(1, new Foo(20));
dic.Add(3, new Foo(30));
Foo[] FooArray = new Foo[3];
dic.Values.CopyTo(FooArray, 0);
return;
}
thanks in advance,
George
|
|
|
|
|
George_George wrote: the code Foo[] FooArray = new Foo[3] creates 3 new instances of Foo
Buzz! Wrong!
It allocates an array with 3 spaces for Foo. It does not instantiate any Foo instances, only an instance of Array . Dont believe me? Try accessing one of them:
Foo[] FooArray = new Foo[3];
Console.WriteLine(FooArray[0].abc.ToString());
|
|
|
|
|
Thanks J4amieC!
So this code Foo[] FooArray = new Foo[3] will only create 3 references and make them refer to NULL? Then code dic.Values.CopyTo(FooArray, 0) will create 3 instances of Foo class, and assign the 3 NULL references variables in FooArray to point to the instances?
regards,
George
|
|
|
|