|
Thanks.
I found out how to shut it down.
Thanks once again
Nana
|
|
|
|
|
What should I write to kill exe?
Application.Exit()
or this.Close()?
Nana
|
|
|
|
|
i i am going to give my application to clint
and i wanna fine the installed time of his local machine
how can i find that --what code should i write for that while developing
thnx in advance
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
You should use DateTime object and you will something like "Now" member of that.
Manoj
Never Give up
|
|
|
|
|
See my answer to your other post on this question: http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=2044713#xx2044713xx[^]
Also, please don't double post. People here answer questions on a volunteer basis and will help as best they can when they have time to answer. Yes, questions do go unanswered for a variety of reasons, and it's acceptable to repost the same question after a while, but waiting a few hours and reposting because there was no response (which, based on the timestamps on the posts appears to be what happened) is not necessary.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi,
I am facing problem of COMException while opening MS-Word files on Windows Server 2003. I am refering Interop.Word.dll for opening MS-Word files to count the number of words from it.
I am using following API to open the doc files.
Word.ApplicationClass wordApp = null;
Word.Document aDoc = null;
aDoc = wordApp.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, <br /> ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, <br />ref missing, ref missing, ref missing, ref missing);
aDoc.Activate(); If I deploy above code on Windows 2000 professional then it works without error but if I deploy same code on Windows Server 2003 then I get following exception.
System.Runtime.InteropServices.COMException (0x800A1066): Command failed at <br /> Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles,<br />Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, <br /> Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, <br /> Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
Is there is other way to overcome this bug?
-- modified at 2:41 Saturday 19th May, 2007
#Abhi#
|
|
|
|
|
Hi!
Do you have the same version of Word installed on both machines? (or rather 3 machines: The development machine that created Interop.Word.dll plays a role, too)
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi,
Thanks for reply.
I have same version of Word installed that is Word 2003.
Just OS are different.
Abhishek J
|
|
|
|
|
Hi
First create the Instance of the application using "new".
Manoj
Never Give up
|
|
|
|
|
Hello All,
I want to catch scroll event of a list box in C#. I want to use two list box, and when one is scrolled the another should automatically be scrolled. What should I do for that.
Thanks.
Naveen
|
|
|
|
|
I would assign the relevent events for both controls to the same event handler and do a test to see which control is the active control and assign the relevant properties in the inactive control to the values in the active one. In order to find the relevant properties I would use google to find microsoft documentation on the list box.
If you do this and run into problems post again with your test code and what you are specificly having problems with and it is likely that someone here will help. Specific, focused questions are much better than general, open-ended ones. For more infomation on posting etiquette look here[^].
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
I am trying to increase the height of my StatusStrip... but it won't let me. Whenever I change the value from 22 to any other value, higher or lower, it automatically changes back to 22.
Any ideas how to change this? I want to make it 32 high.
Thanks in advance for any help.
--Peter
|
|
|
|
|
I know somebody just posted some code, that didn't quite make much sense... but it helped anyways. I saw in your code AutoSize set to true, well for some random reason this inspired me to turn off AutoSize. Once i turned off autosize then it let me change the size freely as I wished.
So to make a StatusStrip taller you just need to turn off AutoSize.
--Peter
|
|
|
|
|
Yes, the AutoSize property tells the Windows Forms layout system to automatically size the control based on it's "preferred size". This is either a hard-coded value or is based on the control's contents, or some combination.
When AutoSize is set to true , the layout system will happily ignore any manually adjusted size information you might provide. By setting it to false you are telling the layout system to display the control specifially in the size you specify.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
hi 4 all
need help from any one
need to store time (Hour and minutes ) in the data base without store date
iam tried it from date and time picker
thank you 4 all
|
|
|
|
|
I don't know whether you see datetime.
If you store hour and minutes, why don't you make two SmallInt fields to store each you want.
I don't think storing full datetime is useless. You completely choose hour and minutes from datetime as needed.
Hope the help.
It seem to be a solution or an answer.
|
|
|
|
|
From the datetimepicker control you will always get a DateTime object, so you will always have both a date and a time portion. If you only want to store the time, you can retrieve the hour and minute properties and store them either as formatted string or as two integer values.
When you read them back in from the database you will need to reconstruct a DateTime object which will give you a date portion again (set to today's date).
You may be better off storing the full date time in the database and just ignoring the date portion when you are manipulating the value.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi,
Smart FieldPackEditor.Net will allow you to do exactly that. You can setup a DateTimePicker with the content you want and databind each part individually, in your case just the time. There is a nice video about it at VisualHint. This component is in beta.
|
|
|
|
|
Hi
has anyone have any idea about the following error?
Message = Object is currently in use elsewhere. , StackTrace = at System.Drawing.Image.get_Width() at System.Drawing.Image.get_Size() at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.CommonLayout() at System.Windows.Forms.ButtonInternal.ButtonFlatAdapter.PaintFlatLayout(PaintEventArgs e, Boolean up, Boolean check, Int32 borderSize) at System.Windows.Forms.ButtonInternal.ButtonFlatAdapter.PaintUp(PaintEventArgs e, CheckState state) at System.Windows.Forms.ButtonInternal.ButtonBaseAdapter.Paint(PaintEventArgs pevent) at System.Windows.Forms.ButtonBase.OnPaint(PaintEventArgs pevent) at EES.ATE.TouchScreenControls.TouchScreenButton.OnPaint(PaintEventArgs pevent) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam
Actually I am updating a GUI's Button image in Backgroundworker class, I didn't use Invokerequired property. I suspect that would be the cause of this error. But this error has been captured Application_ThreadException event.
Any idea when this error will occur?
|
|
|
|
|
A background thread should never interact with the UI directly. Instead it should tell the main thread to do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Thats correct. But i read this BackgroundWorker class will not have any cross-threading issues. Is it right? also tell me is this error comes because of Cross-threading invalid operation?
|
|
|
|
|
engsrini wrote: But i read this BackgroundWorker class will not have any cross-threading issues. Is it right?
You still have to synchronise the threads regardless of how the thread is wrapped up.
|
|
|
|
|
The BackgroundWorker will not allow any cross-thread operations and will throw an exception if you try to do so.
You still need to have a basic understanding of how threading works even when using the BackgroundWorker . If you are trying to change the button image as the result of either progress or completion, you need to do so using either the ProgressChanged or RunWorkerCompleted events. (If you use ProgressChanged, make sure to set the WorkerReportsProgress property to true.
See http://msdn2.microsoft.com/en-us/library/system.componentmodel.backgroundworker(vs.80).aspx[^] for more details.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi there,
I have a DataGridView bound to a BindingSource, and this BindingSource is bound to a BindingList of custom objects.
The list is updated from another thread, and when it tries to update the DataGridView it (understandably) crashes because the control was created in the main thread while the list was updated in a worker thread.
I know you can use Invoke to solve cross threading problems but in this case I have no clue on what event I should use Invoke. I dont even know if I should be looking at the BindingSource or the DataGridView itself.
I've ran out of ideas and Im finding this pretty frustrating, any help would be greatly appreciated.
Thanks in advance!
|
|
|
|
|
Hello,
I have a program which is always running on user's computer.
And I would like to add an item to windows context menu (shell menu), with option to Backup a file (it's not a problem).
After user right clicks some file in explorer and then clicks "Backup this file", is it possible to send somehow file path argument to already running program?
|
|
|
|