|
Something to do with assembly signing I would guess, since that uses cryptographic keysets.
What are your assembly signing settings?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I seemed to have fixed the problem (not sure how I did it, and I hope I can do it again in the future!) But I have another problem. When I run the setup app, I get the Application Install dialog, and it gives the name. I would like to change this name since somehow the name has a date associated with it (and the date has since changed.) I did a search throughout the whole project for the date, and could nto find it. Perhaps it is in the registry somehow?
|
|
|
|
|
I'm just guessing again, but what about the Options dialog on the Publish page of the project's properties?
If you set the name(s) there instead of using the defaults does that fix anything?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark, your suggestion worked. The product name was right there!
|
|
|
|
|
Cool! Lucky guess
Thanks for the update!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi All,
I've spent the last couple of hours looking into a pretty big topic and I don't really feel like I've made any progress on the topic. I'm getting emails from potential users of my application concerned/worried/annoyed about the fact that my app may require a massive download for offline installation (a common scenario for my users).
My app targets XP SP2+ users on 32/64 bit OSes. My app is a .NET 3.5 SP1 based WPF product.
My installer already checks for 3.5 SP1 and contains the dotnetfx35setup.exe that will only download the required bits if the required framework version isn't installed. So for online users the problem isn't massive. However, I would like to make a single self-sufficient install .exe file that can take care of all users rather than pointing offline users to a 200mb+ installer on the Microsoft site.
I've been looking through the myriad files that make up the main dotnetfx35.exe and from what I can gather there isn't actually much I can strip out. Has anyone got any links of info on what can be done?
Scott Hansleman has some blog posts and this is pretty cool http://windowsclient.net/wpf/wpf35/wpf-35sp1-client-profile-deployment-photosuru.aspx[^] but I'm still none the wiser as to what I can actually get away with stripping out.
Considering that I'm including XP/Vista and 32/64 bit I still need to carry .NET2.0 / .NET3.0 / .NET3.5 stuff which is arguably nearly all of it!! Feels like I'm stuck with the massive download situation ...
Not to mention the worry of trashing a users .NET install altogether. Any info or pointers would be really appreciated.
Cheers,
|
|
|
|
|
I've not played with the Client Profile, so I can't give any pointers there, but I do have another potential option for you. If your users have a worry on this, you could create two types of installs. One that has links to the redistributables, and the other that is merged together using ILMerge[^]. The ILMerge version would be a lot bigger than the other version, but it won't contain the whole framework, only the bits you need.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Whoa, I'd forgotten about that util. Would it be safe to actually merge the system.dll / presentationcore.dll etc ... ?
|
|
|
|
|
I've never really tried. Theoretically, you should be OK, but it would be worth experimenting.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Gotcha. Will have a read around the subject and see what pops out!
Thanks Chap.
|
|
|
|
|
Hi,
I'm trying to write application where I use series of PNG files for animations. I created control which loads Images from file into ArrayList, and then on specified timer interval I change picture that I want to display. I'm using 1280x720 PNGs.
I have 2 problems here:
1) My PNG is around 300KB, and when I execute Image.FromFile("my.png") memory of my process is increased for 4MB. So, if I load 30 pictures, memory will grow to around 130MBs and the problem is that I have to keep lot of images loaded into memory since I'm using it constantly during execution time.
2) performances of DrawImage functions are quite bad and I cannot get proper speed (if I need 25 frames per second for example)
Does anyone have some suggestions how to solve this?
Thnx in advance!
|
|
|
|
|
Firstly, PNGs aren't really the best way to do animations. You should maybe think about using GIF images instead.
ddavor wrote: 1) My PNG is around 300KB, and when I execute Image.FromFile("my.png") memory of my process is increased for 4MB. So, if I load 30 pictures, memory will grow to around 130MBs and the problem is that I have to keep lot of images loaded into memory since I'm using it constantly during execution time.
I suspect (although I haven't tried it) that the 4MB jump is mainly a one-off overhead, and you won't get that increase on subsequent image loads. Try it and check though.
ddavor wrote: 2) performances of DrawImage functions are quite bad and I cannot get proper speed (if I need 25 frames per second for example)
You're drawing a 300KB 1280 x 720 PNG image, so I'm not surprised it's a bit slow...
An animated GIF will automatically play when loaded (although if you keep to that size it may still be a bit slow - again you'd need to test it) and if you can reduce the quality a bit you can probably reduce the file size to something more reasonable.
Alternatively, combine the images into an AVI and use a simple AVI player to show the animation.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Hi,
Thnx for your reply, but I need high quality of graphics with transparency etc. So, GIF and Avi are not solutions.
Thnx!
|
|
|
|
|
Well, GIF images do support transparency, although it's just on/off rather than an alpha value, so you could possibly use that format depending on your use of transparency. GIF also isn't as good for "photo-style" images, where there are a lot of colour gradients, but it works well for images where there are a lot of colour bocks, lines etc. (In fact, for diagrams with lots of colour blocks and sharp edges, it gives much better results.)
AVIs can be as high quality as you want as well. You can choose the resolution and whether you want any compression applied. AVIs can have transparency as well, but you'd need to make sure you support that in your player.
I wouldn't write of GIF or AVI immediately, as they might, with a little bit of fiddling, be suitable for your needs. If not, I'm not sure what you can do to improve frame rate...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
AVI could do the quality, however the transparency could be a problem. 1280x720 is a LOT of real estate to cover, if the entire area isn't being animated at the same time, you might be better off only redrawing the parts of the screen that change. Or moving a picture around the screen as the animation.
Aside from that, your next step would probably be using managed DirectX to pile all those graphics into buffers.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
ddavor wrote: I execute Image.FromFile("my.png")
This response is nothing to do with your main problem, but Image.FromFile has been known to cause problems with files becoming locked. The general recommendation is to use Image.FromStream .
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.”
|
|
|
|
|
I am having an issue on a photo gallery that is random. I add a photo and it is supposed to save the location in an Access DB backend. It then has a thumbnail view for the photo. At random I get a red X instead of a thumbnail and get an error...its COMPLETELY RANDOM...if I clear the photo from that thumbnail and re-add it...it adds the photo, but continues to give me red X's and I have to clear and re-add...
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.get_FrameDimensionsList()
at System.Drawing.ImageAnimator.CanAnimate(Image image)
at System.Drawing.ImageAnimator.ImageInfo..ctor(Image image)
at System.Drawing.ImageAnimator.Animate(Image image, EventHandler onFrameChangedHandler)
at System.Windows.Forms.PictureBox.Animate(Boolean animate)
at System.Windows.Forms.PictureBox.Animate()
at System.Windows.Forms.PictureBox.InstallNewImage(Image value, ImageInstallationType installationType)
at System.Windows.Forms.PictureBox.LoadCompletedDelegate(Object arg)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Program
Assembly Version: 1.0.4.15
Win32 Version: 1.0.4.15
CodeBase: file:///C:/Program%20Files/Program/Program.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
NHibernate
Assembly Version: 2.0.1.4000
Win32 Version: 2.0.1.4000
CodeBase: file:///C:/Program%20Files/Program/NHibernate.DLL
----------------------------------------
log4net
Assembly Version: 1.2.10.0
Win32 Version: 1.2.10.0
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/log4net/1.2.10.0__1b44e1d426115821/log4net.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Iesi.Collections
Assembly Version: 1.0.0.3
Win32 Version: 2.0.1.4000
CodeBase: file:///C:/Program%20Files/Program/Iesi.Collections.DLL
----------------------------------------
NHibernate.JetDriver
Assembly Version: 2.0.0.2001
Win32 Version: 2.0.0.2001
CodeBase: file:///C:/Program%20Files/Program/NHibernate.JetDriver.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
gl5flowv
Assembly Version: 2.0.1.4000
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
cnoliknr
Assembly Version: 2.0.1.4000
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
|
|
|
|
|
Well my guess is that there is a problem loading the image from the database. Can you give more information and show the code you are using to load the picture from the database and loading from new.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
The image loading is done by a "pictureBox.ImageLocation=" statement. It happens sometimes when loading and adding photos using right click. If you need some code can I email it to you.
|
|
|
|
|
put the code on here.
the thing with picture boxes is when you load them directly from a file they can cause problems with access to the files. When loading picture boxes it best to load it from a memory stream, something like this...
PictureBox1.Image = Image.FromStream(new MemoryStream("imagefile"));
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Here you go...
This is the picture box creation code:
PictureBox pictureBox = new PictureBox();
pictureBox.Left = (i % 10) * 36 + 4;
pictureBox.Top = ((i / 10) + startRow) * 36 + 4 - galleryScroll;
pictureBox.Width = 32;
pictureBox.Height = 32;
pictureBox.BorderStyle = BorderStyle.FixedSingle;
pictureBox.ContextMenuStrip = pictureMenu;
pictureBox.Click += galleryPictureBox_Click;
pictureBox.Visible = true;
panel1.Controls.Add(pictureBox);
Below is the image loading thread:
delegate void SetupGalleryBoxCallback(PictureBox box, Image image, bool showError, string tooltip);
private void setupGalleryBox(PictureBox box, Image image, bool showError, string tooltip)
{
if (this.InvokeRequired)
{
SetupGalleryBoxCallback d = new SetupGalleryBoxCallback(setupGalleryBox);
this.Invoke(d, new object[] { box, image, showError, tooltip });
}
else
{
if (image != null)
{
box.SizeMode = PictureBoxSizeMode.Zoom;
box.Image = image;
}
else if(showError)
{
box.SizeMode = PictureBoxSizeMode.CenterImage;
box.Image = box.ErrorImage;
}
Program.tooltip.SetToolTip(box, tooltip);
}
}
void imageLoadingThread()
{
int count = (_galleryItems != null) ? _galleryItems.Count : 0;
Image errorImage = galleryLargePictureBox.ErrorImage;
for (int i = 0; i < _galleryPictureBoxes.Count; i++)
{
if (i < count)
{
object[] galleryItem = (Object[])_galleryItems[i];
String imagePath = (string)galleryItem[0];
String toolTip = (string)galleryItem[2];
if(imagePath != null)
imagePath = imagePath.Trim();
if (imagePath != null && imagePath.Length > 0)
{
try
{
Image image = Image.FromFile(imagePath.Trim());
setupGalleryBox(_galleryPictureBoxes[i], image, false, toolTip);
}
catch (Exception)
{
setupGalleryBox(_galleryPictureBoxes[i], errorImage, true, toolTip);
}
if (i == _galleryPictureBoxes.Count - 1 && imagePath != null)
addPictureBoxes(1);
}
else
setupGalleryBox(_galleryPictureBoxes[i], null, false, toolTip);
//Console.WriteLine("Comment={0}", (string)((object[])_galleryItems[i])[2]);
}
else
_galleryPictureBoxes[i].ImageLocation = null;
}
}
|
|
|
|
|
Hi,
I need to use VSConstant class present in Microsoft.VisualStudio.Shell.9.0 in my program.
To that effect, I add at the top of my .cs file:
using Microsoft.VisualStudio.Shell.9.0;
VS2008 (Standard version) says that Microsoft.VisualStudio.Shell.9.0 does not exist in the namespace. Am I missing an assembly reference? Note that I can locate the Microsoft.VisualStudio.Shell.9.0 assembly in C:\assembly.
The same problem occurs if I wanted to use Microsoft.VisualStudio.Shell.
I right clicked on the "Reference" in the solution explorer and wanted to add then a reference to Microsoft.VisualStudio.Shell.9.0 assembly. It did not appear in the .NET list. I browsed then with the BROWSE tab. I locate the assembly and pressed OK. Even though it looks like it was loaded, the reference does not appear anywhere and VS2008 is complaining.
Would you have any idea how to come out of this?
Thanks beforehand if you have any idea.
P.S.: I have also installed previously on this PC VisualC#2008 Express. Could this be the problem?
|
|
|
|
|
I'm guessing you need to download and install the Visual Studio Shell[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have asp.net web application on my server side. There is one device at my client side, that device send me data using my ip address and one port no(iis port). i want to show that data in my default.aspx page how can do this??
please help me
|
|
|
|
|
Please don't try to bump your post. This is very bad form.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|