|
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
|
|
|
|
|
Ok, thanks, that makes sense, will give it a try.
Nick Parker
This is a non-Calculus course as long as you know things like line integrals and surface integrals...
|
|
|
|
|
when i click the form's minimizebox,how i can avoid the form to be minimized,just in the original shape!or minimized then resume the original shape!i do not want to disable the minimizebox!
|
|
|
|
|
If there is a .NET way to do this I havent seen it yet, and if someone has, please jump in anytime.
In the meantime, this works....
const int WM_SYSCOMMAND = 0x00000112;
const int SC_MINIMIZE = 0x0000F020;
protected override void WndProc(
ref Message m
)
{
if (WM_SYSCOMMAND == m.Msg && SC_MINIMIZE == m.WParam.ToInt32())
m.Result = IntPtr.Zero;
else
base.WndProc(ref m);
}
|
|
|
|
|
thanks!but how to use your code!is it in use in other development language or enviroment??
|
|
|
|
|
It is C#, Just drop it into your Form class.
The intent of my comment "If there is a .NET way to do this..." just implied, *there should be a better way*
Regards
|
|
|
|
|
it works well!you give me much help!thanks very much!
|
|
|
|
|
Hey all, I'm making an app that I want to behave differently when I'm debugging in the IDE but act different when its run normally. Is it possible to detect if it was started from the VS IDE? I know for VB6 there was a howto on the MS website.
Thanks for any help, much appreciated.
|
|
|
|
|
You can look to see how many Trace/Debug Listeners are attached, but that won't tell you what debugger/trace is attached.
System.Diagnostics.Trace.Listeners.Count;
James
Simplicity Rules!
|
|
|
|
|
Is that reliable?
An old hack from VB is to do the following:
try
{
int x = 0;
System.Diagnostics.Debug.Write(1/x);
}
catch
{
System.Windows.Forms.MessageBox.Show( "Debug");
}
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
I don't believe the original poster was trying to find out if it was a debug build, he wanted to know how he could detect if it was running in the IDE...
Besides, in .NET you have the DEBUG pre-processor definition.
Regards
|
|
|
|
|
Check out the static property
System.Diagnostics.Debugger.IsAttached
Regards
|
|
|
|
|
hi!
i tried to write a little outlook addin which gets startet when the user opens a new mail form. i tried it with the following code but it didn't work. any ideas?
thx benedikt
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application as Outlook.Application;
addInInstance = addInInst;
MessageBox.Show("OnConnection");
if(applicationObject!=null)
MessageBox.Show("wenigstens etwas!");
// inspektor speichern
applicationObject.Inspectors.NewInspector+=new
Outlook.InspectorsEvents_NewInspectorEventHandler(this.Inspector_StartedHand
ler);
}
private void Inspector_StartedHandler(Outlook.Inspector inspector)
{
MessageBox.Show("Juchu");
}
|
|
|
|
|
in visual basic 6.0.there is a grid control-"msflexgrid".but in visual studio .net.no such controls,i do not want to use datagrid in vs.net.so how can i find a control like "msflexgrid" for using in vs.net!!
|
|
|
|