|
thanks for the reply..will u plz tell me how to get the ip address of the client.....
regards
sindhu tiwari
its me sid
|
|
|
|
|
Are you using a socket for communication ? If yes check Socket.RemoteEndPoint
|
|
|
|
|
sindhutiwari wrote: I hope every one is aware of google chat and yahoo messenger ...
Yeah, I wasn't like born yesterday
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
We have a windows application developed using c#. We have a process in this application where excel objects are created some data is populated and some calcualtions are done too (used various excel objects like workbook, sheet, range). The required tasks are being executed fine but there are instances where the same tasks fail. An error is being thrown at that time and it is "THERE IS NOT ENOUGH MEMORY TO RUN MICROSOFT EXCEL. PLEASE CLOSE OTHER APPLICATION AND TRY AGAIN" The error is pointed to Excel object creation and it shows - "An unhandled exception of type System.Runtime.InteropServices.COMException occurred in application_name.exe"
What could be the cause for the error? Please provide some suggestions.
Thanks
gauthee
|
|
|
|
|
Hi!
With this degree of information it's really hard to give you the exact reason for your problem, but I think most likely it's due to resource leaks.
Does it work again after restarting your application (and Excel)?
Does it fail on first run or after a while?
Do you release all the COM objects your app creates?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
mav,
Thanks for the reply!
Sorry, if the info provided was unclear, what else you would require to analyze further?
The other details are as follows:
1.When the error occurs we no longer can open an excel file.
2.After the system restart the excel application work.
3.Strangely the error(not enough memory) willnot occur when the number of processes running in my machine are minimal, when i run more applications/processes in my system this exce memory error occurs.
4.all COM objects related to excel are being released(not 100% sure though). we are searching for any excel processes running and then doing the kill process too!
Thanks!
gauthee
|
|
|
|
|
Hello everyone,
I need some help. I have been working on it for some time but havent been able to think of any solution. Even had thought of making do without it, even though it was a major part of my project. To be honest, I am a beginner and hence unawares about many of the stuff. So here is my problem:
I am working on a "PUBLIC TRANSPORT INFORMATION SYSTEM" (In India we dont have one yet for most cities). Most of the stuff I have been able to do, but I am stuck at one point. I want to display the selected route between two places on the map. I want the map to be drag and move (like we have for pdf files). This is since the map of the city is extremely large (3 feet * 2 feet on paper, which I plan to scan. I may reduce the size a little, but not by much as I want the lanes and small roads to be visible with their names).
So, I want the following things to be done (in order of their priority). Please help me out, I really need it.
1> Firstly, I want the large image to be shown in a small viewport using drag and move so as to allow the user to wander through the whole map of the city.
A pic of what I mean is shown here:
http://www.geocities.com/this_is_shailesh/index.html
2> Secondly, I want to be able to move the viewport to a specific area of the map. For e.g., when the user selects a particular place on the map in a drop down list, I want the viewport to move to that part of my map which shows that location.
Currently, the only way I thought it could be done is by mapping the pixel positions for all the places in the drop down list and then moving the viewport such that the corresponding pixel position is the center of the viewport. But I admit, I really dont know how to implement this.
3> Finally, if its posible, is there any way by which I can highlight the selected paths.
My map will be static. So I was thinking on the lines of placing markers on all the stations (overlapping exactly on top), whose visibility can be adjusted on/off. When they are a part of the route, their visibility will be ON, and when not they will be OFF. The markers could be plain coloured circles, so that a series of dots (or circles) will indicate all the stops/stations along the selected path.
But this also I dont know how to implement in code. I have no clue how I can make these markers overlap the stations, esp coz the map will never be shows in its entirety at any time. I mean how do I do the pixel positioning with respect to the image rather than the viewport, which is what is generally done in case of pictureboxes etc.
So if anyone can help, I did be deeply indebted. In anyone knows of any precoded stuff or libraries i can make use of, please do inform. Or else, if you have any alternate suggestions for me, it would be great as I am anyways not making much progress right now.
Thanks a lot in advance. Waiting anxiously
|
|
|
|
|
Where is the map coming from ? Showing a scrolling image and jumping to parts of it is trivial, so long as the image is in your control.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes yes the image is totally mine. i will have total control over it. SO what do i need to do........... also please give me some links to stuff that you feel i could learn from or make use of. Thanks a lot..........
|
|
|
|
|
Hi all ,
I have to acess some function just after every statement, so do i need to make one more class that will contain all frequently used functions and global variables. or is there any other way to do them..
as an example..
class abc{
public int a;
public void XYZ();
}
void XYZ()
{
//do something
abc();
//do something
abc();
//do something
//abc();
}
and abc internally calling someother function...
so what need to do for this abc ....
T@SU
|
|
|
|
|
Why not implement the freq. used function "abc" in the class "abc"? (BTW: bad naming )
|
|
|
|
|
I'm just getting started with VS 2008. I thought I'd start by creating a fairly standard WinForms-style UI, but do it in a WPF app, instead of a WinForms app. I haven't had any luck finding tutorials or walkthroughs on creating WPF UIs with VS 2008. Can anyone suggest a good walkthrough or article? Thanks.
David Veeneman
www.veeneman.com
|
|
|
|
|
check the MSDN page for webcasts on WPF - there are some great ones (I've mostly seen german webcasts but I'm rather sure that there are some great english ones as well).
WPF is a huge theme so you might even consider buying some book(s?) on it.
Best think is that the old MCF-like eventhandling is back (from child to parent) and even improved, databinding has improved much and the 3D support is just lovely - downsides are: no MDI support (as far as I know), no dockable windows etc.
|
|
|
|
|
Thanks. There is a DockPanel container, which I think is designed for window docking. And while there is no explicit MDI support, MDI-style interfaces look like they can be done fairly easily by nesting panels.
Unfortunately, there aren't any VS 2008 books out yet. I'm going with the Manning book, WPF in Action with Visual Studio 2008. It's not being published for a while, but most of the chapters are available online.
David Veeneman
www.veeneman.com
|
|
|
|
|
well the DockPanel is a layout container - nothing more - you don't get run-time docking or the menu/toolbar-sharing of the MDI windows.
You don't need the VS2008 Books - not much has changed for WPF-programming. I have the "Pro WPF" from MacDonald in front of me (.NET 3.0) and can only recommand it - of course another WPF Petzold is allways good
|
|
|
|
|
I found an MSDN hands-on lab to create a line-of-business application using Expression Blend as the designer. The lab can be found here[^].
David Veeneman
www.veeneman.com
|
|
|
|
|
Have you looked at articles by Josh Smith or Sacha Barber on this site? They both have written some really top-notch articles on WPF...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
[color=darkred]I had database and coded class. I just want mapping xml to use NHibernate. [/color]
MyGeneration generates code from database. If I use it, I'll have to merge my old file with new generated class. It's too risk. Am I wrong ? (maybe I don't know enough about MyGeneration)
ActiveRecord is the same.
I'm reading about codesmith [^] , maybe it's good.
Are there any other tool ?
Thanks
imagic
imagic
|
|
|
|
|
|
I advise you to steer away from any tool that does code-generation. They tend to get you 90% of the way there quickly - but the other 10% can be very difficult.
How much code is in your existing classes? If your code is well segregated - you have taken care with "seperation of concerns" - then you should be about to drop in a new data layer solution.
Our ORM tool Diamond Binding[^] is highly suited for creating and maintaining the business object definitions from an existing database, and providing a fully featured API for handling business objects. It also is powered by NHibernate.
|
|
|
|
|
In an application (c#) that i am making, i've found i need to make a more complex listbox/listview than what is in the .net framework. I'm trying to display more than just a value(item), but i want a picture and other ideas. To best implement this idea i've come up with a custom control i'm planning on building.
This custom control will look very similiar, if not the same as the "listbox" in WindowsXP's controlpanel->Add or remove programs.
Basically there is a list of ordinary listboxitems in a listbox. The only difference is when you click on an item, it expands downward, pushing other items down, and showing an image and a few buttons in relation to the selected ListBoxItem.
If anyone has any idea how i would go about creating this control or would like to help me i would appreciate it. It would probably contain "EnhancedListBoxContainer" and "EnhancedListBoxItem" controls.
Thank You.
|
|
|
|
|
Not too difficult really, but a good idea.
Basically, you will have to handle the drawing yourself.
Each item will be as wide as the control, and as high as the text (or therabouts). You draw the picy on the left, and the text about 20px in (assuming the picture to be about 16*16)
Probably you could have a variable for the currently selected (expanded) item, so that when it is drawn you know to draw the extra info, and set different colours.
As for drawing each control, have a variable for the current y position, start at 0. Draw an item and find its height, add its hieght to the variable. The next control starts drawing at this y value. Of course, be sure not to draw below the bottom of the control, its just a waste (ie, when your y variable is greater than the height of your control).
These are just my ideas, and i'm sure they could be improved upon.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Hi,
you can use a regular ListBox with:
- instances of some class in the items collection (doesn't have to be strings!)
- owner-drawn (with constant or variable item height) meaning you have to provide a method
to paint a single item any way you like
- in your app a selected item would take a larger height
This is an example.[^]
|
|
|
|
|
Thank you for your reply's.
I was actually thinking about the idea of a tall item. Then you could place a control the size of that item and put it ontop of the item. It would work well.
That example also was helpfule too.
I decided to ask some people if they preffered 1.)this idea, or 2.)instead to simpley have a listbox with normal items and all, and then put the information on the buttom (of the listBOX) ALWAYS instead under the selected item (3rd idea is a panel that appears after hovering over an item, but it got no votes).
3/4 people liked the second idea.
1/4 1rst idea.
I'm going to go with the public on this one since they ARE the ones who use it, and choose the 2nd idea. Afterall it is much simpler to implement. Thank You Again.
|
|
|
|
|
I am attempting to make a method such as the following:
1 public static void foo<T>(T unknown) {
2 PropertyInfo[] tProps = typeof(T).GetProperties();
3 foreach (PropertyInfo pi in tProps) {
4 foo<pi.PropertyType>(pi.GetValue(unknown, null));
5 }
6 } I get the following compiler error on line 4: "The type or namespace name 'pi' could not be found (are you missing a using directive or an assembly reference?)". Is there any way for me to recursively call this method as logically indicated by the code above? Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|