|
Thanks for ur reply. I had already set Autoscroll property to true. But I am still not able to increase sixe of the windows form.
Thanks,
Sandeep
+919891027854
|
|
|
|
|
I'm not sure that this is the place for my question
but I really need your help on this one.
Is there any way to pass parameters to Crystal Reports
to be used in a query without calling a stored-procedure?
|
|
|
|
|
Below is an example Exception.String copied from a MessageBox. How does one extract the exception information individually? The Exception class allows access to some of this information individually such as Exception.Message, but not all. Relevant to my use would be to extrat the information on the last line where it gives location information about the error. Do i have to use Regular Expressions on Exception.String or is there an easier way?
System.ArgumentNullException: Path cannot be null.
Parameter name: path
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding)
at App.Settings.Save() in c:\_apps dev\music\sndfileconvert\build_00_01_03_004_csnet\main\settings.cs:line 251
|
|
|
|
|
redfish34 wrote: The Exception class allows access to some of this information individually such as Exception.Message, but not all.
Yes, it does. All information in the message box comes from the exception object, where else would it come from?
The location information is in the StackTrace property.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the confirmation. It looks like if i want specific information from the StackTrack, i will have to parse the StackTrace string with RegEx. No biggie, just wanted to make sure i was not overlooking something.
|
|
|
|
|
Hi there,
What I want to do is to build a COM Server in C# and call it
from a VC++ Client(visual studio 6).
An example of that is found on :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkcominteroppart2cservertutorial.asp
However it's not detailed.The sample example explained provided
on that website doesn't open in the first place so that I can
track it down.
Whenever I try to use regasm or cl that are mentioned to be
command prompt commands I get that no such internal or external
command exist.
Here's what I did:
1-I created a C# project of type "Class library"
2-I have pasted the provided C# Server code in it
3-I set the "register for COM Interop" in the build properties
to "true"
4-I built the project,it was built successfully with no errors
5-I started without debugging but ofcourse it wont' run
In another article I found,it said that before step 4,I should
create a strong name for the assembly using the utitlity sn.exe
but I can't figure out how to use it.
http://www.codeproject.com/csharp/COM_Object_in_C_.asp
As for the C++ client, I just created a new C++ file and pasted
the code.After that I am unable to run the given commands
provided to know what to do next.
Can you please help me out?I am really stuck.
Cheers,
Eagle
|
|
|
|
|
Hello all,
I'm new to c# and I'm having a heck of time trying to figure out this problem. What I'd like to do is take an xml document that has repeating elements, break it up, and output several xml documents based on the split.
eg...take this
"root"
"whatever"
"something" blah "/something"
"else" blah blah "/else"
"/whatever"
"whatever"
"something" blah2 "/something"
"else" blah2 blah2 "/else"
"/whatever"
"whatever"
"something" blah3 "/something"
"else" blah3 blah3 "/else"
"/whatever"
"/root"
and output three xml separate documents, each containing "root", "whatever", "something", and "else".
I've tried a few things using xmltextreader and writer, but nothing has worked thus far. I'd image I need to store the original document in memory somehow and go forward from there...but that's the thing, I'm not sure how to do this. Any help will be greatly appreciated. Thanks.
ps i used "" rather than tags because i wasn't sure how to get the xml syntax how to appear on the page
-- modified at 22:53 Wednesday 14th December, 2005
|
|
|
|
|
I put a tabcontrol into my form, there are 3 tabpages and I want my user can switch between tabpages by pressing CTrl+tab. How to do this?
Note:my project has a mdiform, when I click menu, the form containing tabcontrol appear but if I press ctrl-tab, nothing happens.
I create new project with single form, add a tabcontrol into my form, when pressing Ctrl-tab everything is OK. Why?
Regards.
|
|
|
|
|
Hi everybody,
What is difference between a local time and a system time, Correct if I am wrong, system time is time of the system server where your computer is connected. So, if I would change system time I need to change the tme on the server. Right? How would you set(change the local time programatically? Also, using DateTime.UtcNow is to get system time? How to change the system time programatically? How to get and set(change) Time Zone? The System is a remote server and can be access through internet. How to cahnge the time at server?
The situation is this, if the application is to be used by say user from another country, they have their own local time and Time Zone Info, and their own system (server) time. I like these to be configurable. I know that to change timezone I need a class and method inside the System.Globalization. Can you help narrow it down or pinpoint it for setting and getting time zone? Also, how to get a list of Time Zone to be displayed in a Combo Box? Is there a method for this?
I am looking a direct method in setting or getting these values.
denpsia
|
|
|
|
|
Hello !
I am developing a Desktop base not Web base application in C# by using Visual Studio 2003 I want to show images in one column of datagrid against each Product Id by using Picturebox which is coming from Database I also want to raise events against the click and mouseover events of each picturebox Moreover I want to edit images too in Database by using "OpenFileDialog" in Datagrid plz tell me how can i do that????
Please also intimate me on my email address "abubakar.malik@gmail.com"
Regards,
AbuBakar
|
|
|
|
|
Is there a way to copy more than 1 textbox to the clipboard? I tried doing individual statements for each textbox but the last one is the only one that shows up.
textBox1.SelectAll();<br />
Clipboard.SetDataObject(textBox11.SelectedText,true);<br />
<br />
textBox2.SelectAll();<br />
Clipboard.SetDataObject(textBox2.SelectedText, true);
I need to copy the contents of 13 textboxes to the clipboard and somehow (if possible)paste them onto a Word document with a line break inbetween each field.
Any suggestions?
Thanks!
Apoc
|
|
|
|
|
How about this...
var content = textbox1.value + textbox2.value+...<br />
clipboard.setDataObject(conten,true);
Hope you get the idea...
<< >>
|
|
|
|
|
You rock!
Thanks so much!
Apoc
|
|
|
|
|
Hi,
After installing C# Express Install I have a COM error in an application.
Additional information: COM object with CLSID {10020200-E260-11CF-AE68-00AA004A34D5} is either not valid or not registered.
The object is the SQLDMO Interop.
How can I register the dll. I tried regsvr32 but a dll entry point error occurs.
Thanks for any help.
Stephen
|
|
|
|
|
I think the sqldmo.dll is replaced with a new sqldmo.dll (came with Express edition)
try finding it from another machine and copy it to System32 folder than
use regsvr32
i hope it works!
|
|
|
|
|
Thanks.
I uninstalled and reinstalled and it is all good now. Teaches me for installing it when I have other work to do.
Should of known better.
|
|
|
|
|
I am trying to figure out how to sent an event or set a callback when a thread finishes its work.
Lets say that I have 3 functions called:
1) GetData1()
2) GetData2()
3) GetData3() Each function depends on the results of the prior function in order to be able to do its work.
These threads cannot block the main application thread.However, GetData1() may block GetData2() and GetData3()
and GetData2() can block GetData3()
Each of these worker threads make calls to and XML server, and when a given thread finishes I need to start the next one.
The threads can take a long time to complete their task, meaning minutes and not milliseconds etc.
How can I know when a previous thread has finsihed?
Thanks
-- modified at 15:10 Wednesday 14th December, 2005
|
|
|
|
|
You can pass a delegate into the various BeginInvoke methods to have a function execute when the thread is done. For example,
ThreadStart method1 = GetData1();
method1.BeginInvoke(myCallbackFunction, null);
...
void MyCallbackFunction(IAsyncResult result)
{
}
Does this help? Or am I not understanding your problem?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hehe, stupid of me this is also a solution.
WM.
What about weapons of mass-construction?
|
|
|
|
|
This seems to be what I am looking for.
The snipit you provided doesn't compile, but I can look up the syntax.
|
|
|
|
|
It should compile under .NET 2.0 syntax (where delegates can be inferred from the method passed). If you're not using a C# 2.0 compiler, you'll need to explicitly create the delegates:
ThreadStart method1 = new ThreadStart(GetData1);
AsyncCallback callback = new AsyncCallback(myCallbackFunction);
method1.BeginInvoke(callback, null);
...
void MyCallbackFunction(IAsyncResult result)
{
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
-- modified at 15:40 Wednesday 14th December, 2005
|
|
|
|
|
Thanks that did the trick.
Sorry, but I am still in the stone ages using .net 1.1 and Visual Studio 2003
Thanks again
|
|
|
|
|
Well, it compiles but it doesn't ever call the callback function
Here is my callback function
void MyCallbackFunction(IAsyncResult result)
{
if( result.IsCompleted )
MessageBox.Show( "Callback triggered");
}
Here is how I am calling it
ThreadStart method1 = new ThreadStart(RequestVehicles);
AsyncCallback callback = new AsyncCallback(MyCallbackFunction);
method1.BeginInvoke(callback, null);
Thread tThread = new Thread( method1 );
tThread.IsBackground = true;
tThread.Start();
Have I done something wrong?
-- modified at 17:19 Wednesday 14th December, 2005
|
|
|
|
|
In that code snippet, you're calling RequestVehicles 2 times: once when you call method1.BeginInvoke method, and again when you explicitly create your Thread and call .Start on the thread. Just remove that explicit thread creation, it's redundant. Your code should look like:
ThreadStart method1 = new ThreadStart(RequestVehicles);
AsyncCallback callback = new AsyncCallback(MyCallbackFunction);
method1.BeginInvoke(callback, null);
void MyCallbackFunction(IAsyncResult result)
{
if( result.IsCompleted )
MessageBox.Show( "Callback triggered");
}
Note that if you used
Thread t = ...
t.Start()
it will not call any callback method. Only BeginInvoke does that.
|
|
|
|
|
Thanks I will try that directly
|
|
|
|