|
It's a merge module, whose name is dotNETFXRedist_x86.msm, which you can find in your install folder <installdir> \ Common7 \ Tools \ Deployment, as well as on the VS.NET CD1.
The trick is actually based on how you populate the setup (your .msi file) with merge modules.
Depending on it, you can check at install-time a module against a given version BEFORE the appropriate merge module gets downloaded or not from the net or any other location.
RSS feed
|
|
|
|
|
Now you are talking about something else.
You either have the framework or not. There is no way
to install part of it or update it. Thats Microsoft's job.
If you are talking about doing a Setup that downloads the required
files if they are needed, then if the framework is not installed
you are stuck downloading the 20 meg framework. But that is
different than what the original poster was asking.
Bo Hunter
The dotnetfx bootstrapper (dotnetfx.msi) exactly fits your need, since only the .msi file is downloaded and run (small file), and then the rest is downloaded if required. There are articles on MSDN.
There is no dotnetfx.msi. It is the msm you spoke of but it is
still a 20 meg file.
Bo Hunter
|
|
|
|
|
You don't get it. The .mcm file is only downloaded if a particular condition is true. Taking advantage of late downloading of .mcm files is a feature of Windows installer and only requires a particular use of the technology.
In my company, the setup team did exactly that for our products. It wasn't the dotnet merge module, but you get the idea.
To remind the list (something I wasn't sure of in the original post) :
dotnetfx.exe ==> 20MB (MS site)
dotnetfx.msm ==> 20MB (VS.NET cds)
dotnetfx.msi ==> does not exist. We are in fact more talking about the actual setup.msi, and it's your .msi file.
Good luck!
RSS feed
|
|
|
|
|
Bo Hunter wrote:
But that is
different than what the original poster was asking.
You are right. I have reread his post. I have certainly read the post too fast and it was first obvious to me the guy was talking about "how to download an upgrade to the .NET framework without including it in the initial setup files?".
Now if I get it right this time the question is "how do I upgrade from .NET 1.0 to .NET 1.1 by only changing the appropriate dlls?". Unfortunately, this is an invalid question. Not only the .NET frameworks are made to work on a side-by-side basis, the biggest issue the guy will encounter is that when MS builds the .NET framework, all assemblies have explicit and hardcoded dependencies, strong names, etc., so changing only a fraction of the .NET framework and expecting it to work is just wrong.
Of course, one thing to remember is that VTBL issues with function names, etc. are still a problem with .NET and cause breaking changes, just like with plain C code. With only one function name being renamed in one of the dlls, you'll get a wild and wonderful .NET framework exception next time some code tries to call that function (function that won't be found, obviously).
So no, it is not impossible to upgrade the .NET framework incrementally.
RSS feed
|
|
|
|
|
I need some help with creating an image icon (to be used in a menu) from a string. I need to do this cause I must support multiple languages, so just painting an icon won't be sufficient.
Does anyone have a good suggestion of the best way to do this? It needs to fit into a button of a pre-specified size.
|
|
|
|
|
The only way I can think of is to:
1) Make stream(with binaryreader - to read a file - and memorystream - memorystream reads from binaryreader) of data.
2) Create bitmap of this stream(System.Drawing.Bitmap.FromStream).
3) Create a handle to an icon from bitmap(bitmap.GetHicon)
4) From HICON, create Icon(System.Drawing.Icon.FromHandle)
Yes, that should be a solution, not knowing if it is the fastest
Gooky
|
|
|
|
|
Hi all,
Can anyone tell me how I can trap the event of minimizing and closing a C# windows appliction? I'm only referring to when the user hits the minimize or close button on the form's control box. I need to set a flag for my application to do something when this event occurs and I'm not sure how.
Thanks
|
|
|
|
|
Regarding the closing event, you should use the OnClosing event handler:
private void Form2_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
}
As for the minimizing event, Windows Forms does not have a prefedined event that handles just the minimizing of the form but you can circumvent that by using the following code:
protected override void OnResize(EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
}
}
|
|
|
|
|
I’m trying to design a simple forms program in C# that allows the user select something from a combo box and have the program reference the data in a file pertaining to the users selection. The data would then be displayed back on the form in a text box.
I have the combo box already loaded up with items and i have the files ready to be accessed. How do I access the files from the user selection?
Regards,
Peter
|
|
|
|
|
check out the System.IO namespace, lots of useful classes such as FileStream for reading and writing files.
Another Post by NnamdiOnyeyiri l Website
|
|
|
|
|
First Thanks to Ista for you prevoise response, but it was only one level, I was looking for two fields.
I have two questions about loading a DDL. I have created these two simple examples as mine real need was harder to explain.
1) Lets say we have a Several UserControls and at least 15 of them have a State DropDownList control that is loaded from the database. So you have IA, Iowa, IL, Illonios, TX, Texas and so forth. I don't want to copy the code to open the database and load the DDL via binding on all 15 pages, I just want to code it once in a My_Utils.cs class. What is the best way to do this.
2) Now lets pretend that the above example was a create new user screen in which the data was not present so we could bind away and the user could pick what ever they wanted. This question is more from the edit side of the house. Lests say I edit a customer record where the database stores the TX code for Texas. When we edit the customer record how do you bind the States table to the DropDownList (as in questin 1 above) and then make the active record the TX record. I know how to do it loading it in a for loop and doing a If to check that values match. I was opening there might be a better way.
If you now where sample code is on the net could point me there. Thanks
Mike Stone
Kaskaskia COllege
|
|
|
|
|
combo1.DataSource = dsDataSet.Tables["States"].DefaultView;
combo1.DisplayMember = "State";
and if an id is associated
combo1.ValueMember = "ID";
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I've been browsing through DirectShow since reading some articles on here and I've found an interesting example under the DirectX9 sample directory:
...\Samples\C++\DirectShow\Filters\PushSource
"Set of three source filters that provide the following source data as a video stream:
CPushSourceBitmap - Single bitmap (loaded from current directory)
CPushSourceBitmapSet - Set of bitmaps (loaded from current directory)
CPushSourceDesktop - Copy of current desktop image (GDI only)"
As far as I can see it's a way of making one or more bitmaps emulate a video capture device, e.g. webcam. Scouting round the web, most people seem to do this sort of thing using the old AVI writer functions but this method seems more "up-to-date".
Has anyone got this sample working in C# (or even in VC++)?
Regards,
Andy
--------
God created the universe in 6 days and has been debugging ever since - welcome to the biggest ever beta test
|
|
|
|
|
whats the problem?
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Implementation
Sorry to be a bit thick but if I end up with a "pushsource.ax" file how to I go about using it in C#?
Best Regards,
Andy Beamish
------------
God created the universe in 6 days and has been debugging ever since - welcome to the biggest ever beta test
|
|
|
|
|
Oh wow! I really am thick...
I've registered the pushsource.ax and got it working in GraphEdit okay, it's starting to look easier all the time!
Now the tricky part: if I'm capturing stills from a webcam how can I feed them straight into the PushSource.ax rather than via a directory of files?
I'm sure I'll get there eventually but any suggestions would be appreciated
Best Regards,
Andy Beamish
------------
God created the universe in 6 days and has been debugging ever since - welcome to the biggest ever beta test
|
|
|
|
|
Hiya have just started learning C# so plz bare with me!!
Currently I output it like ( "User name is {0},username" );
But how do I format text output?? In c++, I would do something like
sprintf( buffer,"%-8.8s",username );
Is this type of formatting still valid in c# ??
Thanks.
|
|
|
|
|
Well, part of that. You cause use:
string.Format("{0:-8}","my string")
To format the text right justify at eight letters. If your string is longer than eight letters it will inlude the full length of the string.
Do a search for "Composite Formattting" and "Formatting Types". Those will help out. The MSDN documentation is a bit scattered about for "Format".
Rocky Moore <><
|
|
|
|
|
This should help you:
Formatting Overview[^]
Briefly the you specify format as (as provided by MSDN):
{index[,alignment][:formatString]}
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
I don't know how to declare the function,is fallowing right?
"
[DllImport("User32.dll")]<br />
private static extern int SendMessage(int hwnd,int msg,int wParam,int lParam); "
The underlined part i am not sure about;
At the same time,I hope to get am example include declare and using ;
Thanks!
|
|
|
|
|
I have written a small debug class so I can echo some statements to the ouput in VS and to a text file, using the StreamWriter class... The problem is, is that the text is never written to the file.
<br />
public class Debug<br />
{<br />
private StreamWriter _writer;<br />
private string path;<br />
<br />
public Debug(string path)<br />
{<br />
this.path = path;<br />
if( File.Exists(path) )<br />
_writer = File.AppendText(path)<br />
else<br />
_writer = File.Create(path);<br />
}<br />
<br />
public void WriteLine(string output)<br />
{<br />
string s = DateTime.Now + "\t" + output;<br />
<br />
System.Diagnostics.Debug.WriteLine(s);<br />
_writer.WriteLine(s);<br />
}<br />
}<br />
Now this is fairly bog standard code foe writing to a file, and even stranger is if i replace the WriteLine procedure with
<br />
public void WriteLine(string output)<br />
{<br />
string s = DateTime.Now + "\t" + output;<br />
System.Diagnostics.Debug.WriteLine(s);<br />
StreamWriter sw = File.AppendText(this.path);<br />
sw.WriteLine(s);<br />
sw.Close();<br />
}<br />
The text is written to the file fine. Can any shed light on this.... What dumbass thing I am I doing wrong?
|
|
|
|
|
Could it be because you are not explictly closing the stream in your original and maybe it is not being flushed?
Personally, in my logging I do not try keep the file open all the time, I use:
public void Write(string message, LoggingLevel level)
{
StreamWriter logFile=null;
lock(this)
{
try
{
logFile = new StreamWriter(fileName, true);
logFile.WriteLine(message);
logFile.Close();
}
catch(Exception)
{
if(logFile!=null)
logFile.Close();
}
}
if(isSystemDebugEnabled)
System.Diagnostics.Debug.WriteLine(s);
}
Rocky Moore <><
|
|
|
|
|
you have to fluch the stream.
Another Post by NnamdiOnyeyiri l Website
|
|
|
|
|
I'm trying to detect which cursor is currently shown on the screen, whether it is a wait cursor, arrow cursor, etc. Right now, the detection works perfectly EXCEPT that there are 3 cursors that i can't seem to detect sometimes - the hand cursor, horizontal and vertical splitter cursors.
The code i'm using is (with the GetCursorInfo API):
Info.Size = Marshal.SizeOf(Info.GetType());
GetCursorInfo(out Info);
if (Info.Cursor == Cursors.WaitCursor.Handle)
CurrentCursor = "Wait";
else if (Info.Cursor == Cursors.Default.Handle)
CurrentCursor = "Default";
else if (Info.Cursor == Cursors.AppStarting.Handle)
CurrentCursor = "Loading";
else if (Info.Cursor == Cursors.Hand.Handle)
CurrentCursor = "Hand";
....
After i did some tests, i noticed that when i convert the values to string, the two values of Info.Cursor and Cursors.Hand.Handle (along with the HSplit and VSplit values as well) do not tally and they tend to change over and over again almost every time i run my application again.
The tests were done by displaying the values of Info.Cursor and Cursors.Hand.Handle using codes like these:
MessageBox.Show(Info.Cursor.ToString());
MessageBox.Show(Cursors.Hand.Handle.ToString());
I did the tests mostly on Applications that have a weblink and also on web browsers. When using a web browser, the detection seems fine (for the hand cursor at least) but when i run an app that has a weblink somewhere and the hand cursor shows up, the values of Info.Cursor and Cursors.Hand.Handle are totally different.
Is there a way around this?
|
|
|
|
|
try using the .NET way, Cursor.Current
Another Post by NnamdiOnyeyiri l Website
|
|
|
|