|
Don't need to, I already coded up a set of classes to do this.
I used MC++ because, I am very familiar with C++ and it was allot faster than attempting to translate all of the API calls and structures involved to C#. As an added benefit, the MC++ classes are a seamless interface to C# or the *other* .NET languages.
Shoot me your e-mail address at vannote@netaxs.com and I will drop the project off as soon as I feel that it's ready...
Regards
|
|
|
|
|
Anyone know how to change the available client area of a .NET Framework Form ?
I have tried intercepting the WM_NCCALCSIZE message, but this doesn't
do what was expected.
Anyone got any suggestions, or even working examples of WM_NCCALCSIZE ?
|
|
|
|
|
Just set the ClientSize property on the form to the desired size
Much easier than standard win32
James
Simplicity Rules!
|
|
|
|
|
I was playing around last night and had done something like this:
protected override void WndProc(ref Message m)
{
MessageBox.Show(m.Msg.ToString());
}
I got a series of messageboxes (about 2 or 3) and then I received an error stating that it was able to create a handle, that, did I just need something like this to still allow it to call the base constructor?
protected override void WndProc(ref Message m)
{
MessageBox.Show(m.Msg.ToString());
base.WndProc(ref m);
}
I'm just playing with this anyone, so it doesn't really matter, just curious.
Nick Parker
|
|
|
|
|
.Net framework class library Control.WndProc method
Notes to Inheritors: Inheriting control should call the base class's WndProc method to process any messages that they don't handle.
I guess they say so.
- Gile
|
|
|
|
|
You know sometimes it is so damn clear that it doesn't make sense right away, why should I have thought that it would just fall though and continue on its merry way. Thanks.
Nick Parker
|
|
|
|
|
Hi,
I wanna customize the draw method of Datagrid, for example inorder to show the records which have a field (i.e. Salary) More then 50,000 in red BackColor and the others in white.
I don't know if you are familiar with delphi It use to have a OnCustom Draw Event that would deal with it. Do we have sth like that here?
thanks
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
It looks like what you need to do is create a class that inherits from DataGridColumnStyle (or better System.Windows.Forms.DataGridTextBoxColumn) and override the Paint methods.
HTH,
James
Simplicity Rules!
|
|
|
|
|
hi,
all
In c#, how can I get an running instance of a com object
instead of creating a new instance.
Can System.Activator implement it??
thx.
Regards.
Marion
|
|
|
|
|
|
when i am using msflexgrid component in vs.net in windows2000 server enviroment,i can not even put the control to the designing form.it display "you have not the activex control license"!or "The ActiveX control cound not be instantiated because it requires a design-time license "。
why?
how can i register the activex control?
i am a novice,i think to many people here,it's not a difficult question!so please help me !thanks!!
|
|
|
|
|
zhoujun wrote:
when i am using msflexgrid component
I wasn't aware that Microsoft still keep the msflexgrid in the Visual Studio.NET package, or are you adding it in another way?
Nick Parker
This is a non-Calculus course as long as you know things like line integrals and surface integrals...
|
|
|
|
|
at first i am also a bit confused,but i think of it for a while and i know it is because i install sql2000 server,and it add the msflexgrid run-time license!but have not install the design-time license!
|
|
|
|
|
i have 2 datagrid binded to 2 different part of the same table in access. now when i scroll the 1st grid i want the 2nd datagrid to scroll proportionately to the 1st datagrid....which is not happening. i tried to use a scrollbar control but couldnt do it...
if anybody has an idea about this problem......any solution as to how to go about doing it then.....please reply.
bye
|
|
|
|
|
Under Datagrid.scroll
Have you looked at:
public void scroll( int cols, int rows )
You could then assign both of your Datagrids to this method call.
Nick Parker
|
|
|
|
|
Hi,
all
I come accross a problem again.
Firstly,I make a ActiveX Dll(myDll.dll) in Visual Basic 6.0. And in myDll.dll there is only one function as follow:
Public Function show ( )
MsgBox ( "Hello world!" )
End Function
Then, I type this command in dos:
TlbImp mydll.dll /out: my.Dll
According the reference ,then I can invoke the method "show" in my C# console apllication.
My C# application(try.cs) as follows:
using my ;
using System ;
namespace Hello
{
public class Activex
{
public static void Main ( )
{
Class1 s = new Class1 ( ) ;
s.show ( ) ;
}
}
}
Finally,I type such command :
csc /r:my.dll try.cs
But errors ocurres, and details are showed as follows:
Try.cs(10,25): error CS0246: The type or namespace name 'Class1' could not
be found (are you missing a using directive or an assembly reference?)
Try.cs(11,25): error CS0246: The type or namespace name 's' could not be
found (are you missing a using directive or an assembly reference?)
who can tell me why ?
regards.
|
|
|
|
|
AM i being stupid how do you search in a message board, i am in C# board there is a search box but no 'go' but.....
|
|
|
|
|
Click the "Set Options" button next to it, not the most intuitive label.
James
Simplicity Rules!
|
|
|
|
|
Double DOH!!!!!
You mean the 'Set Option' button is a 'Search' or 'Go' button very intuitive
|
|
|
|
|
Ollie wrote:
You mean the 'Set Option' button is a 'Search' or 'Go' button very intuitive
You can use it like that, however all you need to do a seach is type in the text box and hit enter, at least if you are using IE.
Nick Parker
This is a non-Calculus course as long as you know things like line integrals and surface integrals...
|
|
|
|
|
A while ago someone asked how you could set the DefaultValue attribute on a Color property in a control. Well, I finally figured out how
[DefaultValue(typeof(System.Drawing.Color), "ColorName"] where ColorName is the name of the color you want to use. In my case it was "Control" .
James
Simplicity Rules!
|
|
|
|
|
hi,
all.
Two source file are showed as follows.
[Try.cs:]
using System ;
namespace g
{
public class Activex
{
public static void Main ( )
{
my myApp=new my();
myApp.SayByeBye();
return;
}
}
}
[ll.cs]
using System;
namespace g
{
public class my
{
public void SayByeBye()
{
System.Console.WriteLine("PPMM is good ,");
return;
}
}
}
then ,I want to add this two files into the same assembly.
firstly:
csc /t:library ll.cs
csc /addmodule: ll.netmodule try.cs
But after I try several times, there is always erros .
Error Message as follows:
error CS2005: Missing file specification for '/addmodule:' command-line option
error CS2001: Source file 'll.netmodule' could not be found
Try.cs(8,4): error CS0246: The type or namespace name 'my' could not be found
(are you missing a using directive or an assembly reference?)
Try.cs(9,4): error CS0246: The type or namespace name 'myApp' could not be found
(are you missing a using directive or an assembly reference?)
who can tell me why??
Your advanced help will be appreciated
Regards.
|
|
|
|
|
The library target creates a dll assembly; if you want two sources files in the same assembly compile them in the same command line...
csc /t:library /o:ll.dll ll.cs try.cs
HTH,
James
Simplicity Rules!
|
|
|
|
|
Ok, look at this:
private void Form1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
Close();
}
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
Close();
}
When I only use the Form1_KeyPress method, everything works, however as soon as I include my MouseMove method, the *screensaver* won't even load because it is trying to close the application right away. Both are built in theInitializeComponent() method like this:
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
Any ideas?
Nick Parker
This is a non-Calculus course as long as you know things like line integrals and surface integrals...
|
|
|
|
|
Mousemove fires when the mouse is over an object. Try saving the position of the mouse on the first call, and then checking if it has actually moved before calling Close().
I seem to remember this working last time I wrote a screesaver, but that was before .NET, so its all conjecture
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|