|
Well!
The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
That's true.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: codeadair wrote:
The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
That's true.
I need to display the data to user.And how could i deal with it?
Do be grateful for your help
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: I need to display the data to user.And how could i deal with it?
You need to use a delegate to invoke a method on an object not created by your thread.
Sometime back I had the same problem showing a custom dialog sometime back from a different thread. But fixed it later using delegates. Don't remember the exact thing. It's been a long time.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Yes!Sometime ago the idea flash over my brain due to internet article.
OK! i will try the idea!
Thank you!
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 8:21 Thursday 25th May, 2006
|
|
|
|
|
codeadair wrote: thanks for your reply
integer number. the range is 0~20000.
Then I am not sure what's going on.
codeadair wrote: i need to read data from a equipment continuously.
Is this the problem? How much time does it take to interface with this equipment?
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: Is this the problem? How much time does it take to interface with this equipment?
1ms
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
hello guys,
anyone can give me a simple/brief sample code on how to convert text file to xml file
in vb.net.
thanks
-- modified at 0:39 Thursday 25th May, 2006
|
|
|
|
|
That's a strange question. an xml file IS a text file. What's the format of this text file ? Do you have an XML schema you want to conform to ? Are you hoping for an automated process ? About the best you'll do there, if it's for arbitrary files, is to put <XML> at the top and </XML> at the bottom, which is of no value whatsoever.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a Date in the mm/dd/yyyy format(eg. 3/31/2006) how to convert it to dd/mm/yyyy format(ie. 31/3/2006). Both must be in Datetime or Date format... I want to achieve it quick. Is there a function in VB.NET to do that?
Regards,
Pedestrian
|
|
|
|
|
|
Please use function as follows:
Format(System.DateTime.Today, "dd/MM/yyyy")
In place of System.DateTime.Today, you can use date variable
Kumar Prabhakar
|
|
|
|
|
Actually you should avoid using this below. It is contained in the Micorsoft.VisualBasic namespace, which should really be avoided. It is not using the .Net Framework directly, but a VisualBasic wrapper around the .Net framework.
Format(System.DateTime.Today, "dd/MM/yyyy")
Mike Lasseter
|
|
|
|
|
If not using Format function... is there a better solution for VB.Net to convert the date format?
Regards,
Pedestrian
|
|
|
|
|
This
Dim myDate As Date = Date.Now
myDate.ToString("dd/MM/yyyy")
is different than this
Format(date, "dd/MM/yyyy")
Take out the reference to the Micorsfot.VisualBasic Namespace and you will see what I am talking about.
Mike Lasseter
|
|
|
|
|
Hi, I am writing this in hopes that someone out there can help me with the creation or a work around for how to write custom events in vb.net.
eg.
public event CustomEvent as Something
{
add
{
this.Pevent+=value ;
}
remove
{
this.Pevent-=value;
}
}
All that I can do in vb.net seems to be
Private event Pevent as SomethingHandler
Public event CustomEvent as SomethingHandler
I need this event to occur when the user clicks in a cell of a datagrid. It will addhander through a private function. But, I don't know if this is possible or how to do this in vb.net. Help please. Thank you.
eatwork
|
|
|
|
|
Something like this (obtained with Instant VB after adding a delegate declaration):
Public Delegate Sub Something(ByVal sender As Object, ByVal e As System.EventArgs)
Public Custom Event CustomEvent As Something
AddHandler(ByVal value As Something)
AddHandler Me.Pevent, value
End AddHandler
RemoveHandler(ByVal value As Something)
RemoveHandler Me.Pevent, value
End RemoveHandler
RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
End RaiseEvent
End Event
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
Hi David,
Thank you for your response and solution. I will give that a try, but it looks like it should work. Thank you.
eatwork
|
|
|
|
|
There is an even better way to do this now in Visual Basic for .NET 4.0:
Here is a perfect example of using Visual Basic's Custom Event which also includes new multi-line Lamda's which were available in C# and not VB. I switched to C# since it always seemed ahead of VB and have been really happy yet with .NET, you can always mix and match so can still use things like VB's inline XML for parts of your solution. What is disturbing to me though is that the more I learn about non-Microsoft languages, the more I find out that a lot of this stuff has been done before. Now I just try to learn everything which is impossible and has caused me to go Col. Walter E. Kurtz... The Horror, The Horror...
Here is the link to Bill Wagner's amazing code(It's topic is Tuples feature yet there is a rework of his October 2009 article code using Custom Event, Tuples, and Multi-Line Lamda's that is a perfect example of what you can do and shows what you wanted as well):
|
|
|
|
|
|
hello
i am facing a very small problem related to combo box actually i want to disable text input in combo box like when i run my form u can select an item and u can also modify it although u cant save the changes but why it happens i want to disable not the combobox but only the text writting cursor so u cant write any thing in it so plz help me as soon as possible thanks
|
|
|
|
|
Set the combo box's "DropDownStyle" to "DropDownList"
|
|
|
|
|
ya it works but it don'nt show the display text like "select country" how i can do it
|
|
|
|
|
Set your Text Property to "Select Country"
|
|
|
|
|
Hi,
Directly you wont be able to assign that. What you need to do is when you are binding it at that itself you add that to your datasource.
Best Regards,
Apurva Kaushal
|
|
|
|