|
|
I read the article, but it seems to focus more on manipulating the property grid by modifying attributes on classes that are to be used in it.
Unforunately, this hasn't solved my problem, as I am exploring existing classes.
Although, i just had a thought, would it be possible to set NOT FlagsAttribute in a BrowsableAttributes class? I'll go exlore this.
Cata
|
|
|
|
|
Hai to all,
I want to create a simple TCP based network application, where client and server communicates with encryption. I tried to use streamwriter ans streamreader classes for non- encrypted application. I don't know how to use CryptoStream with the above streamwriter ans streamreader classes.
Early response is encouraged.
|
|
|
|
|
My article on YEnc encoding[^] has a sample of this. Just scroll down to the 2 highlighted pieces of code. You can substitute any encoder (implementation of ICryptoTransform), instead of my YEnc one.
my blog
|
|
|
|
|
Is there any way to make a property grid so that it is only GET, and does not give a SET option?
Cheers
Cata
|
|
|
|
|
Im trying to fill an array with the objects returned from the DTE method:
GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
I read through the documentation in VS.NET but am unsure how to properly reference the DTE class so that i can use the GetObject() method. I added a reference to envdte.dll and tried to create a new DTE object, but could not get it to work.
Any advice or code snippets on how to do this would be appriciated.
|
|
|
|
|
Uhhh...none of this is making any sense to me. What are your trying to accompish here? You posted code, VB code from the looks of it!, to get the Operating System parameters from WMI. What does this have to do with the Visual Studio IDE?
DTE.GetOject will return an object inside the IDE. As far as I know, it won't return an external object, like a WMI Provider.
If your trying to return the OS parameters from WMI, try using the System.Management namespace, specifically, the ObjectQuery[^] class.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ObjectQuery did what I wanted, thanks for the response.
|
|
|
|
|
Good morning.
In case it matters, I am using Windows XP SP2 and Visual Studio .NET 2003 Enterprise (VS2003).
I am just starting a new project and decided to use the XML-based documentation comments. I am currently using VS2003's built-in option to create HTML files (Tools | Build Comment Web Pages). After noticing the files weren't working in IE (due to the restricted zone problem in SP2), I created a virtual directory under IIS and loaded the files from there. Now the pages work fine in IE.
However, the files won't work correctly in Mozilla 1.7.5 or Firefox 1.0.1. I assume that the problem is that the HTML files written using document.all as opposed to document.getElementById().
Does anybody have a work-around to make cross-browser friendly HTML pages?
Thanks,
Jim.
|
|
|
|
|
|
|
I wanna send ASCII data to a specific IP, is there anyone know about this?
thx all...
|
|
|
|
|
the easiest way to do this should be to use the TcpClient object. This object can connect to an IP and open up a stream. Then you can use a StreamWriter to write the chars into the stream.
|
|
|
|
|
thanks for your reply... it works,
And now , how can I get clients IP do you know that.
thx.
|
|
|
|
|
I've written a little program that creates a form using reflection, however, when I attempt to show this form, it throws an error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ComponentModel.Win32Exception: Class already exists
at System.Windows.Forms.WindowClass.RegisterClass()
at System.Windows.Forms.WindowClass..ctor(String className, Int32 classStyle)
at System.Windows.Forms.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Control.Show()
the only other form that exists is my primary application form.
Does anyone know what causes this?
Cheers
Cata
|
|
|
|
|
|
It's just a blank form, default constructor variables. Nothing added.
|
|
|
|
|
|
Sorry, i think i made a slight mistake.
I was trying to construct a base form. Rather than an inherited one. It caused problems.
Will make sure i don't try that again
Cata
|
|
|
|
|
Try posting the code your using to do this. We can't tell what you did from the Exception, but the Exception message does help.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It appears in this context the 'Class' means that the form attempted to register a new 'Class' (Description of a window) with the Win32 API RegisterClass. I do think posting the code might help.
-
Drew
|
|
|
|
|
I put a question about this control yesterday, but unfortunatelly i could not get a solution.
So i change the flow of my program, but I still have one problem.
the DateTimePicker.valuechanged event executes twice...
I ask the other programmers here and not one knows why this control behives like this. So maybe someone have an answer. (searching the net i found two programmers that created new threads to resolve the problem, but that does not work for me, because I need the return from the "IsValid" ).
Code sample:
bool b = true;
//the code below does not work because the second time around the value still
//the original value in memory
if(((DateTimePicker)sender).Tag.ToString() == ((DateTimePicker)sender).Value.ToString()) return;
this.Cursor = Cursors.WaitCursor;
if(isValid(sender))
{
tToDate.MinDate = tFromDate.Value;
BindTimecard(tFromDate.Value,tToDate.Value);
((DateTimePicker)sender).Tag = ((DateTimePicker)sender).Value;
}
private bool IsValid(object sender, object r)
{
if(objdsIO.TimeCard.GetErrors().Length > 0)
{
string msg = "Please, Delete or Fix Records in Error, before Proceding!";
MessageBoxButtons button = MessageBoxButtons.OK;
MessageBoxIcon icon = MessageBoxIcon.Error;
MessageBox.Show(this,msg,"Error",button,icon);
((DateTimePicker)sender).ValueChanged -=new EventHandler(TimeDate_ValueChanged);
((DateTimePicker)sender).Value = DateTime.Parse(((DateTimePicker)sender).Tag.ToString());
((DateTimePicker)sender).ValueChanged +=new EventHandler(TimeDate_ValueChanged);
return false;
}
return true;
}
thank you for your help!
|
|
|
|
|
hii all,
i got starnge problem. i made dll's with win32 and while i was calling them from c# application for example
[DllImport("DLL.dll",EntryPoint="DLLMain")]
public static extern int Sum(int x,int y);
i got exception said DLLMain entry point not exists. and even when i removed it says Sum not found.
even that entry point is supposed to be defined by linker. and the prototype of sum is
extern int Sum(int x, int y);
so why it can't see it.
marcoryos
|
|
|
|
|
Your EntryPoint should be the name of the function your trying to call in the DLL. If the function name in the DLL is Sum, then the EntryPoint should specify that.
[DllImport("DLL.dll", EntryPoint="Sum")]
public static extern int Sum(int x, int y);
If you wanted to change the name of the name of the function inside your application, you could do that also:
[DllImport("DLL.dll", EntryPoint="Sum")]
public static extern int DllSumFunction(int x, int y);
Now, the Sum function in the DLL would be called by the name DllSumFunction in your code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
the entry point is the start address of the dll.
and any way i tried as you told me but it did'nt work too
it says unable to find Sum.
marcoryos
|
|
|
|