Where is the parameter argument collection?
Hi! I have hundreds of functions. I would like to make a debug possibility.
The first task is to list the parameter collection with a cycle. Where is the
function parameter argument collection?
thx.
mcskf Tag: mixing assemblies Tag: 119802
WM_KeyUp message on ComboBoxes
The WM_KeyUp message doesn't seem to be firing for a combobox when the
DropDownType is set to DropDown. Can anyone shed light as to why, and how to
get around it? I'm trying to fix the NoKeyUpCombo inherited combobox (code
below) to work with true ComboBoxes (where you can type into the box OR
select from the list), but every DataGridComboBoxColumn example out there
seems to only support the DropDownType of DropDownList.
Here's the control for those that haven't seen it (the reason for cancelling
the KeyUp is to prevent double-tabbing - the tab KeyDown and KeyUp events
both cause a cell change for some reason):
Public Class NoKeyUpCombo
Inherits System.Windows.Forms.ComboBox
Private Const WM_KEYUP As Integer = &H101
Private Const WM_MOUSEWHEEL As Integer = &H20A
Protected Overrides Sub WndProc(ByRef theMessage As
System.Windows.Forms.Message)
If theMessage.Msg = WM_KEYUP Then
Return
Else
MyBase.WndProc(theMessage)
End If
End Sub
End Class Tag: mixing assemblies Tag: 119799
Using IPC question: one process as IPC client and server at same time problem.
Hi!
Each machine is running couple of processes. Each process is using my
Cache object.
The question: how to notify "other" processes when cache of any process
became invalid? I mean to set communication between processes.
I've started to implemented IPC channel, but it couldn't be
implemented, because in my case each process should be client of all
others process and also should be a server for all other clients(other
processes) as well.
I've planned to run follow code on static constructor of Cache object,
But it doesn't work.
Error Message i got:
Attempt to redirect activation for type 'MyTest.CacheChangeNotifier,
MyTest.Cache'. This is not allowed since either a well-known service
type has already been registered with that type or that type has been
registered has a activated service type
I wan't to create each other exe separate notificatior class.
------------
static Cache()
{
m_ProcessesNode =
(XmlNode)Settings.GetData("ExternalProcesses");
RegisterServerChannelIPC();
RegisterClientChannelsIPC();
}
private static void RegisterServerChannelIPC()
{
Hashtable properties = new Hashtable();
BinaryServerFormatterSinkProvider serverProv = new
BinaryServerFormatterSinkProvider();
serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
string portName =
System.Diagnostics.Process.GetCurrentProcess().ProcessName;
properties["portName"] = portName;
properties["authorizedGroup"] = "Everyone";
IpcServerChannel chan = new IpcServerChannel(properties,
serverProv);
chan.StartListening(null);
ChannelServices.RegisterChannel(chan, false);
Assembly assemblyObject = Assembly.LoadFrom(m_InstallPath +
m_ProcessesNode.SelectSingleNode("assembly").InnerText);
Type myType;
myType =
assemblyObject.GetType("MyTest.CacheChangeNotifier");
RemotingConfiguration.RegisterWellKnownServiceType(
myType,
"Cache", WellKnownObjectMode.SingleCall);
}
private static void RegisterClientChannelsIPC()
{
XmlNodeList processesList =
m_ProcessesNode.SelectNodes("ExternalProcess");
m_RemoteObjects = new List<CacheChangeNotifier>();
foreach(XmlNode nodeProcess in processesList)
{
if(nodeProcess.InnerText !=
System.Diagnostics.Process.GetCurrentProcess().ProcessName)
{
IpcClientChannel clientChannel = new
IpcClientChannel(nodeProcess.InnerText + "_Client", null);
clientChannel.IsSecured = false;
ChannelServices.RegisterChannel(clientChannel,
false);
Assembly assemblyObject =
Assembly.LoadFrom(m_InstallPath +
m_ProcessesNode.SelectSingleNode("assembly").InnerText);
Type myType;
myType =
assemblyObject.GetType("MyTest.CacheChangeNotifier");
RemotingConfiguration.RegisterWellKnownClientType(myType, "ipc://" +
nodeProcess.InnerText + @"/Cache");
CacheChangeNotifier item = new
CacheChangeNotifierClient();
m_RemoteObjects.Add(item);
}
}
}
internal class CacheChangeNotifier : MarshalByRefObject
{
internal virtual void Clear_Notify(string cacheID)
{
Cache.GetCache(cacheID).Clear();
}
}
internal class CacheChangeNotifierClient : CacheChangeNotifier
{
}
internal class CacheChangeNotifierServer : CacheChangeNotifier
{
}
public ClearCache(string id)
{
foreach(CacheChangeNotifier notifProxy in m_RemoteObjects)
{
try
{
notifProxy.Clear_Notify(id);//it will run in remote
process
}
catch(Exception ex)
{
EventLogger.WriteMessage("Cache proxy Clear_Notify(
) failed\n" + ex.Message);
}
}
}
------------
Error Message i got:
Attempt to redirect activation for type 'MyTest.CacheChangeNotifier,
MyTest.Cache'. This is not allowed since either a well-known service
type has already been registered with that type or that type has been
registered has a activated service type
Any suggestions?
Thanks in advance,
Evgeny Tag: mixing assemblies Tag: 119798
Sending chr(255) to serial port
Hi
I need to send a chr(255) to a serial port. When I send it, through
comm.write (chr(255)) it sends a chr(63) ... in Hex, I write chr(&FF) and it
actually sends chr(&3F) ... why does this happen, and how can I send it
right ?
I'm using vb.net 2005 express with framework 2.0
Thanks for an answear ...
Mike Tag: mixing assemblies Tag: 119796
VS.Net 2003 Debugger Problem
Hi !
I am getting this error when I try to run a web project :
"Cannot start debugging. Unable to find Microsoft Internet Explorer."
This is happening even if I have a brand new web app, without a single line
of code !
Please help. Tag: mixing assemblies Tag: 119794
Books for building Frameworks
Hi NG.
Can you tell me some books which deals with building my own Application
Framework?
I've already the book from Xin Chen. Are there some more?
Thanks in advance
Stefan Tag: mixing assemblies Tag: 119792
communicate between two exe applications
Hi,
There are are two app,named App1 and App2.
When run App1, it will run App2 automatically.
On the other hand, when terminate App1, App2 will aslo be terminated.
I think App1 and App2 in a different domain, how to communicate them?
I don't want to use process.kill() method to find and kill app2 process
when App1 terminated.
does "delegate" can do it? Tag: mixing assemblies Tag: 119791
SaveFileDialog translation issue
Hi all.
In my application I use SaveFileDialog as follows.
SaveFileDialog exportFileDialog = new SaveFileDialog();
exportFileDialog.Filter = "csv files (*.csv)|*.csv";
exportFileDialog.RestoreDirectory = true ;
exportFileDialog.CreatePrompt = true;
Since I have enabled CreatePrompt to true, for every new file am
prompted with a message box with the following message.
"C:\xyx.csv" does not exist. Do you want to create it?"
My issues is that, when I execute this application in French Windows
XP, title and the buttons of this message box are translated to French
but the above message is in English. I don't understand why this
message ("...does not exist. Do you want to create it?") is not
translated to French?
Title was translated to "Enregistrer sous" and OK and cancel was
translated to "Oui" & "Non".
Thanks in advance.
SaveFileDialog translation issue Tag: mixing assemblies Tag: 119790
Launching and Monitoring Executables
I have a Windows Service I am writing in C# and a set of, let us say
three, other executables written in C# (mostly console applications).
I want that the Windows Service must do so every few seconds:
Check to see if each of the other executables are running or not. If
they are not running, it should load them.
For this purpose, I am planning the following:
I'll take a timer object and set it to an appropriate interval. In the
timer's timer/elapsed event, I will check if the other executables are
running or not. For checking that, I can use either of the following
approaches:
1. Use OpenProcess/CreateProcess with LP_SECURITY_ATTRIBUTES set to
NULL and with PROCESS_INFO. This will give me everything I need to
know, like, the threadID, the processID, in order to determine if the
process is running or not. The processID will be constant throughout
the life of each process. This will help me check if a process is
running or not.
2. ShellExecute/ShellExecuteEx - I am not sure if this is the right
approach. If I am assuming correctly, ShellExecuteEx only sets
GetLastError and returns a bool/int indicating success or failure. This
may not be the approach I might want to take as this will not give me
any information as to the status of the executable I have launched.
Besides, even semantically, this method might not be suited for the
purpose I have at hand, which is not to "launch documents in their
associated application."
3. Create a new app domain for each process I want to launch, add all
the appDomains to the same process, call ExecuteAssembly the
Application Domain for each executable I want to launch.
However, with the third approach, my knowledge of application domains
is still limited. I have a couple of questions in this regard.
a. Given that all this checking will be performed by a Windows Service,
which is not really a Win32 process, like ordinary Windows PE files or
executables, whether managed or unmanaged, what are the implications of
creating appdomains from within a Windows service? Is it an alright
thing to do to launch other Win32 processes from within a Windows
service?
b. Would it be possible for me to monitor the lifetime of an executable
which I execute inside an application domain? Remember that my main
purpose is to monitor in a timer if an application is running or not,
and if not, to launch it again.
c. What is the difference between System.AppDomain.Load() and
System.AppDomain.ExecuteAssembly()? Sorry, I am being lazy here, but it
is easier to ask a forum. I'm on my way to the MSDN, anyway. But kindly
oblige.
Thanks very much for your thoughts. Tag: mixing assemblies Tag: 119789
HttpWebRequest Headers and Host
Hi,
I would like to ask a question .
i need to write a code that connects to a site (for example
www.example.com)
by with a different host (for exapmple www.something.com) .
i read in msdn that i can not change the host with WebRequest.
i did a search in the web and i found in google groups a code that
seems like an answer .
http://groups.google.com/group/microsoft.public.dotnet.framework/browse_thread/thread/17c5369520221c8/4e768c733ad2f451?q=HttpWebRequest+and+Host+Header&rnum=1#4e768c733ad2f451
i tried to write this like "Dave P" suggested but i get and error "The
remote server returned an error: (502) Bad Gateway."
so i read more an i found that this error created because of proxy
error.
can some one please help me with this problem .
The Code i wrote is :
ASCIIEncoding encoding = new ASCIIEncoding();
string postData =
"ltmpl=login&continue=https://adwords.google.com/select/gaiaauth&followup=https://adwords.google.com/select/gaiaauth&service=adwords&nui=3&fpui=1&ifr=true&rm=hide<mpl=login&hl=en-US&alwf=true&GA3T=pGTxzAH_vFg&Email=advertising@compile.co.il&Passwd=moman81&null=Sign
in";
byte[] data = encoding.GetBytes(postData);
string url = "http://www.something.com";
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create(url);
myRequest.Proxy = new
WebProxy("http://www.example.com",false);
myRequest.Method = "POST";
myRequest.AllowAutoRedirect = true;
myRequest.ContentType =
"application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
// Send the data.
newStream.Write(data, 0, data.Length);
newStream.Close();
WebResponse myResponse = myRequest.GetResponse();
Stream ReceiveStream = myResponse.GetResponseStream();
Encoding encode =
System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader(ReceiveStream,
encode);
string str = readStream.ReadToEnd();
readStream.Close();
myResponse.Close(); Tag: mixing assemblies Tag: 119788
aspnet user
as we know The .NET Framework runs all ASP.NET processes under the local
ASPNET
account.
is there anyw ay that I can change the user and instead of a local user use
a Domain user ?
thnx
Mahmoudreza Tag: mixing assemblies Tag: 119765
Enterprise Library 2.0 installation problem
I have tried to install the Enterprise Library 2.0 on my machine with VS 2005
Standard. I get the first welcome screen, hit next and get a "Fatal Error"
"Installation ended prematurely because of an error." I cannot find any
information on this. Tag: mixing assemblies Tag: 119761
Testing for invalid characters when creating a directory?
Is there an easy way to test a directory name for invalid characters before
trying to create that directory? I know how to get a character array of
invalid characters (Path.GetInvalidPathChars) but do I have to go to all of
the trouble of writing of my validation method or is there something built
in to the .NET Framework that I haven't found yet? Tag: mixing assemblies Tag: 119760
Intra-thread lock
Hi
Is there something like an intra-thread lock? I'm trying to prevent
re-entrant code, and the lock statement will only prevent one thread
from entering the critical section while another thread is in it -
since my code is triggered by a gui event, it's not impossible that it
could be called twice from the same thread. I could simulate a lock by
having a private variable "busy" and setting that to true when I start
processing, false when I stop, and check it before I begin processing -
but then either I have to throw an exception if I'm already busy
processing (which I'd prefer not to do), or I'd have to use a polling
wait loop to simulate a blocking call - which seems ugly.
Any ideas of a better way to do this?
Thanks Tag: mixing assemblies Tag: 119755
Convert asynchronous to synchronous
Hi
I have a method which I want to present as a synchronous call - you
pass in your parameters, and the result as a return value. But within
that method, I need to spin off a thread, wait for it to finish doing
some stuff, and return a value to the calling method. The problem is
that my method may be called on the gui thread (since it's out of my
control where my method is called from), and the gui will become
unresponsive while my method is running if I wait for the thread to
finish using Thread.Join. So what I'm doing at the moment is a loop
like this:
while (Thread.IsAlive)
{
Thread.Sleep(100);
Application.DoEvents();
}
Now I know that using Application.DoEvents like that is horrible, but I
can't see any other way to wait for the thread to finish before
returning the value to the calling method. Sure, I could pass the
thread a delegate to call when it's finished, but I want the whole
process to appear to be synchronous to the calling method. Is there a
better way to accomplish this? Tag: mixing assemblies Tag: 119754
DataGridView Help
DataGridView bind to DataSet which read data from a XML file, when I edit
the cell value and save back, it's ok; but when change the cell value
programmaticlly, the value can not save back to XML file.
Help , please! Tag: mixing assemblies Tag: 119749
How to track Form.WindowState changes?
Apparently there are no event associated with a change of the form's
WindowState property.
How do I know when my windows has been miniaturized? Tag: mixing assemblies Tag: 119748
Could not create Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
Hi Expert,
I am the fan of VB My.Application.Log. When I create a new project, it
works but after some times My.Application.Log.WriteEntry nno longer
work. Exception is enclosed:
Could not create Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL.
System.Configuration.ConfigurationErrorsException was caught
BareMessage="Could not create
Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL."
Line=0
Message="Could not create
Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL."
Source="System"
StackTrace:
at System.Diagnostics.TraceUtils.GetRuntimeObject(String
className, Type baseType, String initializeData)
at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at
System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
at System.Diagnostics.TraceSource.Initialize()
at System.Diagnostics.TraceSource.get_Attributes()
at
Microsoft.VisualBasic.Logging.Log.DefaultTraceSource.get_HasBeenConfigured()
at Microsoft.VisualBasic.Logging.Log..ctor()
at
Microsoft.VisualBasic.ApplicationServices.ApplicationBase.get_Log()
at NoClone.AppLogHelper.LogSearchStart() in C:\Documents and
Settings\Alan\My Documents\Project1\AppLogHelper.vb:line 46
The innerException is {"Illegal characters in path."}
Please advice.
Alan Tag: mixing assemblies Tag: 119746
MSBuild heirarchy of projects like corext
I'd like to use msbuild to build on a heirarchy of projects, based on the
directory structure of the sources like CoreXt does.
Is there a good way to do this?
I'd like to have some folders where external libraries are located, and some
folders where some libraries are built. Further, I'd like to have other
projects which depend on some of these libraries, and also depend on each
other. I'd like to organize these projects in seperate folders, but I dont'
want to have a master "Solution" file which knows about all of these. I
would like to have each project as an independent entity and allow the build
to be started from anywhere in this heirarchy.
For example, a root directory would contain several subdirectories, each of
which would contain several projects, or even more subdirectories with more
projects. I like the notion of the corext dirs file which allows
independently adding/removing projects from the "build" by just editing the
dirs file in the projects parent directory.
Is there a good way of doing this with msbuild? If msbuild does not support
this sort of thing, will it in the future?
--
Jaan Tag: mixing assemblies Tag: 119744
Possible VS2003 c# compiler bug: error CS0584: Internal Compiler Error: stage 'COMPILE' symbol ''
Hi everybody!
It's the second time it happens to me... Working with typed DataSets
and doing copy & paste, I compile and get weirds messages like these:
An internal error has occurred in the compiler. To work around this
problem, try simplifying or changing the program near the locations
listed below. Locations at the top of the list are closer to the point
at which the internal error occurred.
error CS0584: Internal Compiler Error: stage 'BIND' symbol
'WindowsApplication1.Form1.Form1_Load(object, System.EventArgs)'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol
'WindowsApplication1.Form1'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol
'WindowsApplication1'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol ''
error CS0586: Internal Compiler Error: stage 'COMPILE'
Once you get one of these you must exit VS2003, because the compiler
does not work anymore...
Here is how to reproduce it:
Create a Solution, with 2 projects, one client app and one class
library.
In the class library proyect add a typed Dataset, and a class with a
method like this:
public MyDataset FakeFunction (MyDataset.ClassificationDataTable table)
{
return new MyDataset();
}
In the client app, call the method in this way (here's where the error
is):
MyDataset ds2 = MyClass.FakeFunction(ds.ClassificationDataTable);
That is you miss it doing copy-paste, you should have written:
MyDataset ds2 = MyClass.FakeFunction(ds.Classification);
And you got the evil messages, very descriptive, aren't they?
The curious thing about it is that if you place the class with the
method and the Dataset in the client app proyect, the error message is
accourate, so the error only happens when referencing another project:
error CS0572: 'ClassificationDataTable': cannot reference a type
through an expression; try
'ClassLibrary1.MyDataset.ClassificationDataTable' instead Tag: mixing assemblies Tag: 119743
system.drawing.printersettings.installedprinters not enumerating all printers!
I have a problem on a specific pc...
On the PC, in control panel > Printers there are a few printers listed,
including a printer that is a network share on another PC.
I have some code that adds these printers to a combobox so that the user can
pick a printer, this code is :
======================================
Dim pkInstalledPrinters As String
' Find all printers installed
For Each pkInstalledPrinters In _
PrinterSettings.InstalledPrinters
Me.ComboBox1.Items.Add(pkInstalledPrinters)
Next pkInstalledPrinters
=================================
The printer in question just doesn't display! The pc is Windows XP
Professional SP2, and the project is vb.net/Framework 1.1.
Is this a bug with the framework, or possibly something on the PC in
question?
Many thanks in advance
Simon
--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD
Tel: 0870 080 2300
Fax: 0870 735 0011 Tag: mixing assemblies Tag: 119742
Getting the values of checkbox(es) checked in a checkboxlist using JavaScript
Hi All,
I am using CallBack feature in ASP.NET 2.0 and I am running into a
problem with checkboxlist control.
I have to find out which checkboxes are checked and get their values at
client-side(using JavaScript) but always I get a value
"undefined"....this code works for all other controls except
checkboxlist and radiobuttonlist controls. I am pasting my code below
Please let me know wht am i doing wrong.
At Server Side:-
chkBoxList.Attributes.Add("onclick", "UseCallBack('" &
chkBoxList.UniqueID & "');")
At ClientSide:-
function UseCallBack(cntrlName)
{
var cntrlID = cntrlName.split("$") ;
var cntrlValue = listValues(cntrlName);
var cntrlNameValue = cntrlID + '~' + cntrlValue;
GetCallBack(cntrlNameValue, "");
}
function listValues(objectName)
{
var list = null;
for (var i=0; i<objectName.length;i++){
if (document.getElementById(objectName[i]).checked)
{
list += objectName[i].value + ',';
}
}
return list;
}
After the Values are determined I am grabbing the values on
ServerSide's RaiseCallBack Event method.
Please Help!!!!
Thanks Tag: mixing assemblies Tag: 119739
Check result of call into Windows API
Using Windows XP with all updates applied and Visual Studio 2.0.
I am trying to develop some common error-handling of Windows API
invocations that fail and am using MessageBeep as the API to test with.
Given 1) the following Imports statement:
Imports System.Runtime.InteropServices
2) the following declaration of MessageBeep:
<DllImport("user32.dll", _
EntryPoint:="MessageBeep", _
SetLastError:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Function MessageBeep(ByVal wType As Int32) As Boolean
End Function
3) the following code to test passing an invalid value to MessageBeep
Dim MBResult As Boolean
Dim MBErrorCode As Integer
MBResult = MessageBeep(-2)
If MBResult Then
MBErrorCode = Marshal.GetLastWin32Error
End If
When I set a break-point after the assignment to MBErrorCode, I see
that it has a value of 127 -- "The specified procedure could not be
found". I was expecting a value of 87 -- "The parameter is incorrect".
Note that when I pass MessageBeep a value of 0 -- a presumably valid
value -- I get the same result.
--
// Lee Silver
// Information Concepts Inc.
//
// Converting data into information since 1981 Tag: mixing assemblies Tag: 119737
Single or multiple assemblies for big apps and code reuse?
Hi everyone,
I have a question about .NET code sharing and reuse, and also about
application design best practices / guidelines.
Currently, we have many different .NET projects in source depot. Although
they are different, in some of them we share C# code by referencing source
files that are external (not part of the projects) on each project.
For instance, some of our projects have the typical â??sourcesâ?? file with:
SOURCES = \
..\..\some_other_different_unrelated_project_A\fileA1.cs \
..\..\some_other_different_unrelated_project_B\fileB1.cs \
..\..\some_other_different_unrelated_project_B\fileB2.cs \
Program.cs
Class.cs
And so on.
Some people in my team think that DLLs and assemblies are evil and should be
completely avoided. Therefore, they advocate treating all projects in the
depot as one huge, monolithic project (even they are not, as they are
different projects), sharing code by referencing source files all over the
depot.
Basically, each application has one and only one assembly containing all the
application source code plus all source code that belong to other projects
too but is reused by referencing the other project(s) C# source files.
Other team members (BTW facing huge opposition) insist in packing the
shareable code into one or more assemblies, although for some people,
assemblies and DLLs are absolutely forbidden.
Can someone please tell me the pros and cons of each approach? Is it right
to be completely against packing certain substantial modules or pieces of
functionality into separated assembly/assemblies, as opposed to having one
and only one single, huge monolithic assembly containing the whole
application + other project source files?
Those in favor of having shareable code packed into separate assemblies,
instead of putting everything (all the source code of the application plus
the sources of our libraries, plus the sources of all subsystems, etc.) into
one, big monolithic assembly, point to these other URIs:
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/distapp.asp
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/apparchch2.asp
http://weblogs.asp.net/savanness/archive/2003/07/22/10417.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconassembliesoverview.asp
So, I wonder, are there any guidelines and/or best
practices/patterns/anti-patterns in regards to C# source code sharing and
reusing among different projects? Any authoritative answers? Is it
reassonable to build big, different applications from one huge source tree,
having only one and just one assembly per application and nothing more? Or it
makes more sense to split the app into multiple assemblies, but keeping the
number of assemblies to a minimum?
Thanks and regards,
Claudio Tag: mixing assemblies Tag: 119736
Using the mousewheel
Hello,
I try to use the mousewheel in a user control to to scroll in a pannel where
I draw with GDI+ .
due to the fact that a pannel don't has focus, I have no mousewheel event at
my dispositon. Is there a work around?
Someone has an idee?
tnx in advance.
Jean Paul Tag: mixing assemblies Tag: 119733
Urgent :"Your Account will Expire within N Days".
Urgent :"Your Account will Expire within N Days".
Here "N" is the number of days from which this message starts popping,I need
to fetch this information from the active directory, please provide me
details in solving this issue ? Tag: mixing assemblies Tag: 119727
ADSI Problem
Hi
Can anyone tell me how I can check the status of an account in Active
Directory using C#.
I mean, I need to know whether, Account is locked, Password expired or
Password needs to be changed at next logon, etc. The problem is that in all
these cases, .Net throws a generic exception and there is no way for me to
know what was the exact cause of the error.
This is a little urgent.
Thanks in advance
Vikas Manghani Tag: mixing assemblies Tag: 119726
friend class in c#
I would like to know in c# if there is any way to have 'friend' class
just like
in C++. I know there is the 'internal' keyword, but this will allow
access to all
the classes of the assembly and I want to allow access only to a
specific class.
if No what is the reason? Tag: mixing assemblies Tag: 119724
Loading an assembly from a stream
Is there a way to load an assembly from a stream instead of from the
file system? The static methods in System.Assembly.Reflection don't
support anything other than file names or assembly names as a source
for the various Load methods.
TIA
Henning. Tag: mixing assemblies Tag: 119714
.net 2.0 system.web dll
Can anyone tell me what dll file contains the system.web namespace in .net
version 2? The only thing I can reference is the v1.1 system.web.dll.
Thanks,
Jim Tag: mixing assemblies Tag: 119712
Copying to clipboard using Ctrl-C or Clipboard.SetText
What is the difference between copying to the clipboard using Ctrl-C and
Clipboard.SetText? When I use Ctrl-C I get line feeds as I expect. When I
copy to the clipboard using SetText I just see little boxes (which I am
assuming is the carriage return or line feed). I am trying to copy text from
a RichTextBox control to the clipboard.
Thank you.
Kevin Tag: mixing assemblies Tag: 119707
.NET C++ SMTP question
I have been asked to do the following:
Create an application that will take an e-mail address entered by the
user into a field and, once a button is clicked, will take that e-mail
address and check it against the mail server for that address using
SMTP to determine if it's a valid or invalid mailbox.
Can anyone suggest a resource for doing the SMTP checking? Tag: mixing assemblies Tag: 119705
The given path's format is not supported.
I have a web page where a user can upload a .pdf document. When I test
it on my machine and also from the live site, it allows me to upload a
document fine. When a co-worker tries to use it, he gets
System.NotSupportedException: The given path's format is not supported.
When I try to upload the same document, no problems. Anyone know what
the problem might be? Thanks. Tag: mixing assemblies Tag: 119703
window.close problem
Hi!
On this URL is the example of my problem....
http://www.usa.canon.com/consumer/controller?act=RedirectAct&fcategoryid=313&modelid=9429&URL=http://www.usa.canon.com:80/consumer/controller?act=SecondRedirectAct&nav=second&fileURL=/app/pdf/slr/Rebel_brochure.pdf&type=DNLD
As it loads, it starts to process the script and then comes to window.close
that shows the dialog box asking user if it should close the browser window.
Since I am using IE as control in .net 2.0 and using some extension to it
found on codeproject site, I want to handle all browser UI with my dialogs,
but unfortunately event that is supposed to be firing doesn't fire. It is
WindowClosing event, that even has cancel parameter.
My ideas:
1. find out if there is some hidden property inside Internet Explorer
registry that would default the dialog box to yes or to no (no success
there)
2. find if there is a way to use Navigate() to the url, then use some event
that is fired after the document is loaded but before the script runs (no
success there either)
3. make local proxy server that would filter out window.close from the
script
Am I missing something, please advise.
Thx Tag: mixing assemblies Tag: 119702
Finally, handling resizes and and MDI's scrollbar.
Been trying to figure out how to resize forms indside an MDI Form, when
the form itself is resized dynamically, to maximize and anchors do not
help.
The problem was getting the size of the scrollbars, and effecting the
resize at the right time.
For me, the answer was finding the MDIClient and AddHandlering its
Layout event.
MDIClient is the client area inside the MDI form, in my case, without a
scrollbar, MDIClient.ClientRectangle.Width was 4 less the
MDI.Rectangle.Width (must be two pixels for each of the MDI's borders).
With a scrollbar it jumped to 20 (likely the scrollbar is 16 pixels
wide).
Getting the MDIClient (as found in the newsgroups) is done with a
ForEach cycling through all controls in the MDI's control collection
and finding the one with the type MDIClient. Should probably be index
of 0, unless the user makes it an MDI in the code after other controls
are added.
The second thing was handling those scrollbars. That is done by the
MDIClient's layout event, at which time, the scrollbars et al have been
taken into account. Since the MDIClient is not there right away, the
Handler must be refered to in the code. The declaration of the
MDIClient's Layout event is the same as the MDI's Layout event.
B. Tag: mixing assemblies Tag: 119701
Microsoft .NET Framework 2.0 Configuration
OK, I have done a .NET 2.0 Framework install and under the Administrative
Tools I am not getting the Microsoft .NET Framework 2.0 Configuration
application. I looked for any MSC files in the V2.0.50727 directory and
nothing exists.
We are installing the .NET 2.0 Framework as part of our application. Why is
this tool missing and how do I get it back? Our customers may need to
reconfigure some of the settings this provides.
Thanks,
Eric Renken Tag: mixing assemblies Tag: 119695
Fingerprint API
Ok, this seems like a no brainer but I've seen almost nothing about. Pocket
PC's can be purchased with fingerprint readers for security purposes. Surely
this functionality could be packaged into and API and integrated with Windows
Authentication. I know my users would be well served by logging in with a
fingerprint scan rather than tapping out a secure password into the SIP.
Bill Tag: mixing assemblies Tag: 119693
BinaryFormatter serialization size.
How can I determine the size of the data that a BinaryFormatter will produce
when serializing an object? I basically want to know how many bytes an
object with SerializableAttribute will produce if it is serialized to a
stream.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
----------------------------------- Tag: mixing assemblies Tag: 119688
xsd.exe and Enums
Hallo,
I have used the xsd.exe tool a year ago (version 1.1.4322.2032) to generate
a vb class to serialize xml.
All string enums in the xml are availible in the vb code as strings.
If I use the same tool today the code is different to that a year ago -
especially the enums
are different.
Now I get Integer values for enums which are strings. I have to use
.ToString to get the string value.
Why ist that different?
regards Tag: mixing assemblies Tag: 119687
How to write in registry under limited user account
Is it possible to write information in HKLM\Software\MyApplication when
under limited user account ? I tried use
"System.Security.Permissions.RegistryPermission" but it doesn't work. Tag: mixing assemblies Tag: 119683
How to package Windows Form application
How to package Windows Form application to be installed further with Windows
Installer? What are practically steps? What should I do? Tag: mixing assemblies Tag: 119678
System.Version
Hi All,
I've searched the documentation and Google for an answer to this but to no
avail.
It seems that System.Version does not serialize to XML. I checked the
documentation and this type is flagged as being Serializable, it has a
default parameterless constructor, and I'm pretty sure it can be binarily
serialized without a problem.
On my example class I have a field as follows:
Public MyVersion As System.Version
I initialise this to a new System.Version(5,5,5,5) before serializing.
After serializing it to an XML file using the XMLSerializer class all I get
in my XML doc is "<MyVersion />" - this seems to imply that none of the
fields in the System.Version class can be serialized into XML?
Can anyone confirm this?
Thanks,
Alex Clark Tag: mixing assemblies Tag: 119677
framework and 64bits
Hi,
I need to run a visual net 2002 program in XP pro 64 bits, so:
I think Framework 1.xxx can not be use over a XP Pro 64 bits, Right?
I wonder if it is possible to run a Visual net 2002 program on a XP Pro 64
bits with framework 2.0?.
Thanks,
Jaime Tag: mixing assemblies Tag: 119672
Cannot attach to vb6 process with framework 2.0 installed
I used to be able to attach a VB6 process through my Visual Studio 2003
environment until I installed Visual Studio 2005 on the same machine.
The problem is with .Net Framework 2.0, as if I remove the 2.0 version
of the Framework and just run with the 1.1 version it works fine.
Does anyone know how to resolve this as I develop solutions with 2005
and 2003.
Thanks... Tag: mixing assemblies Tag: 119669
Blocking memorystream, does it exists?
Hi
I'm looking for something like a blocking memorystream, ie. a memorystream
that will block any further writes when the internal buffer is full, until
data is read.
What I want to do, it to apply some conversion to an XML file when I read
it, and then right away (in another thread) read the converted stream using
an xmltextreader.
TIA
Søren Tag: mixing assemblies Tag: 119668
DataGriDView Programm, Help
Hi,
How can I accept the changing of datagridview. I have a column used as
CheckBoxColumn, when I cilck one cell in this column, I want to know the
cell's value (true or false), but i found that everytime I use:
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value
in CellClick event, it always show the inital value, ( if checked at first,
always true even I clicked and uncheck it,
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value still is true), how I let
DGV accept the changing. ( after I uncheck it,
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value is FALSE, not TRUE)
Thanks Tag: mixing assemblies Tag: 119666
Windows service not starting at boot time
Hello:
I'm currently developing a windows service, and in OnStart i launch a
couple of threads to do some work. When i start it manually everything
goes fine, but at start up the service just timeout. I have added all
the dependencies i thought could be used by the service, included
eventlog, rpc, sqlserver. Is there any way to get the service
dependencies all? Or is there any detailed log of what is going on on
startup? The timeout message in eventlog says nothing about the cause.
Any ideas would be apreciated, thanks Tag: mixing assemblies Tag: 119661
Can I call a .NET 1.1 assembly from a .NET 2.0 assembly or vise versa?