|
this code read a some data from file and send to all computer by repeat ring synchronized.
but this code dont work .becuase this code make Thread very much .
i think existed a way for this work but i don't know.
<br />
do<br />
{<br />
Packet=gcnew TcpPacket;<br />
Len=file->Read(Packet->data,0,4096);<br />
Packet->Length=Len;<br />
for (int ClientNumber=0;ClientNumber<SocketsCount;ClientNumber++)<br />
{<br />
Thread ^ThreadUdp =gcnew Thread(<br />
gcnew ParameterizedThreadStart(this, <br />
&SendBuffer));<br />
<br />
info->Add(Packet);<br />
info->Add(ClientNumber);<br />
<br />
ThreadUdp->Start(info); <br />
}<br />
}while(Len>0);<br />
<br />
<br />
private:void SendBuffer(Object ^obj)<br />
{<br />
ArrayList ^arr=(ArrayList ^)obj;<br />
TcpPacket ^packet=(TcpPacket ^)arr[0];<br />
int ClientNumber=(int ^)arr[1];<br />
SendPacket(packet,ClientNumber);<br />
}<br />
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
hi,
i have a code in win32 platform in Vc8 using gmtime to convert localtime to UTC time. but when i was converting the VC8 code to Win Mobile, i wasnt able to do with gmtime. please help out of this situation.
thanks,
Mohanraj
RAJA
|
|
|
|
|
What in the effing world does your question have to do with C++/CLI?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hai,
Hai
I am creating a text editor. My problem is when i was selecting a word, the cursor should point the end of the selected word. I can able to select a word but i don,t know how to place the cursor at the end of the word position.
I am using MC++ (windows form application).
Can you tell me how to do this.
Thanks.
|
|
|
|
|
rose196 wrote: I am creating a text editor. My problem is when i was selecting a word, the cursor should point the end of the selected word.
The mouse cursor? Or do you mean the Caret?[^]
led mike
|
|
|
|
|
Hai
Thanks for your replay.
I mean the caret. I saw the link as you mensioned above i couldn,t understand.
Now i am using richtextbox. can you tell me how to get the caret current position.
Thanks in advance,
|
|
|
|
|
The caret indicates the insertion point. When you have a selection, the
selection is the insertion point so the caret applies to the whole selection.
It does't make sense to show a caret at the end.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
How I can transfer parameters from text box on my form to Command Line and then run this command??
|
|
|
|
|
Hi,
you can start a process with the Process class.
Have a look at the StartInfo property and the Start() method.
|
|
|
|
|
Yes, but I want run Command Line and insert there "command" that should be run by Command Line. The Start() method does not contain many properties that allow process with parameters!! StartInfo property consist of two: "set" and "get" and how I can use it??
Thanks for help!!!
|
|
|
|
|
Xeqtr wrote: StartInfo property consist of two: "set" and "get" and how I can use it??
Read the documentation, pay attention to the type, ...
|
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi all,
I am planning to develop a website which have a simulator where allows users to design thier nail design online. This will be something drag and drop the design to the fingernail in 3D mode.
I would like to ask can this implement in C# with Managed DirectX? And, how do I implement this using C# wi9th Managed DirectX?
Thanks.
|
|
|
|
|
katelva wrote: I would like to ask can this implement in C#
You can start by asking on the C# board[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks to your reply.
Regards,
Katelva
|
|
|
|
|
Wow - you really spammed the whole site....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, I have a problem in getting name or other information about USB Memory Sticks among Hard Drives and removable devices by WMI function "Win32_DiskDrive".
There is a code where I tried to get USB Device.
<br />
public: String ^ LogicalDriveInfo(Management::ManagementObject ^ mo, bool shared)<br />
{<br />
String ^ Name1;<br />
String ^ txt = mo["InterfaceType"]->ToString();<br />
do<br />
{<br />
Name1 = Convert::ToString(txt[0]); <br />
}while (txt == "USB");<br />
<br />
return Name1;<br />
}<br />
private: System::Void btnShellApp_Click(System::Object^ sender, System::EventArgs^ e) <br />
{ <br />
Management::ManagementObjectSearcher ^ que = gcnew Management::ManagementObjectSearcher(gcnew Management::SelectQuery("SELECT * FROM Win32_DiskDrive" )) ;
<br />
for each (Management::ManagementObject ^ obj in que->Get())<br />
{<br />
lblSN->Text = LogicalDriveInfo(obj,true); <br />
<br />
}<br />
}<br />
But there are no results to detect only UBS device.
|
|
|
|
|
Dear Sir,
How can I build my proper help in my program .
I am using Visual c++ Net 2005.
|
|
|
|
|
You can either write code to launch help as you see fit, or just have a help file you launch from your app. Depends what you want to achieve.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
My question is that how to make this help file in Visual c++ 2005 NET and how to load it so to read when we need it.
Did Visual Net have a tool to do it easy.
That's what I need to know
modified on Friday, May 9, 2008 1:39 AM
|
|
|
|
|
Hello!
I've found the following CodeProject: http://www.codeproject.com/KB/IP/NetCnfgVersion2.aspx[^]
But I'm not an expert in C++/Cli so I don't know, how to convert this code into a VC++ code so i need your help.
I need the local IP-Address of the Primary Network Adpter to communicate over TCP.
Has somebody a code-snippet in VC++, C# or C/C++, where this is shown.
Thanks a lot.
modified on Thursday, May 1, 2008 8:43 AM
|
|
|
|
|
Probot wrote: I've found the following CodeProject: http://www.codeproject.com/KB/IP/NetCnfgVersion2.aspx[^]
But I'm not an expert in C++/Cli so I don't know, how to convert this code into a VC++ code so i need your help.
The article is not a C++/CLI article nor is the project a managed (.NET) or the projects it references. They are all native C++.
led mike
|
|
|
|
|
Oops. My bad english. I meaned, that i'm not an expert in native C++, so I don't know how to convert this native Code to use it in an C++/CLI Project.
Is it possible to convert this Project (or the functions of the Project) into a DLL. I think then it's possible to use this code in a C++/CLI project. Or not?
|
|
|
|
|
Probot wrote: I meaned, that i'm not an expert in native C++
expert? I'm not an expert in native C++ either. I am capable with C++ and one needs to be before attempting to use C++/CLI. If your problem is you are a beginner with C++ then go learn C++ first, then come back to C++/CLI later.
led mike
|
|
|
|