|
That is the cryptic message Microsoft has designed to tell you you don't have
(the right version of) the .NET Framework. So decide which version you need,
look for the download site and install it.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- 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 PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
The Undefeated wrote: What is the error message?
Someone voted you a 3 for that perfectly reasonable, logical and understandable question. Someone is obviously a moron.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
lol, i want to know that person
Becoming Programmer...
|
|
|
|
|
xmen_xwk wrote: i want to know that person
Why would anybody want to know a moron?
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
because anybody must know that person and aware too
Becoming Programmer...
|
|
|
|
|
Simple way to run Exe is.
Process process = new Process();
process.StartInfo.FileName = "notepad.exe";
process.Start();
thats all i know.
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
Well i was working on a very simple project , In windows application form1 i want set a password to modify, there are two buttons in the form which can be activated if user enters correct password.
Notice forms controls are: label, textbox1, button1 and button2.
who can send me code snippet for above would be great indeed!
thanks pls help me!!
so much of happy ending...
|
|
|
|
|
Have you made an attempt to solve the problem yourself?
This site is for people who want to learn, not for people who want their (home)work done for them.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi.
I have the follow:
1. System.Data.DataTable dt = new System.Data.DataTable();
2. dt = dal.Search(findfile.Text); // I receive the data correctly
3. dt.WriteXML(YourSearch);// I'm trying to create a xml file from the datatable
4. Response.TransmitFile(YourSearch);//download xml file
In the thirth row, when i run (compile ok) I receive
"Cannot serialize the DataTable. DataTable name is not set"
What that mean?
thanks.
|
|
|
|
|
It means what it says. Set the TableName property for your DataTable.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi, I'am have similar problem,but I resolved it
the trick is set the TableName between DataTable is transmited and DataTable is received have a same name
|
|
|
|
|
hi, i want to change system language (language bar) to second language(FA) while one of my textbox in the form has the focus.and again back to normal (EN) when going to next textbox.
so how can i do that?
|
|
|
|
|
solved mostly: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2423864&SiteID=1&mode=1
I have this functionality i want to port from WinForms but i run into a few problems and i can't continue. What it does is move a panel(canvas) around as i click and hold and drag the mouse). I saw the sample using TranlateTransform(XAML) but i can't get any code-behind example, this is dynamic and interactive. I managed to make some out only need the translation solved(and possibly a good approach on using this with Margin, wich seems the only tool i got to moving the canvas around?).
Code Block#region Pan tool
private bool mMovingPanel;
private Point mMousePos;
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
mMovingPanel = e.Button == MouseButtons.Left;
// prev mouse pos
mMousePos = panel1.PointToScreen(e.Location);
}
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
if (mMovingPanel)
{
// "this mouse pos"
Point pos = panel1.PointToScreen(e.Location);
// "this mouse pos" - "prev mouse pos" = offset
Size adj = new Size(pos.X - mMousePos.X, pos.Y - mMousePos.Y);
// Location + offset = Location (final - unassigned)
Point loc = panel1.Location + adj;
if (panel1.Width >= this.ClientSize.Width && panel1.Height >= this.ClientSize.Height)
{
if (loc.X > 0) loc.X = 0;
if (loc.X + panel1.Width < this.ClientSize.Width) loc.X = this.ClientSize.Width - panel1.Width;
if (loc.Y > 0) loc.Y = 0;
if (loc.Y + panel1.Height < this.ClientSize.Height) loc.Y = this.ClientSize.Height - panel1.Height;
}
else if (panel1.Height >= this.ClientSize.Height)
{
if (loc.X < 0) loc.X = 0;
if (loc.X + panel1.Width > this.ClientSize.Width) loc.X = this.ClientSize.Width - panel1.Width;
if (loc.Y > 0) loc.Y = 0;
if (loc.Y + panel1.Height < this.ClientSize.Height) loc.Y = this.ClientSize.Height - panel1.Height;
}
else
{
if (loc.X < 0) loc.X = 0;
if (loc.X + panel1.Width > this.ClientSize.Width) loc.X = this.ClientSize.Width - panel1.Width;
if (loc.Y < 0) loc.Y = 0;
if (loc.Y + panel1.Height > this.ClientSize.Height) loc.Y = this.ClientSize.Height - panel1.Height;
}
// Location(final - assigned)
panel1.Location = loc;
// "this mouse pos" set aside as "prev mouse pos"
mMousePos = pos;
}
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
mMovingPanel = false;
}
#endregion
This is my attempt, i know it lacks but hopefully it will speed things up:
Code Block#region Pan tool
private bool mMovingPanel;
private Point mMousePos;
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
mMovingPanel = Mouse.LeftButton == MouseButtonState.Pressed;
// prev mouse pos
mMousePos = canvas1.PointToScreen(Mouse.GetPosition(canvas1));
}
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
if (mMovingPanel)
{
// "this mouse pos"
Point pos = canvas1.PointToScreen(Mouse.GetPosition(canvas1));
// "this mouse pos" - "prev mouse pos" = offset
Vector adj = new Vector(pos.X - mMousePos.X, pos.Y - mMousePos.Y);
// Location + offset = Location (final - unassigned)
Thickness currentThickness = new Thickness();
Thickness loc = new Thickness(currentThickness.Left + adj.X, currentThickness.Top + adj.Y,
currentThickness.Right, currentThickness.Bottom);
if (canvas1.ActualWidth >= this.ActualWidth && canvas1.ActualHeight >= this.ActualHeight)
{
if (loc.Left > 0) loc.Left = 0;
if (loc.Left + canvas1.ActualWidth < this.ActualWidth) loc.Left = this.ActualWidth - canvas1.ActualWidth;
if (loc.Top > 0) loc.Top = 0;
if (loc.Top + canvas1.ActualHeight < this.ActualHeight) loc.Top = this.ActualHeight - canvas1.ActualHeight;
}
else if (canvas1.ActualHeight >= this.ActualHeight)
{
if (loc.Left < 0) loc.Left = 0;
if (loc.Left + canvas1.ActualWidth > this.ActualWidth) loc.Left = this.ActualWidth - canvas1.ActualWidth;
if (loc.Top > 0) loc.Top = 0;
if (loc.Top + canvas1.ActualHeight < this.ActualHeight) loc.Top = this.ActualHeight - canvas1.ActualHeight;
}
else
{
if (loc.Left < 0) loc.Left = 0;
if (loc.Left + canvas1.ActualWidth > this.ActualWidth) loc.Left = this.ActualWidth - canvas1.ActualWidth;
if (loc.Top < 0) loc.Top = 0;
if (loc.Top + canvas1.ActualHeight > this.ActualHeight) loc.Top = this.ActualHeight - canvas1.ActualHeight;
}
// Location(final - assigned)
canvas1.Margin = loc;
// "this mouse pos" set aside as "prev mouse pos"
mMousePos = pos;
}
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
mMovingPanel = false;
}
#endregion
-- modified at 1:04 Monday 19th November, 2007
|
|
|
|
|
I like C# but its useless in my applications because I can not protect my source code as its always included in deliverables.
Is there any real solution coming for this in near future or should I just give up C# .NET.
I believe this should be major concern for many but I haven's see Microsoft taking any role for this.
|
|
|
|
|
triag wrote: I can not protect my source code
No.. You don't need to give your sourcecode to your client.. After making the setup file, there won't be any sourcecode in your setup file..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I tried this by making simple windows forms application and publish it. I select The application is available offline as well.
It generated setup.exe and subdirectory Application files. Under that there is file application.exe.deploy
I renamed that to be application.exe and open it Lutz Roeder's reflector. It was able to re-generate my source code from that. I think my clients can do same.
|
|
|
|
|
No. The generated code won't be the same as the original code that you wrote..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Atleast all of my business logic is there in very clear form.
I don't really feel confident. Reverse-engineering or hacking is other thing as this is way too easy to steal the hard work.
|
|
|
|
|
You would need to look at using an obfuscator[^] to make it more difficult to reverse-engineer the source code for your application.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
Hello friends i want to know
how do i set source of the datagrid at runtime
if possible can u send me the code of it.
|
|
|
|
|
Let's say "DataGrid1" is the name of your DataGrid. "ds" is the name of DataSet that you have filled your data.. so, you can put this code below in your Page_Load()
<br />
DataGrid1.DataSource = ds.Table[0];<br />
DataGrid1.DataBound();
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hello,
I have created a C# project with two different languages (english and Spanish), and I would like to determine, OUTSIDE of the project that uses the language DLLs, what type of language the DLL contains.
In C++ you could set the language of the DLL and right click on it and see for instance: "Spanish (Mexico)"
[[ From explorer right click on DLL and select properties,
click on the Version tab, in the 'other version information'
click on Language ]]
In C#, my language DLLs all have "Language Neutral"
[[same thing right click ...]]
Which leads me to the following questions:
1. Is it possible to set the "language" property of a C# resource DLL?
2. Can I get the language "property" of a C# resource DLL programatically?
Thanks
|
|
|
|
|
I think this is defined in Project -> Properties -> Application tab
there you have an 'Assembly Information' button next to "Output Type", and there is a place where you select neutral language.
Now, I have no idea what that actually does change, but that would be the info you'd see when you check the properties of the DLL I assume.
regards
|
|
|
|
|
Thanks - not quite...
That just sets the "default" language for the application:
[assembly: NeutralResourcesLanguageAttribute("en-US")]
What I am looking for is the same thing for resource DLLs, but I don't think it exists...
Right click on a C++ DLL, select properties, select Version tab, click on Language in the 'other version information' group box
|
|
|
|