|
I would agree that this is not the standard way to go about doing things, but I can think of a time when it would be useful (and perhaps desireable) to have a second app modify the first: an auto updater application. If you change a binary by only modifying an associated resources, then an automatic updater should be able to only download that resource instead of the entire binary file. I think this use, although rare, is completely appropriate for such a methodology. Just my two cents. Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Skippums wrote: but I can think of a time when it would be useful (and perhaps desireable) to have a second app modify the first: an auto updater application.
I didn't say that was the problem. The problem was changing the resources of the target .EXE without damaging the .EXE. The file would have to be rewritten, at least partially.
Skippums wrote: If you change a binary by only modifying an associated resources, then an automatic updater should be able to only download that resource instead of the entire binary file.
This technique is used to do byte-patches of applications, but not normally to modify the resources of an .EXE in the normal course of the execution of the app.
I'd day that if you had to modify the resources, compiling the resources into a seperate .DLL would be the safer way to go, as well as being more flexible in the case of localized versions of the resources.
|
|
|
|
|
Hi every body,
Sandeep here.I'm a very big fan for .net applications. I'm have zeal to know new types of programming. In this process i came to know that "the code project" is a very good website to achive my goal.
Here my question is : Recently i took one source code on c# application. having so many files including ".dll" files also. Now i need to use these .dll files in my application. Can i use or not. is it a legal thing or not.
Pls mail me regarding to my question above stated.
my communication mail id is : sandeepgrt@gmail.com
Expecting response from all......................
|
|
|
|
|
Where are you getting the dlls? Check the licenses of the code you are using.
|
|
|
|
|
It is best to not put your email address in a post.
Sandeep kumar M wrote: having so many files including ".dll" files also. Now i need to use these .dll files in my application. Can i use or not. is it a legal thing or not.
Depends on the licensing of each of the .dll's. Are they ones you created or got from other sources?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi
i have the following code which stops users from ctrl copy text in a gridview however i want it to work without the pop-up box coming up, is there a way to do this?
cheers
function noCopyKey(e) {
var forbiddenKeys = new Array('c','x','v');
var keyCode = (e.keyCode) ? e.keyCode : e.which;
var isCtrl;
if(window.event)
isCtrl = e.ctrlKey
else
isCtrl = (window.Event) ? ((e.modifiers & Event.CTRL_MASK) == Event.CTRL_MASK) : false;
if(isCtrl) {
for(i = 0; i < forbiddenKeys.length; i++) {
if(forbiddenKeys[i] == String.fromCharCode(keyCode).toLowerCase()) {
alert('You are prompted to type this twice for a reason!');
return false;
}
}
}
return true;
}
|
|
|
|
|
Jamie1985 wrote: alert('You are prompted to type this twice for a reason!');
remove the line with the popup?
|
|
|
|
|
I guess you got that code from somewhere else huh? Otherwise you'd know exactly what to do.
But yeah, just remove the alert.
Also, when last i checked, c# didn't have, alert or var.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Yeah that looks like JavaScript to me
|
|
|
|
|
hi
all, any body
pls help me to solve my problem. Though my code is right (i feel) i couldnt achieve the result i expect , i tried in all means, any one pls solve my headache!.
private void DataGrdVw1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)<br />
{<br />
string CurrentSelValue;<br />
CurrentSelValue = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();<br />
txtAreaName.Text = CurrentSelValue;<br />
}
it doent works!.
i tried with cell mouse down event also no use.
private void DataGrdVw1_CellMouseDown(object sender,DataGridViewCellMouseEventArgs e)<br />
{<br />
<br />
<br />
this.GrdText.Text = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();<br />
}<br />
i need to show the current cell s text in a text box when the datagridview's cell is clicked with mouse, or arrow keys
pls help
kssk
KSSK
|
|
|
|
|
Use the DataGridView's CellEnter event, and then use the CurrentCell property:
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
{
label4.Text = dataGridView1.CurrentCell.Value != null ? dataGridView1.CurrentCell.Value.ToString() : String.Empty;
}
Notice that I'm also checking here if the cell value is null, and setting the textbox text to String.Empty if it is, otherwise you get a nasty Null Reference Exception when trying to call ToString() a non-existent value.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
Hi,
I've seen some programs use wide images which have like 3 images inside and on run-time only a third on the image is shown in a picture-box and on mouse-over a different third of the image is shown and on-click a different third of the image is shown. does anyone know how to do that or there any built class for such things?
Thanks
|
|
|
|
|
Hi,
there is about 100 ways how you can do that . However there is no class that would support that in .NET namespace directly. You have to write your own or maybe use somebody's else custom class. Override the OnPaint method of control class and render the part of Image you need according to mouse state (whatever condition).
hope that helps
zilo
|
|
|
|
|
is there a way that you can manually sort gridview columns
basically i want the columns to display in alphabetical order but only one column seems to display a-z at a time
i want a user to be able to click on sort a-z one column then sort a-z in another so both columns and together sorted a-z
hope this makes sense !
|
|
|
|
|
Jamie - yes multiple-column sorting is possible, but requires a little bit of work on your part. Here's an article to get you started: http://windowsclient.net/blogs/faqs/archive/2006/07/10/how-do-i-sort-on-multiple-columns.aspx[^]
If you're using .Net 3.5 you could also use LINQ.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
hi
i am having two forms
form1 is having two functions and a bool variable
code is ::::
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public bool s = true;
Form2 f2 = new Form2();
private void Form1_Load(object sender, EventArgs e)
{
f2.MdiParent = this;
f2.Show();
}
public void a()
{
MessageBox.Show("u r in a ");
}
public void b()
{
MessageBox.Show("u r in b ");
}
}
the code for form 2 is
:::::::
public partial class Form2 : Form
{
Form1 ff;
public Form2()
{
InitializeComponent();
ff = (Form1)this.MdiParent;
}
private void button1_Click(object sender, EventArgs e)
{
ff.a();
ff.b();
if (ff.s == true)
{
MessageBox.Show("yes");
}
}
}
error is coming at ff.a().. ff.b()...ff.s as object reference not set to an instance of the object ....
plz tell me the problem
n..solution too
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: error is coming at ff.a().. ff.b()...ff.s as object reference not set to an instance of the object ....
plz tell me the problem
The problem is as the exception said. In other words, ff is null .
sindhutiwari wrote: n..solution too
Think about the sequence that your statements are actually called in. You assign ff to be the MdiParent BEFORE you tell the form what its MdiParent is. Therefore ff is null because MdiParent is null at the time that ff is assigned.
The solution is to assign ff AFTER MdiParent is assigned. OR Don't use ff at all but to reference the MdiParent directly when it is needed.
You might also want to give things a sensible name. Form1, Form2, ff, a(), b() and so on are very poor names. They mean nothing to anybody.
|
|
|
|
|
Hi,
I'm newly using FileIOPermission class, Can any one explain me how to use this class in .Net 1.0 using C#, to set or get permissions for the file?
Thanks in Advance,
SMARTech
************************************************
If you think you can, You Can...
************************************************
|
|
|
|
|
shah_tech wrote: Can any one explain me how to use this class in .Net 1.0 using C#, to set or get permissions for the file?
Have you read the documentation[^]? It seems to have a fairly comprehensive example.
|
|
|
|
|
I have built a windows service with c#.net.And to start that service i built a icon to start and stop that service with windows application.Now,I want to build a setup for that project and both the project needs to be installed with that setup file.How should I do this?please suggest me.
Thank u.
|
|
|
|
|
You add the project output of both the service and windows application to the installer. All three projects will, naturally, sit in one solution.
|
|
|
|
|
I'm trying to develop an application for a player's statistics per game. Here's the XML:
<GameStat>
<PlayerID>21</PlayerID>
<TeamID>8</TeamID>
<GameID>
<int>1</int>
<int>2</int>
<int>3</int>
<int>4</int>
</GameID>
<Score>
<int>18</int>
<int>25</int>
<int>15</int>
<int>31</int>
</Score>
</GameStat>
These data will be stored in an SQL Server Database. I have two tables, namely tblGame & tblGameInfo. When inserted in the database, the data will look like this: (pls don't mind the --)
tblGame
------------------------------------------
GameStatID----------PlayerID----------TeamID
1------------------------21----------------8
------------------------------------------
tblGameInfo
------------------------------------------
GameID----------Score
1--------------------18
2--------------------25
3--------------------15
4--------------------31
------------------------------------------
Can anybody please help me with this? Thanks
Just a C# newbie
|
|
|
|
|
I think googling for SqlDataAdaptor, DataSet and DataTable will get you on your merry way
DataSet is basicly an in-memory kind-of database and DataTable are your tables. You can load your xml file in those.
If that's done, you can do whatever you want with it.
You can use it as a datasource, port it (trough the SqlDataAdaptor) to your database etc...
Hope that helps
|
|
|
|
|
hi,
Assume that they are three forms form1 . form2 . form3
now
1. form1 is a mdi form
2. i am making a object of form2 in form1 then made form1 as . mdiparent of form2 then showing it.. till now its fine
3. i have made object of form3 in form2.which i am showing from form2
here i want to make form3 as a mdi child of form 1 how to do this
please do reply
regards
sindhu tiwari
its me sid
|
|
|
|
|
I assume your are creating form3 in form2 as follow
<br />
<br />
form3 frm = new form3();<br />
<br />
then add
<br />
<br />
frm.mdiparent = this.mdiparent;<br />
<br />
Simple isn't it ?
|
|
|
|