|
You can buy tools to do this, which actually do patch the binary.
You can also use winzip self extractor to deploy just the files needed to update an install.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Further to Christian's answer, a patch should only include changed files. If you can identify which files are changed, then the problem of building a patch is solved. If you are thinking of patching a single binary then there a potential problems. It is better to ship each component file in full.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Maybe NetDasm - A tool to disassemble and patch .NET assemblies[^] from here on CP will help. If that one does not suit search the articles for patch, there are several likely articles.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi
I have been trying to make a splash screen for my program in C#, i have tried a couple of tutorials in C# as well .. but to no success . !
i only need a simple figure to diplay for a while and than another form(My main Program ) should appear ..
how can i do this ?
Help will be highly appreciated
|
|
|
|
|
|
I use it like this :
In Program.cs, you can see :
Application.Run(new Form1());
So, I create a new form, call it SplashScreen.
In that form I create a timer, for example 3s.
In event splashScreen_Load, I start the timer.
After 3s, I get an event timer_Tick.
In that event, I close the form.
So, change the line in Program.cs to :
Application.Run(new SplashScreen()); // will show for 3s, then closed
Application.Run(new Form1()); // after that, Form1 will show.
|
|
|
|
|
First add a form and name it as splashForm and then on that form remove the border and place a picture box which contains a suitable image.
Include using system.thread;
now in the main form(Form1)
public Form1()
{
thread = new Thread(new ThreadStart(SplashForm));
thread.Start();
}
private void SplashForm()
{
SplashForm newSplashForm = new SplashForm();
newSplashForm.ShowDialog();
newSplashForm.Dispose();
}
private void Form1_Load(object sender, EventArgs e)
{
thread.Abort();
}
I hope this helps you...
|
|
|
|
|
Thanks A zillion evry one !!! its done
|
|
|
|
|
I need to "highlight" (e.g. make it bold) one word in a whole string used as a value in a cell. Is it possible?
I am using DataGridView, DataGridViewRow and DataGridViewTextBoxCell classes in my application.
Here is the snippet of the code:
DataGridViewRow aNewRow = null;
foreach (MatchData aMatchData in aSeasonData)
{
aNewRow = new DataGridViewRow();
DataGridViewTextBoxCell aCell = new DataGridViewTextBoxCell();
aCell.Value = aMatchData.Date;
aNewRow.Cells.Add(aCell);
aNewRow = new DataGridViewRow();
DataGridViewTextBoxCell aCell = new DataGridViewTextBoxCell();
aCell.Value = aMatchData.WhoPlaysWho;
aNewRow.Cells.Add(aCell);
aCell = new DataGridViewTextBoxCell();
aCell.Value = aMatchData.Result;
aNewRow.Cells.Add(aCell);
this.myListOfMatchesGridView.Rows.Add(aNewRow);
}
where myListOfMatchesGridView is of type DataGridView.
And according to the result stored in aMatchData.Result (e.g. 2:1 or 4:2) I need to make the winner team (stored in WhoPlaysWho) bold e.g. if the match was Legends vs. AllStars and the result was 3:1 for Legends the displayed output in the specific cell should be Legends vs. AllStars.
Please, give me a hint how to achieve this. From all I read about DataGrids I know how to change the font for the whole cell but so far I was not able to get an information how to change the font only for one word in a whole string (and use different font for the rest of the string) i.e. how to use two (or more) different fonts in one single cell.
|
|
|
|
|
AFAIK, you can't make the text partially bold. You could go for owner-drawing[^], and draw the text manually.
I are Troll
|
|
|
|
|
Thanks for your answer, although not the one I expected
Meanwhile I got another idea - what about using a rich text box as a grid cell? Is there any possibility to make use of it?
|
|
|
|
|
cuker1 wrote: what about using a rich text box as a grid cell?
Yes, it should be possible to use any .NET control[^] within that DataGrid
"Writing code has a place in the human hierarchy worth somewhere above grave robbing and beneath managing."
--Gerald Weinberg
|
|
|
|
|
Dear All,
I have one data grid in this I am using Dropdown Box, i.e. fine I can see the data but when I selecting the data in Drop down box it's not reflecting in DataGrid.
Can you plz help me.
Thanks
|
|
|
|
|
Hi
I think it will reset the first record of the dropdownlist, when ever you load or refresh the datagridview.
if i am correct.
you need to set the selected index of a dropdownlist in row binding event of the datagridview.
i can suggest...
or use text box along with dropdownlist.
or lable along with dropdownlist
so just show the dropdownlist box only at the click of a cell.
and after selection hide the ddl and show the lable
|
|
|
|
|
Hi,
Thanks for your reply. I am copying here the code..bcoz I have already bound the dropdownbox but when i am selecting value it's get blank.
private void GetAnalysisitem()
{
using (new SessionScope(FlushAction.Never))
l_Analysisitem = ANALYSISITEM.FindAll();
if (l_Analysisitem != null)
{
DataSet ds = new DataSet();
TAnalysisitem = CastleUtil.ConvToDataTable(l_Analysisitem);
TAnalysisitem.TableName = "ANALYSISITEM";
TAnalysisitem.AcceptChanges();
ds.Tables.Add(TAnalysisitem);
// attach the dropdown to the categories column
this.c1TrueDBGrid2.Columns["MATERIAL"].DropDown = this.c1TrueDBDropdown1;
// underlying datasource value is ID
this.c1TrueDBDropdown1.DataField = "ID";
// display value will be Name
this.c1TrueDBDropdown1.ListField = "NAME";
// tell the grid that we're translating values
this.c1TrueDBGrid2.Columns["MATERIAL"].ValueItems.Translate = true;
// now use the dropdown to perform the translation for us
// using a more readable format (i.e.,"Name")
this.c1TrueDBDropdown1.ValueTranslate = true;
aNALYSISITEMBindingSource.DataSource = l_Analysisitem;
c1TrueDBGrid2.SetDataBinding(ds, "ANALYSISITEM", true);
}
TAnalysisitem.RowChanged += new DataRowChangeEventHandler(TAnalysisitem_RowChanged);
TAnalysisitem.RowDeleted += new DataRowChangeEventHandler(TAnalysisitem_RowChanged);
}
Thanks,
|
|
|
|
|
Hey have look at this....
protected void gvFV_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex >= 0)
{
DropDownList ddlC = (DropDownList)e.Row.Cells[0].FindControl("ddlC");
}
}
this will bind the values to the each ddl in each cell
so that you cant get the blank ddl.
just try it out...
if you dont get me still... let me know it...
|
|
|
|
|
Hi everybody,
I'm new for the codeproject team, I think you will understand, and I promise to contribute as much as I could. My first question is concerned about playing mediaplayers using the csharp (c#) language. I have got a code that can possibly play medias, for e.g (videos), but when I compile it using visual studio 2008, it configures out that there is no a namespace called "axmediaplayer". I think it is possible to embed this namespace in the code as a library (class) by referencing it. So my question is I don't know how to embed it, or even I don't know where to find it. If there is a need to see the code I can post it later on.
Thank you for your cooperation.
modified on Wednesday, September 2, 2009 5:42 AM
|
|
|
|
|
|
|
This works....
namespace Test
{
public class MyPicturebox : System.Windows.Forms.PictureBox
{
public delegate void ImageChanged ( Object sender, EventArgs e );
public event ImageChanged OnImageChange;
public new Image Image
{
get { return base.Image; }
set
{
base.Image = value;
if (OnImageChange != null)
{
OnImageChange(this, new EventArgs());
}
}
}
}
public partial class Form1 : Form
{
public Form1 ( )
{
InitializeComponent();
PictureBox _PB = new PictureBox();
}
}
}
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
' This picturebox has BeforeImageChanged and AfterImageChanged events.
' Taken from http://thedotnet.com/nntp/96040/showpost.aspx
'
Imports System
Imports System.Windows.Forms
Imports System.Drawing
'
Public Class MyPictureBox
Inherits PictureBox
Private _image As System.Drawing.Image = Nothing
Public Event BeforeImageChanged(ByVal sender As Object, ByVal e As EventArgsImageChanged)
Public Event AfterImageChanged(ByVal sender As Object, ByVal e As EventArgsImageChanged)
Public Shadows Property Image() As Image
Get
Return _image
End Get
Set(ByVal Value As Image)
If Not Value Is _image Then
If Me.DesignMode Then
MyBase.Image = Value
_image = Value
Else
Dim ea As New EventArgsImageChanged
If _image IsNot Nothing Then
RaiseEvent BeforeImageChanged(Me, ea)
If ea.Cancel Then
Exit Property
End If
End If
MyBase.Image = Value
_image = Value
RaiseEvent AfterImageChanged(Me, ea)
End If
End If
End Set
End Property
End Class
Public Class EventArgsImageChanged
Inherits EventArgs
Private _cancel As Boolean = False
Public Property Cancel() As Boolean
Get
Return _cancel
End Get
Set(ByVal Value As Boolean)
_cancel = Value
End Set
End Property
End Class
|
|
|
|
|
I have a simple file naming app, and what I would like it to do is: When the user 'pastes' the clipboard text, update the clipboard with the next item.
So I knew I had to recieve messages which I've got to work. But the problem is my app only gets WM_DRAWINGCLIPBOARD, which doesn't seem right (its to 'early' in the cycle).
I think the problem is that I need to respond to messages sent to the other app (explorer), but I'm not sure how to do that in c#.
Failing that, what's the best way for an app to respond to a global key press? i.e. whatever app has focus, when the user press X do this.
|
|
|
|
|
cjb110 wrote: Failing that, what's the best way for an app to respond to a global key press? i.e. whatever app has focus, when the user press X do this.
You should create keyboard hook to handle that.
To capture copy,paste, ... you could use WM_COPY,WM_PASTE and etc.
Life is a stage and we are all actors!
|
|
|
|
|
I started with WM_Paste, but my app never receives that message, only WM_DrawingClipboard. I think because its not the target of the paste.
I'm think the global key press is probably more 'safe' in the long term.
|
|
|
|
|
cjb110 wrote: I started with WM_Paste, but my app never receives that message, only WM_DrawingClipboard. I think because its not the target of the paste.
Have you read WM_PASTE documentation first?
You cannot receive it into Form.WndProc because it's sended to some editable controls only.For example:
public class MyTextBox :TextBox
{
const int WM_PASTE = 0x302;
protected override void WndProc(ref Message m)
{
if (m.Msg ==WM_PASTE)
{
MessageBox.Show("WM_PASTE was fired");
}
base.WndProc(ref m);
}
}
Life is a stage and we are all actors!
|
|
|
|