|
Alright you lost me, what button? Just a regular button?
If so, then when it's clicked how do you make it pop open right beside you're program no matter it's location and stay on it even when user try's to move it?
|
|
|
|
|
It sounds to me like you're perhaps a bit over your head with this task.
Any control that fires an event can create a new child form, because an event is fired, you have the opportunity to inject your code.
Like I said, the way to maintain it's position if it's to be modeless, is to handle the position changed event on the parent form and keep moving the child to stay in it's desired position.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
C# Beginner Nick wrote: If so, then when it's clicked how do you make it pop open right beside you're program no matter it's location and stay on it even when user try's to move it?
You can also use child form's load event to do whatever coding you want. And as told to you the other events are also there like position change.
For button from which you want to instantiate this action, you can do programming at button's hover event also.
Chaitanya Joshi
|
|
|
|
|
Ihave a string,I parsed it with the comma in the string.
Now i want to assign the part before the "," to X
and after the comma to Y
How do u get the part before the "," and part after the ","
thanks?
string tmpItem = chckListBox.Items[i].ToString();
//parse the string Names and Phone Numbers
string[] names = tmpItem.Split(',');
foreach (string s in names)
{
MessageBox.Show(s);
|
|
|
|
|
What's inside "names"? It should already contain the part before and after the comma
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
private void btnSend_Click(object sender, System.EventArgs e)
{
for (int i = 0; i < chckListBox.Items.Count; i++)
{
if (chckListBox.CheckedIndices.Contains(i))
{
string tmpItem = chckListBox.Items[i].ToString();
//parse the string Names and Phone Numbers
string[] names = tmpItem.Split (',');
foreach (string s in names)
{
MessageBox.Show(s);
}
I want to get the part before the comma and after the comma seperately.
Thanks
|
|
|
|
|
What does the message box show? Put a breakpoint at the line foreach (string s in names) and take a look what's inside.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
names get null.
The message box shows
name
phonenumber
name
phonenumber
|
|
|
|
|
If names is null then the message box shouldn't get called at all.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You have an array with the part before and after the comma. Do you have problems to access the elements of the array?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
YES,i want to print the part before the comma and after the comma seperately.
thanks
|
|
|
|
|
names[0] gives you the text before the comma, and names[1] gives you the text after the comma.
Just curious how you managed to write the code that splits the string into an array, but didn't manage to read the values from the array...?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
I am java developer i thought its different in c#
ok ?
|
|
|
|
|
VS 2005 .NET 2 WinForms
I have DataGridView in virtual mode containing huge number of rows.
When user double clicks in column separator line in grid header, application hangs: it tries to read all rows.
How to force DataGridView to resize column only by using visible lines in screen ?
I tried
AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCellsExceptHeader);
but this did not help.
Andrus
|
|
|
|
|
Hi,
I have printed Some Names and Phonenumbers to a checkedlistbox
like;
Al PacinO, 3453454323
Now I want to add the checked names to a queue, How can I do that?
//contact Name
string contName = "";
if (oCt.FullName != null)
{
contName = oCt.FullName;
}
if (chckListBox != null)
{
chckListBox.Items.Add(contName + ", " + Num);
}
|
|
|
|
|
You can get checked items in the checkedlistbox by using SelectedIndices or SelectedItems property. Then create an instance of the queue class and use Enqueue method to add items to it. Check documentation for more information.
|
|
|
|
|
HI,
i like to know how to connect an Access odbc to a data set in c#?
i'vd used the binding source object bind a ".mdb" file and it created the data set.
can i do the same using the Odbc (i'm using MS VS 2005 Express edition)
THNKS
kobkob
|
|
|
|
|
|
Hi so im following a tutorial http://www.asp.net/learn/data-access/tutorial-01-cs.aspx.
I'm trying to configure a TableAdapter Query in the configuration Wizard with a SELECT statement which has a WHERE clause at the end.
I am about half way down the tutorial and have followed it word for word.
I have entered:
SELECT ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued
FROM Products
WHERE CategoryID = @CategoryID
But i am getting an error message on the last page of the config wizard saying:
Generated SELECT statement.
Error in WHERE clause near ‘@’.
Unable to parse query text.
Can anyone hazard a guess at what i'm doing wrong???
|
|
|
|
|
If you replace "@CategoryID" with "?" (without the quotes), does it work?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi
Is there any way to implement a graph using C#.Net.
Well i wanna create a sine wave graph but i think i need to use any extra tool or something..
Pls let me know if anybody got any idea....or any example ?
ta
James
|
|
|
|
|
You could graph the points yourself by using the drawing abilities of C#. If you want to do graphs on data you could use Crystal.
|
|
|
|
|
ZedGraph is a great, free library. I used it before and liked it pretty much.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Override System.Windows.Forms.Control and then override the OnPaint and OnPaintBackground method. You can then use the graphic context to draw the control.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Hello every1
In one of my project I download exe files (these are self extracting) from the internet. I need to extract these files to get a bunch of emded files to do some processing.
Can some1 suggest any utility or .NET library which I can use to extract these exe file
I have looked CP and I only found codes to extract zip files....
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|