|
Thanks,
Ok, when I use bringtofront inside of a thread, this function (bringtofront) don't works.
How I can do this works?
Thanks
|
|
|
|
|
First I want to say, sorry for the delayed answer.
Sounds like you have to invoke the BringToFront method: obj.Invoke(new MethodInvoker(obj.BringToFront))
You should do this everytime you want to change the appearance of your GUI from a background thread because otherwise undesirable behaviour can occur e.g. the application freezes.
www.troschuetz.de
|
|
|
|
|
Thanks for you reply.
In this moment I'm going to probe your messages.
Thanks
|
|
|
|
|
I have been trying to work with remoting. I have tried several examples from books and form CP and continue to get this error. I am running XP home with .NET 1.1 and VS.NET 2003
This is the first in a series of errors:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll
Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
Second error:
An unhandled exception of type 'System.TypeInitializationException' occurred in system.dll
Additional information: The type initializer for "System.Net.Sockets.Socket" threw an exception.
Followed by this error:
An unhandled exception of type 'System.TypeInitializationException' occurred in system.runtime.remoting.dll
Additional information: The type initializer for "System.Net.IPAddress" threw an exception.
The Block of code that produces the error is below:
BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 0;
string s = System.Guid.NewGuid().ToString();
props["name"] = s;
props["typeFilterLevel"] = TypeFilterLevel.Full;
TcpChannel chan = new TcpChannel(
props,clientProvider,serverProvider);
ChannelServices.RegisterChannel(chan);
Type typeofRI = typeof(IParachute);
IParachute remObject = (IParachute)Activator.GetObject(
typeofRI,
"tcp://localhost:6123/ParachuteExample");
I would appreciate any insite into my problem.
|
|
|
|
|
Not sure where I can ask this so here goes.
I've used Installshield in the past to make install packages for applications developed in VC++ 6.
I installed VS.NET 2003 Enterprise Architect and now I can't find InstallShield bundled with it. Does this mean I'm going to have to buy it separately (MS no longer bundles this with Visual Studio) ?
Thanks
"One of the Georges," said Psmith, "I forget which, once said that a
certain number of hours' sleep a day--I cannot recall for the moment how
many--made a man something, which for the time being has slipped my
memory."
|
|
|
|
|
You can use the Windows Installer projects in Visual Studio .NET. They're limited and commercial packages will yield more options, but you can use them for simple application. Just click New-<Project, select Setup and Deployment and select the Setup project. That's a Windows Installer project.
To note, two good commercial applications for authoring Windows Installer projects are Wise for Windows Installer[^] and InstallShield Developer[^].
Windows Installer is a standard deployment and InstallShield, from what I hear, is even going to drop their proprietary installation technology to focus solely on Windows Installer (which has been out for many years and has been evolving).
To find out more about Windows Installer, read the Windows Installer SDK[^] documentation.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Thanks very much Heath.
"One of the Georges," said Psmith, "I forget which, once said that a
certain number of hours' sleep a day--I cannot recall for the moment how
many--made a man something, which for the time being has slipped my
memory."
|
|
|
|
|
Is there a way I can relace the add and delete buttons with a gif image in a datagrid?
|
|
|
|
|
Please direct your ASP.NET DataGrid questions to the ASP.NET[^] forum.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I am trying to develop a windows application that I can create add-in modules for, and then clients can purchase these add-ins at an additional cost or whatever, but besides that. I cannot figure out how to start a project like this. Does anybody have any experience with this, and would like to share some source code?
|
|
|
|
|
Try a search[^] here on CodeProject for "plug-in" and you'll get plenty of hits.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Besides here on CP, you can also check out the article titled 'Writing Plugin Based Applications' on this link, Articles[^].
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Hey Roger,
The article looks good, but reading through, it acts as if I need to compile the plug-ins with the main project. What if I want to create the project, and then down the road, create a new plugin and allow my clients to buy it, and add it into the "old app". How do I dynamically load the plugins based on the DLL?
Anthony
|
|
|
|
|
|
Sorry this may be a stupid question but i really don't know why this doesn't work...
a A = new a();
label1.Text = (A as b).give();
The declarations of the classes a and b:
class a
{
public string s;
public a()
{
s = "TEST";
}
}
class b : a
{
public string give()
{
return s;
}
}
thx for any answer
pete
|
|
|
|
|
A is not an instance of b , it's an instance of a . You can't cast an instance like this in C#, so (A as b) is returning null , which is causing the NullReferenceException to be thrown when give() is called.
BTW, you might want to read the Naming Guidelines[^]. Following a naming convention for a particular platform benefits everyone.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Is there a way to put something there like enter password retreive password in ******** datagrid.
|
|
|
|
|
Yes, but you'll either need to implement your own DataGridColumnStyle or extend the DataGridTextBoxColumn . You could define a PasswordChar property, which would look something like this:
public class DataGridPasswordColumn : DataGridTextBoxColumn
{
public DataGridPasswordColumn()
{
TextBox.PasswordChar = '*';
}
[DefaultValue('*')]
public virtual char PasswordChar
{
get { return TextBox.PasswordChar; }
set { TextBox.PasswordChar = value; }
}
} This encapsulates the functionality easily in your DataGridPasswordColumn which you can instantiate and add instances of it to the DataGridTableStyle used by the DataGrid.TableStyles collection property.
You could also do this without implementing your own DataGridColumnStyle derivative. In your Form , UserControl , or whatever you're doing this in set the specific DataGridTextBoxColumn 's TextBox.PasswordChar property. You do not do this for each row, though; the same DataGridColumnStyle derivative is used when a particular cell is editted.
If you want more information on DataGridColumnStyle s, search this site for a handful of decent articles about how to implement your own, or read the documentation for the class which includes a sample implementing a column style with a DateTimePicker control.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I hope someone has encountered this situation before because we are stumped!!
Situation:
We have a fat client application which remotes to an object manager under IIS.
The remoting has been working just fine for the entire year and then we went and 'fixed' things.
We moved our application DLL's into a subdirectory beneath the applications' bin directory.
We added a <runtime> division to the web.config which defined a <probing privatePath="bin; bin\OurDir">.
This is getting recognized by ISS but when it attempts to load my DLL I get this dump message:
System.IO.FileNotFoundException: File or assembly name remoteManagers, or one of its dependencies, was not found.
File name: "remoteManagers"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Runtime.Remoting.RemotingConfigInfo.LoadType(String typeName, String assemblyName)
at System.Runtime.Remoting.RemotingConfigInfo.GetServerTypeForUri(String URI)
at System.Runtime.Remoting.RemotingConfigHandler.GetServerTypeForUri(String URI)
at System.Runtime.Remoting.RemotingServices.GetServerTypeForUri(String URI)
at System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.CanServiceRequest(HttpContext context)
at System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.InternalProcessRequest(HttpContext context)
=== Pre-bind state information ===
LOG: DisplayName = remoteManagers
(Partial)
LOG: Appbase = file:LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Private path hint found in configuration file: bin; bin\TCANavigator.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: remoteManagers
Does ANYONE have a suggestion of how to get rid of this short of moving everything back into the \bin directory????
Thanks!
This signature left intentionally blank
|
|
|
|
|
Get rid of the space in your privatePath . Directories should only be delimited by semi-colons and nothing else.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath,
I checked my source and the actual web.config does not have a space in the privatePath definition. It was just a bad typing into the message on my part. Any other ideas (hopefully as simple!!).
Actual web.config statement:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\TCANavigator"/>
</assemblyBinding>
</runtime>
Michael
This signature left intentionally blank
|
|
|
|
|
So long as that's the case (because spaces will cause problems - I've tested it), then it's possible your permissions on the TCANavigator directory aren't correct. Remember that the file system permissions must allow the ASP.NET account (ASPNET by default) read, list, and execute permissions, while IIS must allow access to the directory for the ASP.NET account.
You might also consider installing your assemblies into the GAC. This is how SharePoint works, along with other larger ASP.NET web application (with larger commercial deployment), because the GAC facilitates side-by-side versioning, assembly redirection, and more; not to mention the fact that you don't have to worry about having separate copies of the same assembly lying around in different ASP.NET web applications.
Installing your assemblies into the GAC would definitely solve your immediate problem.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath,
We are starting to see a "creaping" behaviour with this problem. ie. One machine works fine today then fails tomorrow. Since we are seeing impacts in other applications, I suspect that it is due to the 1.0 / 1.1 framework security patches. (it is getting out slowly to different machines)
The directories (bin and subdir's) all have the same attributes for access rights. Adding Read or Execute does not change the fault occuring. I really think it is specific to the log events that occur.
1) attempts to locate the DLL in the bin directory with partial name.
Not Found.
2) goes to the subdirectory with a partial name and finds it.
3) Framework reports I don't have rights to load by partial name (????)
4) System.IO.FileNotFound
The change in doing a partial name Assembly load is what is killing me. Seems I can do it in \bin but not in any deeper directory without creating some kind of framework permission.
This signature left intentionally blank
|
|
|
|
|
I'm not aware of any such change of the top of my head, but a good place to start researching the problem is http://msdn.microsoft.com/netframework/[^].
To solve the problem without checking for security changes (which I'll do as soon as the page linked from above loads , you can either use a fully-qualified name or qualify the name in the .config to allow for partial name resolution in cases like this. Read about the <qualifyAssembly> Element[^] in the .NET Framework SDK.
...man, this is loading really slow today...
Okay, the following are the links about the changes made in the service packs:- List of bugs that are fixed in the .NET Framework 1.1 Service Pack 1 (SP1)[^]
- List of bugs that are fixed in Microsoft .NET Framework 1.0 Service Pack 3[^]
Unfortunately I don't see anything relevent to your problem, but you might take a second look.
Make sure the resolution above works and determine if the existence of the SP is truly the cause here (it works without; doesn't work with the SP installed). There could be an issue there (be sure to let me know).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
The most common solution is to use a Timer . Since you're using Windows forms, just drop the Timer component on your form and double-click to add an event handler for the Timer.Tick event.
The following sample shows how you should change your current code, as well as what code you should add:
public MyClass()
{
InitializeComponent();
timer1.Interval = SystemInformation + SystemInformation.DoubleClickTime + 10;
}
private void ClickHandler()
{
}
private listView1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private listView1_DoubleClick(object sender, EventArgs e)
{
timer1.Enabled = false;
}
private timer1_Tick(object sender, EventHandler e)
{
timer1.Enabled = false;
ClickHandler();
} It's a simplified example, but it shows the basics of using a timer to distinguish between clicks and double clicks. There are other ways, but using timers is quite simple.
Also note that the .NET BCL (base class library) provides three different Timer classes. You might want to evaluate which one works best for you.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|