|
I have a question about PictureBox:
I use a PictureBox to show my picture,
Now if I want to insert some small pictures on it,
I am not sure how many pictures will be inserted,
How can I show and save the positions of these pictures,
then I can show it next time...??
Please give me a hand,thanks a lot ~
ps.I use C# language
|
|
|
|
|
First, this should have been posted in the C# forum.
I use a PictureBox to show my picture,
Now if I want to insert some small pictures on it,
I am not sure how many pictures will be inserted,
How can I show and save the positions of these pictures,
then I can show it next time...??
The easiest way to do this would be using GDI+. You can draw each little picture separately, and store their positions in arrays. Then when the form closes, save the array into a textfile.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
When I make an installer project I get a set of files that have to be either zipped or packaged somehow. Is it possible to use .NET to make a setup .exe only containing everything I need? 
|
|
|
|
|
You should create a project whose type is a setup project. By doing so you can assign the files needed to get installed by using the filesystem editor(the area where you can see the application folders and the likes...). When you build the project it will create a setup.exe and its equivalent .msi file. Both are executable files 
|
|
|
|
|
i have the same problem, when i made a new deployment prject..on build i must exclude the .net framwork from the project, so i must install it separete on the client machine, have u got any way to include the dot net framwork on the project? else i want to include the internet explorere update and the mdac 7.2
|
|
|
|
|
http://www.codeproject.com/dotnet/dotNetInstaller.asp?target=bootstrapper
It seems to be the program going around to install the .NET framework with our applications. 
|
|
|
|
|
Does anyone know how to set environment variables in .NET?
|
|
|
|
|
The System.Environment class has methods to read the environment variables. However, this class has no method to set the environment variables for the current process.
To work around this problem, use the interop services to set the environment variables. Use SetEnvironmentVariable function.
ex
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
namespace SetEnv
{
///
/// Summary description for Class1.
///
public class SampleSetEnvironmentVariable
{
// Import the kernel32 dll.
[DllImport("kernel32.dll",CharSet=CharSet.Auto, SetLastError=true)]
[return:MarshalAs(UnmanagedType.Bool)]
// The declaration is similar to the SDK function
public static extern bool SetEnvironmentVariable(string lpName, string lpValue);
public SampleSetEnvironmentVariable()
{
}
public static bool SetEnvironmentVariableEx(string environmentVariable, string variableValue)
{
try
{
// Get the write permission to set the environment variable.
EnvironmentPermission environmentPermission = new EnvironmentPermission(EnvironmentPermissionAccess.Write,environmentVariable);
environmentPermission.Demand();
return SetEnvironmentVariable(environmentVariable, variableValue);
}
catch( SecurityException e)
{
Console.WriteLine("Exception:" + e.Message);
}
return false;
}
}
class MyClass
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
// Create a sample environment variable and set its value (for the current process).
SampleSetEnvironmentVariable.SetEnvironmentVariableEx("TESTENV", "TestValue");
// Verify that environment variable is set correctly.
Console.WriteLine("The value of TESTENV is: " + Environment.GetEnvironmentVariable("TESTENV"));
}
}
}
Hi all this is Deeps..
|
|
|
|
|
During loading HTML page into HTMLDocument (IHTMLDocument2.write method), how could be launching of scripts in that page prevented?
|
|
|
|
|
Anyone out there know of a .net control for writing/printing cheques?
Can't seem to find anything!
Thanks, Brent
|
|
|
|
|
Do people still use cheques?!?
[Sorry, I don't know of such a control]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Most people don't
Most Businesses still do :*)
Brent
|
|
|
|
|
|
I wish there was an advanced .NET board but here goes.
Does anyone have experience with sending faxes from a .NET Website? I believe I am looking for a service that would allow someone to fax a PDF document or the actual web page to someone. I have looked around and saw a few but I am not sure about the system requirements. It looks like some of them are Web Services with no installations which is good (I think). It will be on a shared hosting plan but hopefully my shared hosting plan if anything special is needed.
Thanks.....Rob
Rob Taylor
www.tconsult.com
|
|
|
|
|
My colleagues and I are using .NET 2003 along with visual source safe on our developments. We keep running into compilation problems where we have multiple projects in our solution and some of the projects have references to other projects in the same solution. We keep getting errors when we compile saying that Visual Studio can't copy the dlls that we are making into the runtime folder because they are being held by another process. We've tried endless permutations of the Copy Local property on each of the references.
Has anyone run into similar problems?
does anyone know how to help?
Thanks.
|
|
|
|
|
|
Some advice:
1. always use project references. if you look in your .csproj file you'll notice the references use GUIDs, this means you have a project ref. however, you can only do this if you are referencing a project in the same solution.
2. if you have web projects, delete your VsWebCache, and make sure you don't have a run away process. just to be safe you could kill aspnet_wp.exe or restart iis.
[deleting vswebcache]
[STAThread]<br />
static void Main(string[] args)<br />
{<br />
foreach (string dir in Directory.GetDirectories(@"c:\documents and settings"))<br />
{<br />
string webCacheDir = dir + @"\VSWebCache";<br />
if (Directory.Exists(webCacheDir))<br />
{<br />
Console.WriteLine("Deleting " + webCacheDir + "...");<br />
Directory.Delete(webCacheDir, true);<br />
}<br />
}<br />
}
R.Bischoff
Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben
|
|
|
|
|
Hi!
Is there anyone who knows whether it is possible to use more than 2 GB of main memory with the .net framework on a 32 Bit resp. 64 Bit system?!
|
|
|
|
|
|
Hi,
Soliant is quite true.
I once wrote a small program which went through the file system recursively and stored the streams of all files in a hashtable...
The prog worked fine in loading more than 2 GB of data in the memory... it seemed as if it was efficiently and smartly doing paging... without any error...
But obviously in this case other application's performance was getting affected.
regards
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
I have a form with controls bound to a DataView (could also be a DataTable). Every navigation example I see shows the typical "previous", "next", "first", and "last" navigation using buttons. I'm interested in being able to navigate (directly) to a given position in the BindingContext.
For example, if I know the primary key value of an entry in the data table, how do I directly navigate to that position within the BindingContext? Is there some way to use the Find method for the data table and then back into the corresponding position in the BindingContext?
Right now I am starting at the beginning of the BindingContext and iterating through each entry until I find the entry I'm looking for. This is an order O(n) operation and I'm hoping to find something much faster.
Kurt
|
|
|
|
|
i have the same prob 
|
|
|
|
|
Just wondering:
Is someone using another framework, like Mono or Portable.NET ?
----------------------
I think war is a dangerous place.
George W. Bush - Washington DC, May 7th 2003
|
|
|
|
|
|
Portable.NET is not equivalent to the compact framework. Its goal is, like Mono, to rebuild a complete framework. It runs on GNU/Linux, Windows, Solaris, NetBSD, FreeBSD and MacOS X.
I've installed both Mono and P.NET under Linux, and... well it works, even if the System.Windows.Forms namespace and others are not very complete.
See www.go-mono.com
and
www.southern-storm.com.au/portable_net.html
for more info.
----------------------
I think war is a dangerous place.
George W. Bush - Washington DC, May 7th 2003
|
|
|
|