|
Thanks for the reply..
just want to confirm that the join method will not get into any hang mode.
because i am calling the stop method by creating a object of dll and i dont have a thread in my application but the thread is present in dll where i have written the recieve method...
Regards
DilipRam
|
|
|
|
|
See my reply to Lucs post. I just found this[^] article explaining background vs. foreground threads, so apparently if you set udpSocketThread.IsBackground = true; then you won't ever have to worry about Joining the thread.
|
|
|
|
|
Thanks again and sorry for troubling again.just to ensure
that instead of doing UdpListnerThread.Join(); in my stop method
i need to set udpSocketThread.IsBackground = true.is that it means
thanks
Regards
DilipRam
|
|
|
|
|
That's how I would do it anyway.
|
|
|
|
|
Thanks for replies..finally my stop method will be having the following code
since i am using two udps and thread name is
udpManagerbroadCast.Close();///..udp
UdpListnerThread.IsBackground = true;///..thread
FlagVal = true;///flag value
soUdp.Close();///..udp
and hope this is what you all were suggesting.Hope this fit the standards which you were suggesting
Regards
DilipRam
|
|
|
|
|
|
Hello everyone,
I'm searching for a solution to a relatively small design specification that has turned into a big hassle. Data is loaded into each ComboBox from an XML file on a network. In the XML file, default values are specified for each ComboBox. I need to change the background color of the choice that is specified as the default -- that is, when the default is selected, it's background should change to a light-blue color, and the color should also appear when it is dropped-down and not currently selected.
Setting the BackColor makes it so every item is colored during the drop-down, and not just the default row. I read a CP article about a super-combo-box with font coloring for specific items (with a multitude of superfluous features), but for this application that is like killing a fly with a hand-grenade.
Does anyone have any simple suggestions or recommendations for this "simple" problem?
Thanks in advance,
Phil
|
|
|
|
|
|
Hi Vasudevan,
Could you please point me towards the Windows Form equivalent -- if one exists?
Thank you,
Phil
|
|
|
|
|
Hi,
ComboBox and ListBox share some characteristics:
1.
they collect and display items that dont have to be strings; it can be any type
you choose. So you can create your own little class that holds whatever is
appropriate to represent the info for that item; then you provide a ToString()
method to deliver the display string.
2.
they support a DrawMode property; when set to one of the UserDraw values,
it is up to your program to draw each individual item (in the DrawItem event)
any way you like.
Combining both points can be very powerful !
|
|
|
|
|
Hi Luc,
Thanks a lot, this looks very promising!
-Phil
|
|
|
|
|
|
How do I wrap the text of a Toolbar button or of a Normal Button?
|
|
|
|
|
Try using the \n (newline) char in the button's caption.
/ravi
|
|
|
|
|
Hi,
most controls that have a Text property will display the text in one or more
lines. They wrap automatically if AutoSize is false, Width is insufficient,
and Height is sufficient to accomodate several lines of text.
And you can force a line break by inserting a newline ('\n') character.
|
|
|
|
|
If it is a HTML page then \n need to be replaced with <BR> tag. Isn't it?
|
|
|
|
|
I dont know, but that could be correct (unless inside a PRE block).
|
|
|
|
|
Hi,
One of my clients has exported his product list to CSV, and there are funny characters in the long description, and it is giving me errors when I try doing an import. The long description cell has little white blocks at the end of the text, almost like a new line. How would I test for something like this, and remove it?
What is it?
Regards
ma se
|
|
|
|
|
Is it unicode by some chance?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
I worked on a project which writes 2 doc files, in memory stream.
From the memory stream I wrote all the bytes to a file
something like this:
File.WriteAllBytes(path,mybytes).
The problem is that I can't see all the information.
But if I look in my file with Windows Commander the information which I can't see is there.
Where should be the problem?
Thanks for your help.
|
|
|
|
|
WhiteGirl23 wrote: The problem is that I can't see all the information.
"See all the information"? You've gone bind and now can't use a monitor? Your trying to use photoshop to open the doc file but the pixels arn't in the right place? Your highly advanced brain interface isn't causing the right electrical impulses in the visual processing part of your brain?
You might want to explain yourself in explicit developer terms rather than clueless user terms. i.e. "I try to look at the value in the watch panel in visual studio" or "if I then open the file in notepad I can't see the byte's I have written".
The problem could be that whatever your using to look at the data isn't interpreting it correctly or that the data is being written incorrectly. It's pretty hard to tell without being psychic or being given some pretty basic information.
|
|
|
|
|
my code is:
//write in memory the files
MemoryStream mem = new MemoryStream();<br />
BinaryWriter bin = new BinaryWriter(mem);<br />
bin.Write(unicodebytes, 0, number);<br />
<br />
<br />
bin.Write(unicodebytes1, 0, number1);
//unicodebytes,unicodebytes1 are vectors where I keep the bytes from the files
//read the files
BinaryReader binread = new BinaryReader(mem);<br />
mem.Position = 0;<br />
<br />
<br />
byte[] byteArray = new byte[mem.Length];<br />
int count;<br />
count = mem.Read(byteArray, 0,1);<br />
while (count < mem.Length)<br />
{<br />
byteArray[count++] = Convert.ToByte(mem.ReadByte());<br />
<br />
File.WriteAllBytes("C:\\text1.doc", byteArray);<br />
My problem is that I can see the first file in Word but I can't see the second file.
|
|
|
|
|
flush the BinaryWriter before re-reading the data.
<br />
MemoryStream mem = new MemoryStream();<br />
BinaryWriter bin = new BinaryWriter(mem);<br />
bin.Write(unicodebytes, 0, number);<br />
<br />
<br />
bin.Write(unicodebytes1, 0, number1);<br />
<br />
bin.Flush();
<br />
-----
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
|
|
|
|
|
thank for your help but still doesn't work
|
|
|
|
|
try to explain the context : what are you trying to achieve ?
is it binary data ? text ? in ASCII ? in Unicode ?
are they both Word documents ?
where does the data originate ? show the declarations !
and specify the symptoms in detail: what does "can see" mean ?
is the first file OK, or just recognizable ?
and what about the second: nothing at all, some garbage,
some parts recognizable, what ?
if you are not explicit about these, you either will get no answers, or some
answer that is as mysterious as your questions are...
|
|
|
|