|
first sorry if I give'nt you a good answer because I dont undertand you a lot, ok this is fact:
if you need know the process data of this 4 thread, you can use many tools, such as delegate, create a delegate and add all this function inside this, and then put the delegate on execution, for more explanation look this example, using a ProgressBar...
public delegate void ExceutionAsyncronous();
public void function1(){}
public void function2(){}
public void function3(){}
public void RequestTime(ProgressBar som, int value, int max)
{
som.Increment(value++,max);
}
inside your function put this method "RequestTime" in a way that the increment always keeping inside a correct interval, an then ...
ExceutionAsyncronous ob = new ExceutionAsyncronous(function1);
ob+=new ExceutionAsyncronous(function2);
ob+=new ExceutionAsyncronous(function3);
ob();
Remember that this explanation only want give you a Idea, ok
if you need know anything else, please write me ok
|
|
|
|
|
my app language is arabic but the pc that I will deploy this app on it does not support the arabic language . I want my app to solve this problem from whithin it.at the setup project.
Dad
|
|
|
|
|
What you are talking about is called localization. In brief; Localization is determining the culture -i.e. the interface language,\among other things of course- of your program at runtime, allowing your program to support multiple languages based on the choice of the user.
If you want to know more about localization click here[^].
Regards
|
|
|
|
|
...i have the following problem: i have a windows service that when it starts opens the serial port COM1 and then listens on it. Once it receives something(a code) it does something to winamp(depending on the code received e.g. 1=play,2=stop...etc.).to see if it works i have connected pin2 with pin3 of the serial port and i have added a timer in the service which from second to second sends a code to the serial. when i install the service and start it it does nothing to the winamp...i have debugged the code and found out that the function associated to winamp function is executed with no errors (
IntPtr hwnd = SerialPortListner.PortListener.FindWindow(windowName, null);
SerialPortListner.PortListener.SendMessageA(hwnd, WM_COMMAND, WA_STOP, WA_NOTHING);) when the timer event is raised...but i do not know why it does nothing to winamp(play,stop...etc). If i put the exact same code in a windows application it works perfect but in the service it does nothing...
...can u help me pls... thx in advance!
|
|
|
|
|
George_Lucian wrote: i have debugged the code and found out that the function associated to winamp function is executed with no errors
Does that mean that the message is actually sent to winamp? Did you use Spy++ to check that out? Try to send WM_Minimize or WM_Close messages to notepad for example and use Spy++ to see if you service does send these messages.
Regards
|
|
|
|
|
I'm using interop.word.dll component in my application to use MS Words features in my application. I'm able to hide the default control bars. But how do I disable the context menu? I dont find any function for that. Please help.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hi folks,
Consider a MyEntity class that's being marked as SerializableAttribute . The object is exposed to the outer world through the following web method:
[WebMethod()]<br />
[SoapHeader("Credentials")]<br />
[SoapDocumentMethod(Use=SoapBindingUse.Encoded)]<br />
public MyEntity GetMyEntity()<br />
{<br />
}
Well, I've to mark the web method with SoapDocumentMethodAttribute , or else, the XMLSerializer doesn't have any idea of how to serialize/deserialize the object. I've also altered the reference.cs file (the proxy file generated for the web service automatically) so that it will uses my business_objects.dll to handle objects, the file that hosts the MyEntity class.
The problem is that whenever the GetMyEntity() function is called, the service proxy tries to construct the object using the properties exposed on MyEntity class, using the default constructor of the class. How am I supposed to instruct the proxy to use the class constructors to get the job done? How am I supposed to control the serialization/deserialization process of the entities?
Please keep in mind that the MyEntity class uses circular references, and therefore, the XMLSerilizer or Literal encoding *cannot be used* to handle the issue.
Any help would be highly appreciated,
TIA,
Mehdi
|
|
|
|
|
Keep in mind there are 2 classes involved in this case. On the server your MyEntity class exists as you have defined it. On the client there is a MyEntity class created when you generate the WebReference this class is a simple data class that just has public fields defined which match the public properties of the class defined on the server.
When you write a web service, it is really just a collection of static methods which return simple data objects.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I think you missed the part that I said: "I've also altered the reference.cs file (the proxy file generated for the web service automatically) so that it will use my business_objects.dll to handle objects, the file that hosts the MyEntity class."
This means that those classes you've mentioned do not exist any more. It now uses my business_objects.dll on the client (and server)... So what? What am I supposed to do to handle the Serializing/Deserializing the objects as needed?
TIA,
Mehdi
|
|
|
|
|
Mehdi Mousavi wrote: What am I supposed to do to handle the Serializing/Deserializing the objects as needed?
You aren't. The proxy classes are designed to just instantiate a data class they weren't intended to do what you are trying to do. I'd write a wrapper around the proxy class that converts between your objects and the proxy object data objects. That would probably get you the closest to what you are trying to accomplish.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
HI all turned on VS2005 this morning and had a shock. My Tool Bar has gone hay wire The General tab has renamed itself #13119 and my Report Item Tab has replaced all the reporting controls with text boxes when I chose for a reset all it does is add another text box in the tab. So I reinstalled/repaired VS2005 and the problem has not been fixed does any one know what i have done to mess my system up and more importantly how to rectify the problem.
Many thanks
|
|
|
|
|
Look up /resetsettings command line for the IDE.
|
|
|
|
|
Thanks been playing about un-installing reinstalling VS2005 for the past day now
the tool bar now seems to work but I still get the following in the output window upon loading
The ReportDesignerPackage ({11B8C903-8FFD-4DFC-87CE-F6A82D77AF6B}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.
The DataWarehouse VSIntegration layer ({4A0C6509-BF90-43DA-ABEE-0ABA3A8527F1}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.
|
|
|
|
|
Hey guys,
I have a date string (dd-mm-yyyy) which I want to convert into a yyyy-mm-dd string (i'm retrieving the string from a plain XML file, but that doesn't matter)
I though creating a string array, inverse that, and create a string again would solve my problem, but I didn't get an inverse method on the string array. What is the quickest way to accomplish this?
|
|
|
|
|
Read the date and then output it using one of the date conversion formatters. It's far simpler.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Problem is that most of the time, the DateTime.TryParse won't return true on the string, which means .NET cannot convert it to a valid datetime object. That's exactly the reason why I want to convert the string the other way around...
|
|
|
|
|
Did you try the TryParseExact method? It allows to specify an expected format (amongst other things).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Yeah, that's pretty much the solution I was looking for...
created two functions, one checks for a date and returns a boolean whether the string is a valid date or not
return DateTime.TryParseExact(Value, "dd-MM-yyyy", null, System.Globalization.DateTimeStyles.None, out dtOut);
The other function returns a datetime object of the converted date
return DateTime.ParseExact(Value, "dd-MM-yyyy", null, System.Globalization.DateTimeStyles.None);
Both work fine, thnx guys!
|
|
|
|
|
You might need to change your system culture.
|
|
|
|
|
Something along the lines of this?
string date = "12-12-2006";
DateTime time = DateTime.Parse(date);
string newdate = time.ToString("yyyy-MM-dd");
|
|
|
|
|
you can use
Convert.ToDateTime("string");
too
|
|
|
|
|
Hi everyone!
Please tell me how can i restrict only one child window in MDIParent?
Does Microsoft Word 2003 use MDI with only child window?
I have made child window and made it Maximize and Minimze button "false" and its window state "Maximized" but it doesn't give desired results. It shows Minimize and restore button in Main Menu bar.
Please tell me what to do ?
Thanks
|
|
|
|
|
Microsoft Word 2003 uses a different type of option called Multiple SDI. .NET 2 has this option available to it by deriving your form class from WindowsFormsApplicationBase. An example can be found here:
http://en.csharp-online.net/Application_Architecture_in_Windows_Forms_2.0%E2%80%94Multiple-SDI_Applications[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks.
I have used this in my application. I have made
"Multiple Single Document Interface" for the Main Form of my application.
But now that Main Form is an MDI Parent Form. If I open first instance of application that gives me option to create a new file under the "File Menu". Now I want that file to show only close button in Menu bar and take all the MDI parent client space.
Is that possible?
I have made my Main Form as MDI Parent. I used to create new file using file menu, but how i can emit minimize and restore button in the menu bar. I want to show only close option.
|
|
|
|
|
please tell me how one child can be shown if Parent Mdi has Main MEnu and Toolbar.
I create Mdi child it doesn't fills whole client area of MdiParent.
Also when i close the MdiParent icon bar of child takes space up on the MdiParent Main Menu for a while and form closes although i have disabled child control box.
|
|
|
|