|
oh my - never noticed that you can convert from different bases - thx.
|
|
|
|
|
Hi,
i'm beginnig to write the code for a drag/drop component.Basically,i want to create a map-like control,where the user can drag & drop items chosen from a set.
So i will have a control's portion with the items to choose from (with a drag operation) and a "work" area where to drop the chosen items.
Now i'm concerned about various things(like zooming,handling the size of the map when there are many items in the map etc...),and,most important,i am still a newbie developer,so,before starting from scratch, i ask you:do you know some similar control/example that could put me on the right way?
Surely something similar to Microsoft Visio would help,but i need some sample code
Thanks in advance!
|
|
|
|
|
I would use the scrollwheel event within the "work" area to zoom, and set the AllowDragDrop property on the same to "true". Then override the OnDragEnter (or OnDragOver) and OnDragDrop methods for the "work" area. In the source area, override the OnClick and MouseMove event handler to start the drag (Using a call to DoDragDrop on the object). There is an article on MSDN about drag-drop into textbox here[^]. Hope this helps,
-Jeff
|
|
|
|
|
Can any one please tell me how to make entire grid editable.
I have done the usual way of making only the particular Row editable when cliked on EDIT button on the Row.
But I have to make the entire grid editable on a button click ..
Thanks in advance
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hello,
I was playing around with the listbox control in visual c# express edition and I become frustrated when I couldnt find events such as OnInsert / AfterInsert and so on. Has Microsoft reduced events?
|
|
|
|
|
There has no OnInsert or AfterInsert, but listbox has ControlAdded and ControlRemoved, see if it's help.
|
|
|
|
|
I have looked at both events(ControlAdded and ControlRemoved) prior to my post, the documentation states they are for controls, not items. How to get notified after new item has been added to the listbox ?
|
|
|
|
|
Deian wrote: I have looked at both events(ControlAdded and ControlRemoved) prior to my post, the documentation states they are for controls, not items. How to get notified after new item has been added to the listbox ?
I had encountered the same problem before. I couldn't find any such event that was usable. What I ended up doing, while it was extremely generic, was take a collection of all the items in the listbox, and compare the collection and the list, and when the count is different, you can "fire your event." It is pretty simple to find the item that has been added or removed.
Like I said, it is pretty generic and crappy. But, it got the job done. Worked just fine for me.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Thanks for the replies. There are several ways to get out of the situation, but I tought that I am missing something when reading the documentation.
Regards,
Deian
|
|
|
|
|
Deian wrote: I tought that I am missing something when reading the documentation.
Oh, unfortunately, and strangely enough, you are not.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
hi
My aim is to bind the combobox with two fileds of a database
i mean that whenever i click on the combobox , the boxes must contain two fields .....example of that is a name with its id ....
if anyone is having any idea abt this then please let me know
regards
sindhu tiwari
its me sid
|
|
|
|
|
Are you want the combobox contain the display and the id of the display name?
If so, set the DisplayMember and ValueMember to the combobox. When SelectedIndexChanged you can get the SelectedText and SelectedValue
|
|
|
|
|
I am using the concept of satellite assembly in my application.I have created two satellite assemblies as Satellite.fr-FR.resources.dll and Satellite.en-US.resources.dll for french and english respectively.
I have initialize resource manager as:-
ResourceManager rm = new ResourceManager("Satellite." + System.Globalization.CultureInfo.CurrentCulture.Name, Assembly.GetExecutingAssembly());
From the above code the application automatically detects the current culture of the system.Depending on the current culture I am setting the labels text on a form like this:-
private void button1_Click(object sender, EventArgs e)
{
SetText(this);
}
void SetText(Control ctl)
{
string text = rm.GetString(ctl.Name);
if (text != null)
ctl.Text = text;
foreach (Control ctl1 in ctl.Controls)
{
SetText(ctl1);
}
}
I am trying to find out a way by which my application set the Labels text itself when ever the system language changes. I mean i want to get rid of SetText() method written above.Is there any way by which I don't have to write any method like SetText() for setting all my controls text.If any one has any idea then please let me know.
Thanks.
|
|
|
|
|
Hi,
How to disable/remove "Delete-Key" on dataGridView?
because whenever i click on Row and then when I click press "Delete-Key" so row deletes.
kindly let me know that How can I stop this?
Thanks in Advance
(Riaz)
|
|
|
|
|
Set AllowUserToDeleteRows property to False.
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
|
Hi all,
this is not a clear C# problem, but the program is in C# and can't find a better place to ask.
So, the application have to maintain some documents, every user logging in must see and edit any of documents. My problem is: where to store these files? Until XP we used Program files\AppDir\Docs folder, but in Vista this not works. User's personal folders can't be used either. Please help with a good ideea/information
Thanks
|
|
|
|
|
Hi!
System.Environment.SpecialFolder.CommonApplicationData (or rather a subdirectory thereof) is the right folder for you.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
You could always use the IsolatedStorage classes.
|
|
|
|
|
We have just run into this same issue. We are now storing the docs under All Users\Application Data. This works for Win2000, XP, 2003 and Vista.
Under Vista, this is redirected through a junction to the folder c:\ProgramData.
If you want backward compatibility, use the All Users\Application Data path, otherwise, you could use the ProgramData path.
David
|
|
|
|
|
The following program reads from a text file containing numeric data stored in columns separated by one blank space. Write the code and compile it on your computer. Create a text file called myfile.txt containing a few columns (3?5 for example) of numeric data (real numbers) and test the program.
#include <stdio.h>
int main(void)
{
FILE *fp;
double val;
char ch;
fp = fopen("myfile.txt","r");
do{
fscanf( fp, "%lf", &val );
ch = getc(fp);
printf(" %lf",val);
if ( ch=='\n' || ch==EOF )
printf("\n");
} while ( ch != EOF );
fclose(fp);
return 0;
}
Modify the code so that the program additionally creates a new text file where it stores only the integer part (discard the factionary part) of the real numbers stored in myfile.txt. The new file should write data in the same format (3?5 with columns separated by space) as the original file. Include statements to check if the file was opened and closed successfully.
ad
|
|
|
|
|
Are you aware that:
- this is the C# (not the C/C++) formum
- we don't tend to make others homework for them
- you didn't even give a qustion
So this looks like:
- you are so lazy with your homework that you can't even be bothered to type a question
- and you don't even took you time to find the right forum
Conclusion:
I won't help either
|
|
|
|
|
Hi code-lovers
i want my programs as users can update their programs -i developed- from web, like "windows update"
how could i do?
|
|
|
|
|
Build > Publish %Your Project Name%
If you publish it to web, the program at client desktop will auto check the version number and update from the source url.
|
|
|
|