|
Hi All,
Any1 of you know how to print a rdlc directly without going through report viewer in window application?
I have spent almost a week but still could not sort it out. Hope you guys can help me on this.
Thanking you in advance.
|
|
|
|
|
Hello everyone,
I am working on a Windows Application which deals with lots of data transformation between the user and a remote database. In order to keep the user informed with all the Data going back and forth between the user and the remore database, I would like to have a Child Window pop-up showing the progress.
I was wondering if anyone can point me into a right direction or a tutorial so I can get this done.
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
If you're doing a single action, you can't show meaningful progress, and if you're making lots of DB calls, turning them into a single call will make it much quicker.
You need to perform your action in another thread, so the UI does not die, then you can show a scrolling progress bar in your main thread.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Gents,
I'm experimenting with indexing and I came across the following problem that I cannot fully grasp.
I have a combobox filled with stuff ( the collection items ). I want to remove it all at once so that the collection is empty again. So after some thinking I though I try the follwing :
private void ClearComboBoxes()<br />
{<br />
for (int x = 0; x < cmbtrackWhere.Items.Count; x++) <br />
{ <br />
cmbtrackWhere.Items.RemoveAt[x]; <br />
}<br />
}
It gives me the error : " Cannot apply indexing [] to an expression of type 'method group'
I assign the value zero to the integer x , count the items in the collection and add 1 to x if necessary until x is equal to the number of items in the collection. Then I remove each item on index [x] from the collection.
Am I thinking in the right direction ? .. can anyone briefly explain to me what I'm doing wrong and why it fails ?
kind regards,
|
|
|
|
|
If you want to remove all of the items in a combobox, you should use:
<br />
cmbtrackWhere.Items.Clear();<br />
This will remove them all at once.
If you are trying to remove an item at a specific index, i think your code should be something along the lines of:
<br />
cmbtrackWhere.Items.RemoveAt(x);<br />
|
|
|
|
|
So the mistake was to use square brackects; RemoveAt is a method, it needs parentheses.
Furthermore, as soon as you remove an item, all the higher-numbered items get moved
down one positition, so if you need to remove al but the first N items the correct
code would be:
for (int x = N; x < cmbtrackWhere.Items.Count; x++) {
cmbtrackWhere.Items.RemoveAt(N);
}
This loop continues to remove the first unwanted item, until there are no more unwanted
items left.
There is of course the alternative to remove them in reverse order:
for (int x = cmbtrackWhere.Items.Count-1; x>=N; x--) {
cmbtrackWhere.Items.RemoveAt(x);
}
Of course, if you want to remove everything there is the Clear() method to do that.
|
|
|
|
|
Hi guys,
I need some help. I have a crystal report that I am trying to point to and print. I have to pass datasource name, database name, pwd, etc also I need to pass one parameter. Can anybody help me with this, I get the password failed error and before that it opens a dialog box asking me to save an image. Weirdddd
Please help
sasa
|
|
|
|
|
Hey all. Is there anybody that’s interested in helping me with some mono/linux/C/C# dev.
I'm trying to get mono/C# integrated with a open source project www.freeswitch.org
I'm need the help from somebody that’s familiar with C/C# and marshalling.
If this has anybody’s interested please let me know.
Martin
|
|
|
|
|
Hello
I use application's configuration settings to store user's preferences. when I launch the program manually it works well and saves and retrieves all the settings but if I add the program to windows startup then when the program is launched settings are not retrieved and aren't saved either. Why does it happen?
|
|
|
|
|
how to open a MS word file through a label link in the application
|
|
|
|
|
Either use process class to open the needed file or if you need more control over the document then use word object model
|
|
|
|
|
i couldn't do what u told me
plz can anyone help
|
|
|
|
|
Which method did you try?
|
|
|
|
|
Dear all,
i am doing some analysis on RC4 TKIP.I want to create an RC4 key and XOR it with data.My RC4 key is Ok.But i want to pass it as a parameter so as to do encryption.
Can anyone among you help
Thanks
NB
|
|
|
|
|
NalBH wrote: encryption in C of RC4
Then perhaps you should ask in a forum about C, not C#.
NalBH wrote: i am doing some analysis on RC4 TKIP.I want to create an RC4 key and XOR it with data.My RC4 key is Ok.But i want to pass it as a parameter so as to do encryption.
Can anyone among you help
Maybe if you explain why this is a problem. You have only explained what you want to do, but not why you need any help with it.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi guys,
I am having a weird problem and desperately need your help. I am trying to end the while loop with a timer. Here is how I am doing it.
public int status=0
in my function I have the following:
MessageBox.Show(this,"Please click on Ok to continue");
timer1.Enabled=true;
timer1.Start();
while(status!=1)
{
Thread.Sleep(500);
if(status==1)
{
break;
timer1.Enabled=false;
}
}
in my timer tick function I am asking the question whether they want to keep waiting and if they press no then I am changing status=1 and breaking the loop. My timer code doesn't get executed for some reason. I believe while loop blocks the message from the timer_tick, is there a way to allocate resources while in the while loop. Somehow force the message while in the while loop. I hope I am making sense. Please help!!!
sasa
|
|
|
|
|
I dont see any timer event wiring
|
|
|
|
|
I have a timer_tick event, i didn't add that code
sasa
|
|
|
|
|
I would not use the while(status!=1). Look into thread synchronization objects such as ManualResetEvent or AutoResetEvent and replace it with WaitOne
only two letters away from being an asset
|
|
|
|
|
You are blocking the main thread with your loop, so there is no thread that is handling the messages. The timer component is driven by messages from windows, and when there is no thread that handles the messages, the component doesn't get any tick events.
You should handle this without a loop, just disabling the parts of your application that should not be available while the timer is running. You can put a DoEvents() call in the loop for a quick fix, but you have to add code to prevent reentering the function regardless of how you handle it.
If you need a loop to do some heavy work, you should do that in a backgrond/worker thread instead of in the main thread.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you Guffa for your comments, i understand what you mean. Basically what I am trying to do is wait for a response and while waiting I want the timer to ask if I still want to wait, can you please guide me on how to go about this without a while loop.
Please!
sasa
|
|
|
|
|
What do you want the program to do while waiting? Or perhaps more important, as a program almost always is waiting for someting, what do you want the program not to do while waiting?
---
single minded; short sighted; long gone;
|
|
|
|
|
Here is what I am doing, I am working on Symbol signature pad, in the timer I am waiting for the user to sign and click on the enter button on the signature capture. Basically, in my while condition I am checking if the user pressed the enter on the signature pad. But I need a timer in case the user never signs and walks off or something, you know what I mean.
I used the doevents() and it works but as you mentioned this is not a good solution. I am not sure how to go about this issue. Please advice
Thank you very much for all your suggestions.
sasa
|
|
|
|
|
Hi Guffa,
I am sure that was a rhetorical question.
I expect every one wants a program to remain responsive, so one can move the forms,
minimize/maximize; and even cancel lengthy operations.
In technical terms that means the GUI thread should never spend
more than say 100 milliseconds on some calculation, and should not include
long loops (with or without Sleep calls in them).
Actually, the GUI thread in many regards resembles an Interrupt Service Routine:
it should be swift and delegate everything that may take a while or could be blocking
to another thread; and hence it should not include delays at all.
Greetings
|
|
|
|
|
Luc Pattyn wrote: I am sure that was a rhetorical question.
No, it wasn't.
I believe that you misunderstood it, and that the way you understood it, it might make sense to be rhetorical.
Luc Pattyn wrote: I expect every one wants a program to remain responsive, so one can move the forms,
minimize/maximize; and even cancel lengthy operations.
Yes, that's what I mean when I am talking about that an applications usually is waiting for something. It's waiting for the user (or the system) to do something that it can react to.
When I am talking about what an application should not do, I mean the things that should be disabled while something else is happening. If the application is waiting for some process to finish, it should probably not be possible to start the process again until the first has finished.
---
single minded; short sighted; long gone;
|
|
|
|