|
hi
i want to include dll for reading and writing data from parallel port in NT base windows.
now i have a dll for this perpose but it not include in c#.
plz tell me how to inculde dll. and if, for this perpose handler will create then how create that handler and how use the dll.
reply me soon
bye.
|
|
|
|
|
I have a public static function in a class named "PublicFunctions". I call this function in my MDI form's "MdiChildActivate" event. What the function do is, it takes current activeMdiChild as argument and set a public variable present in this activeMdiChild. All the child forms have this public variable "formCurrentMode", which i use to store form's current mode like "update","save","new" etc.
My problem is, in my public static function in class "PublicFunctions" i am getting an error that 'System.Windows.Forms.Form' does not contain a definition for 'FormCurrentMode'.
Please help me to solve this problem.
Thanks
Sheel
Sheel Gohe
|
|
|
|
|
I have a question which I am sure someone has had before me:
when implementing drag'n'drop for a treeview control I have no problem, except that when dragging over an area in the treeview control which is empty (lets say i have only three nodes, but the control is much higher than this), The drop operation is not allowed, only when dragging onto previous nodes. Why is that? Can I do something about it in an easy way?
thankful for help,
Bjørn
|
|
|
|
|
Hello,
i have read on msdn the documentation referring to DPAPI. i have also tried those examples and when i have reached the user store problem i have noticed that there is an access conflict on DataProtector constructor (when i try to initalize an DataProtector object) so firstly i set the COM+ DPAPI Helper Application to run as a service (as in msdn's example) and it didn't work. secondly i set the COM+ application to run as library and it worked . my little question is what should i do to make DPAPI work in user store problem
Thanks, claudia
|
|
|
|
|
In vb.net when i declare a variable as object type then i can set any property for that object that is not assigned at design time but but will be assigned at runtime. for example:
dim a as object
if typeof a is textbox then
a.name="test1"
end if
The above code will not give any error at design time in vb.NET but in C# it will give an error during design time only - "'object' does not contain a definition for 'name'".
Please help me,how do i solve this problem.
Thanks in advance
Sheel
Sheel Gohe
|
|
|
|
|
The following should work:
if (typeof(a) is TextBox)
{
((TextBox) a).name="test1";
}
www.troschuetz.de
|
|
|
|
|
Thanks Stefan.
Sheel Gohe
|
|
|
|
|
Actually the codes should be:
object a = new object();
if( a is TextBox )
{
((TextBox) a).Name = "test1";
}
Or:
object a = new object();
if( a.GetType() is TextBox )
{
((TextBox) a).Name = "test1";
}
|
|
|
|
|
Actually, your code is just as incorrect.
LdqxYY wrote:
object a = new object();
if( a is TextBox )
{
((TextBox) a).Name = "test1";
}
If a has been instantiated as an object, then the line
if(a is textBox)
will always evaluate false
then in your second example:
LdqxYY wrote:
object a = new object();
if( a.GetType() is TextBox )
{
((TextBox) a).Name = "test1";
}
you are testing to see whether an instance of System.Type is-a TextBox - which it clearly isnt it is System.Type!
To correct these two examples assume that there is a TextBox on the form with the instance name myTextBox. Now assume that you have a variable named myVar which is of type object, but is set to myTextBox
if(myVar is TextBox)
{
((TextBox)myVar).Text = "Hello World";
}
or in the second example above
if(myVar.GetType() == typeof(TextBox))
{
((TextBox)myVar).Text = "Hello World";
}
|
|
|
|
|
J4amieC,you are right!And I had realized my second example were incorrect after submitted.By the way,what exact mean in my first example is:
object a = new object();
//
//some codes handle with the "a"
//
if( a.GetType() is TextBox )
{
((TextBox) a).Name = "test1";
}
I forgot writing something,hehe...
Thanks again!
|
|
|
|
|
God!Wrong again,sorry!It should be:
object a = new object();
//
//some codes handle with the "a"
//
if( a is TextBox )
{
((TextBox) a).Name = "test1";
}
|
|
|
|
|
LdqxYY wrote:
were incorrect after submitted
That's why we have a Modify button
|
|
|
|
|
How to make crystal report with utf-8 (my database is SQL 2000 and data was stored in UTF-8)
thanks,
|
|
|
|
|
Ok guys, i not even know if it's a problem but i've seen many c# tutorials that explain assembly compilation by command line and i've seen they usually use "csc (my arguments...)".
That "csc" is a bit strange for me because they only use csc directly("c:\>csc myarguments..." for example) but i have to type all the path to the csc.exe file (C:\Windows\Microsoft.NET...csc.exe Myarguments...).
How can i create a link to csc?
Thanks in advance
Heinz Suez
|
|
|
|
|
Add it's path to your path variable or copy it to a path that is there already, such as system32.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Hi All,
I have a custom datagrid with two checkbox controls in it.
When checkboxA is checked then if checkboxB is checked, it is unchecked and vice versa. (not like a radio button since if checkboxA is unchecked then nothing happens to checkboxB).
But I would like to implement this in client side...any help would be GREATLY appreciated!
schoudhr@hotmail.com
|
|
|
|
|
Then you need the variable names in the html, and to write some javascript.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yes, i know that
the question is how
|
|
|
|
|
Hi,
for that, you have to use javascript. First you can search a control with getElementID from javascript and then you can enable and disabled at client side.
All the best
Anil Joshi
|
|
|
|
|
I know how to do that already...
its a pretty generic process
the question is mainly how to access an elementID from a serverside datagrid
|
|
|
|
|
dgap wrote:
the question is mainly how to access an elementID from a serverside datagrid
Like I said, look at the resultant HTML. You can catch events like onitemdatabound to set the IDs if they aren't being set for you as you would like.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI All, I want to write a "Send To" menu class using C#(it's function just like the "Send To" Menu in the windows OS,send files to a specified target,such as desktop,MyDocument,Mail Recipient etc.), and I've finished it ,but there is still some problems .I use COM code (use IShellFolder,IDropTarget etc.) to do this work, this is too complex I think, so I want to know are there any simple ways to do it?
There is another problem , I add the "Send To" menu items in the System's Send To folder , in win2000 ,all the "Send To" menu items are in this folder ,but in win_xp there are some items not in the system's Send To folder (such as floppy disk,DVD RW Drive),but they appears in system's send to menu. I just want to know does Windows puts “Removeable Drives” in the Send To menu automatically?
some one told me that:"While trying to fiddle around with the various places where SendTo entries can come from I guess it'd be faster to learn about the COM interfaces that should give you all SendTo targets, regardless of whether they are links in certain directories, registry entries or anything else."
But,which COM interface should I use to get all Send To targets?Please give me some useful information .Many Thanks!
|
|
|
|
|
I have a device using M-Jpeg,i can catch jpeg data at client,
but it's jpge cannot Decoder ,it like that:Bmp bmp = new (JpegData)
there will throw a GDIPlus Error ,I dont know why ,but these jpeg files
can renderred by GDI,so i think if it's a bug of GDIPlus.Could somebody
met these kind problem?Jpeg can decoder by GDI but cannot decode
by GDIPlust.It's confused me for a long time.
|
|
|
|
|
1. GDI has no method of handling a JPEG. Not one.
2. If you tell us what the error is, it would help us to help you
3. What is JpegData ? That is, what is the type of this variable ?
4. Always assume the library has a bug only when you are totally certain your code is calling it correctly, and even then, take care. It's always best to assume the bug is yours, otherwise, it will go unfixed.
Christian Graus - Microsoft MVP - C++
|
|
|
|