|
hi
how to carry textbox pointer forward or back ?
thanks
|
|
|
|
|
If you're referring to the cursor, you can use the arrow keys. If you want to do it programmatically, then set the SelectionStart and SelectionLength properties
|
|
|
|
|
thanks a lot
i forgot arrow keys i think only selectionstart and selectionlength
|
|
|
|
|
how a dataset can transfer from server to client using socket programming in C#. Is it possible?
|
|
|
|
|
Create a NetworkStream between the two computers and serialise the DataSet across it. Use a CryptoStream if you need security
|
|
|
|
|
Please send some example code related to this.
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.aspx
|
|
|
|
|
If I do that, you won't learn from it. The most that you will get out of me is some pseudo-code
Client
Start listening on port x
Set up a background thread. When you receive data, use TcpClient.GetStream to get the NetworkStream
Deserialise the NetworkStream into a DataSet
Close the NetworkStream and TcpClient
Server
Accept an IP address
Try to connect to the IP address, on port x (this is the same port as the client)
When you have connected, simply use the same TcpClient.GetStream method as a data sink. Serialise the DataSet into this Stream
Close the NetworkStream and TcpClient
If you really wanted to, you could make this more complex (status codes, etc), but that's the basic gist of it. If you need code, then search Google for a simple chat application (this gets you the basic infrastructure) and serialisation (this will cover the transfer of the DataSet)
|
|
|
|
|
hi friends....plz help me that how to group set of rectangles...
txs in advance..
|
|
|
|
|
use a System.String...
to tie them together!!!!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
hilarious
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
that was pretty good... have not thought of a string like that in some time...
|
|
|
|
|
In an array Rectangle[] or a list List<Rectangle> possibly?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Use an IEnumerable. If you want the grouping done for you, then look into LINQ - specifically, the group clause
|
|
|
|
|
how can I struct the 8 queen tree for FIFO searching and putting 8 queen in their correct position?
|
|
|
|
|
By knowing the answer and then doing it.
... if this post has been as helpful as your question then please vote it 5.
Thanks for your time
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: if this post has been as helpful as your question then please vote it 5.
I love your logic.
|
|
|
|
|
splendid.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Isn't that more of an Algorithm Question? It's probably on wikipedia, things like this usually are..
|
|
|
|
|
The correct position is white queen on d1, black queen on d8, all other queens in the spares box. No tree involved, no FIFO.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi
i'm getting exhausted about a simple feature but sincerely i don't know how work out that
I have this code to use Window Media Player :
public partial class Form1 : Form
{
TextBox textbox;
public Form1()
{
InitializeComponent();
listBox1.SelectedIndexChanged += listBox1_SelectedIndexChanged;
textbox = new TextBox { Dock = DockStyle.Top };
listBox1.SelectionMode = SelectionMode.MultiExtended;
}
private void Form1_Load(object sender, EventArgs e)
{
List<string> prova = GetListOfFiles(@"D:\\Torrent\\Depeche Mode - Sounds Of The Universe (2009)\\");
listBox1.DataSource = prova;
listBox1.DisplayMember = "prova";
player1.settings.setMode("Shuffle", true);
player1.Ctlcontrols.play();
}
private List<string> GetListOfFiles(string Folder)
{
DirectoryInfo dir = new DirectoryInfo(Folder);
FileInfo[] files = dir.GetFiles("*.mp3", SearchOption.AllDirectories);
List<string> str = new List<string>();
foreach (FileInfo file in files)
{
str.Add(file.FullName);
}
return str;
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
Text = Convert.ToString(listBox1.SelectedItem);
player1.URL = Convert.ToString(listBox1.SelectedItem);
}
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
{
string searchFor = textBox1.Text;
List<string> strings = (List<string>)listBox1.DataSource;
if (multi.Checked)
{
for (int i = 0; i < strings.Count; i++)
{
listBox1.SetSelected(i, strings[i].Contains(searchFor));
}
}
else
{
listBox1.ClearSelected();
listBox1.SelectedIndex = strings.FindIndex(
s => s.Contains(searchFor));
}
}
}
}
With this code i can search songs and show in a ListBox the list downloaded in a folder but my purpose is when Window Music Player change song automatically the ListBoxItem will change marker and show the current song instead now when WMP change song the marker of the listBox did not move .
An important characteristic is the i set the WPM in RandomPlay it is a feature requested.
Do you have any idea how i can work out that from some day i felt a little confuse to find out the right way but not luck.
Have a good luck.
Nice Regards
|
|
|
|
|
ascotravel wrote: when Window Music Player change song automatically the ListBoxItem will change marker and show the current song instead
How do you know WMP changed song? If you can answer than question, then the rest is easy.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Yusuf,
thanks to reply ,
sorry my english is poor i embedded Window Media PLayer in my form1
Yusuf.A wrote: ascotravel wrote:
when Window Music Player change song automatically the ListBoxItem will change marker and show the current song instead
How do you know WMP changed song? If you can answer than question, then the rest is easy.
that's mean i give to WMP a folder to play song so i wish set my listBox like the listBox in Windows Media Player's playlist & Winamp's playlist where there is a listbox that show the list of songs loaded and change in the next_song at the end of the current_song so the listBox with show the new song and so on....in my case when i click in the listBox to select a song it is right but when the song finish the WMP get in status stopped.
Is it impossible satisfy my purpose?There is a way for work out my request?
Thanks for your support.
Nice Regard
modified on Tuesday, March 31, 2009 1:53 PM
|
|
|
|
|
So you have embedded WMP in your form. OK. You can pass list of files to play to WMP. Is there any event you can subscribe to or any other mechanism WMP can notify you it is done playing a song? Or Is it a way to know it has started playing a new song? That is what you need to look at.
I don't know the answer I am just giving you a hint as to what to look for. I could be 100 miles off the mark.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
HI Yusuf,
i set the WMP to play songs in Random"Shuffle" way when it is playing a song it shows the name,album,etc,etc, of the current song so when its change song (stored from my folder directory) automatically change also the info about the new song the trouble is if i click on the ListBox to change song WMP follow my event but when finish to play that song WMP pass in status "Stopped" if i don't touch nothing WMP will play without interruption ,so i need to set WMP to don't pass never in status"Stopped" because the request of my client is that WMP will play for 4 hour continue without interruption and else ...
My trouble is if i use the textbox "search" to search a song and play it or i click on the song's list in the ListBox to change song after this action WMP will pass in status "stopped" .
However thanks for your support i will continue to research the best way to work out this trouble.
Nice regards
|
|
|
|