|
I want to call a function written in a C# DLL from inside Dolphin Smalltalk. Currently I can call an external library like a native Win32 function in a DLL using a prototype and following the calling convention (stdcall, cdecl). An example in Dolphin:
" BOOL AppendMenu(
HMENU hMenu, // handle to menu
UINT uFlags, // menu item flags
UINT uIDNewItem, // menu item identifier or pop-up menu handle
LPCTSTR lpNewItem // menu item content
);"
<stdcall: bool AppendMenuA handle dword dword lpstr>
^self invalidCall
But a friend tells me DLLs generated from Visual Studio C# aren't PE compatible.
Any tips to achieve this? I'll appreciate any help.
regards
|
|
|
|
|
He's right, they're not. In order for this to work, you have to expose your C# methods and properties to COM. Then your SmallTalk code should be able to go through the COM interface to get at these functions.
You might want to start by reading Exposing .NET Framework Components to COM[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want to implement these mathematical function in C# and want a starting point or algorithm please help to do this.
i want to do that i pass input values and the program return me the integrated values after applying limits. same as with derivative
please help me to strat this i am new in C#.
thanks waiting for early reply
bye
|
|
|
|
|
Are you talking about writing a function that takes just numbers as parameters does a little math on them and returns a result? Or are you talking about passing a mathematical function (x=Cos(3y)) to this function and having the return value be the resulting mathematical function? Forgive me, my Calculus is very rusty...
One is easy, just write to code to do the actual math of the mathematical function (supply a number for 'y' and return a value for 'x'.
The other, actually figuring out the integeration, is exceeding difficult! You might want to look into WolframResearch's Mathematica[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As far as simple dervatives use Regular Expressions to parse the function. As the other guy said.. integration will be painfull, but go for it, it would be interesting to see an article from your findings.
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
Hi everybody,
I write an application that has some child-forms and an MDI form. There is a child-form that use a DataGrid binding with a DataTable. What I want to do is when user is adding a new row on the DataGrid, and the focus is moved to another child-form, the DataSource of the DataGrid (i.e the DataTable) should be updated to the database.
I tried to handle the 'Leave' or 'LostFocus' event of the DataGrid, but the new row was not added to the DataSource of the DataGrid on those events. How can I solve this problem?
Thank you.
|
|
|
|
|
How to overwrite local files?
I used "FileMode.Append" and "FileMode.OpenOrCreate". However, they couldn't give me a corret result.
Please Help
Regards,
RockRock
|
|
|
|
|
Well, Append will, obviously, append to the end of the file, not overwrite it. The other flag will give you what you want. But, since you haven't supplied any of your code and any error messages, there's nothing we can do to help you.
It's as simple as opening the file and start writing. There's no magic to this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a panel control in my application. The Paint event of panel control is overrided to show some solid grid line and measures (like scale) on my panel control.
I have a collection of label controls (not less than 250 - 300 in all time) in that panel , which we can drag or drop anywhere inside the panel region.
I am overriding paint method of my custom label or labels which is there inside the panel.
My problem start here,
1. the moment i start dragging the label control in side the panel , the label show transparent shadow of that label control which i am dragging .
2. If i hold my mouse for a second , that is in between drag and drop. The control got heavy flickering. I tried Double buffering and related tricks using SetStyle() method. But still there is no change in status.
3. Last and most important issue that i am facing is, location of mouse cursor.
i.e., I need to place controls (custom labels) in some exact locations (measured location). But i can't able to control mouse cursor. If i start dragging , then my mouse will be near to 10 cm far from my control which i am dragging.
Really got stuck . Any Idea ?.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
How can i do it?
How can get and work on a specified pixel of bitmap as in this way:
bitmap[34][23] = Color.White
|
|
|
|
|
|
any one give the code for login page
username pswd
submit nutton(code for click event)
kindly give me coding help
chand
|
|
|
|
|
Your question is a little vague. How do you plan to authenticate users (e.g. will you perform a lookup against a database; do you keep your user information in a text/XML file; are user IDs and passwords hard coded; how are passwords secured etc. ?).
If all you want is a form for users to enter user IDs and passwords (and assuming you're using VS), just create a new WinForms app, add a new Windows form or use the default form (Form1), and drag 2 textbox controls from the toolbox to the form surface. Then select the textbox you plan to use for the password and set its PasswordChar property to whatever character you want to display instead of the actual text of the password.
Next, add a button to the form, and set its text property to "Submit" or "Log In" or whatever makes you happy.
Finally, add a method that handles the Click event of the button (double-click the button on the design surface and this method will be stubbed out for you and the cursor will move to the stubbed handler method). Insert whatever logic applies to the way you want to authenticate users in the button's Click event handler method (or make a call to another method/type that handles user login), and you're done.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Thanks for reply great . can u help me in coding.
u r idea is vgood . pl give me coding it will help me a lot(i wnt code pl give me).
pl its vurgent for me.
waiting for u r reply
chand
|
|
|
|
|
It would be kind of pointless for me to provide any actual code, since I don't really know (except in vague terms) what you're trying to do.
Instead, I would recommend that you search the codeproject site or just google for an example. There are, I'm sure, hundreds of them on the internet.
For example:
This is a WinForms quiz application that includes a login page.[^]
Good luck.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello everyone,
I am currently trying to code a little Subnetting-Calc, trying to get as close to .NET-Standards as I can (and thus, get some practise with .NET-Standards).
One thing I want to do is to return a networks broadcast-address based on Client IP and subnet-mask.
I have a method getBroadcastAddressAsLong (which accepts 2 Params representing SubnetMask and Client-IP and returns the BroadcastAddress as LONG).
During testing, I first wanted to try if the IP-Addresses were valid, so I tried to create 2 IPAddresses which should be identical, one long (0xFFFFFF00) and one byte[] (0,255,255,255) and passed them to the IPAddress Constructor.
Unfortunatley, the byte[] constructor fails, throwing an ArgumentException with the "additional info: addres" (sic!).
That really does not help much, so it would be great if someone could tell me, what to pass along to get that byte[] constructor to work".
Version of .NET FW is 1.1 SP1
Cheers
Sid
|
|
|
|
|
sebs2004 wrote:
one long (0xFFFFFF00) and one byte[] (0,255,255,255) and passed them to the IPAddress Constructor.
Those are definitaly not the same.... try byte[] { 255,255,255,0 } instead...
xacc-ide 0.0.12 now with C#, MSIL, C, XML, ASP.NET and HLSL coloring - Screenshots
|
|
|
|
|
Thats something I forgot to mention:
I did try that.
If I supply the long (0xFFFFFF00), it works. If I call getAddressBytes on that Address, I get a byte[] with {0,255,255,255}.
Thats why I switched to the different Byteorder. I thought I might fail because it expects the byte[] with highest lowest byte first.
Nonetheless, it neither works with 0,255,255,255 nor with 255,255,255,0
Cheers
Sid
|
|
|
|
|
i get this same issue.
does anyone have any idea how to resolve it?
|
|
|
|
|
Hi all!!
I'm trying to compile a code downloaded from the internet. It's an example of using sockets in .Net Framework. The problem is than when I tried to execute it, an error appears saying:
"Failed to stablish a connection as the destination computer has refused this connection"
The last sentence is a translation of the spanish one that appears on my computer.. it won't be exacty the same for english systems.
I suppose I have to kind of open the socket or something but I don't know what.
Any one knows what should I do?
Thanks!!
|
|
|
|
|
|
Check to make sure that any firewall running on the server machine (even if it's the local machine) is allowing connections on whatever port your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I've got a datagrid.
I have a function which selects certain rows in a datagrid thus:
public void selectRows(string key, string columnName)
{
int count = 0;
foreach(DataRow dr in ((DataView)dg_aspects.DataSource).Table.Rows)
{
if(dr[columnName].ToString()==key)
dg_aspects.Select(count);
else
dg_aspects.UnSelect(count);
count++;
}
}
This works, but when the user clicks a column header to sort the datagrid, the selected columns remain at the same index.
For example - if the top two rows are selected initially.
After sort - the top two rows are still selected, but the datagrid is showing different results in those rows.
It appears that the DataTable the DataGrid is showing, and the DataDource we work with aren't the same where sorting is concerned.
Does anyone know how to get a handle on the sorted DataTable?
I hope that's clear - thanks for taking a look
Steven
|
|
|
|
|
|
I would like to add a tabcontrol to a toolbar. There isn't any Articles that explain how this might be done that I can find, is this going to be possible?
The reason being I want to use HTML Help, I need a content, index and search facility as with:-
HtmlHelp library and example viewer By Klaus Weisser
But I need the whole screen width to be viewable as my HTML pages will either be a full 800x600 or 1024x768. I realise if I use a dockable toolbar then it can be placed 'always on top' over any part of the document (HTML page).
Any help or instruction would be appreciated.
Jason
|
|
|
|
|