|
I develop a mobile telephone program using c#,I need to test if the mobile signal is working or in good state,how to deal with it?
|
|
|
|
|
|
hi all
can any one help me how to disable all buttons in a form except few using a method.
I coded to disable all buttons as:
private void disable_buttons()<br />
{<br />
foreach (Control ctrl in this.Controls)<br />
{<br />
if (ctrl.GetType() == typeof(Button))<br />
{<br />
ctrl.Enabled = false;<br />
}<br />
}<br />
<br />
}
but when called from same class load event it doesnt works?
pls suggest me for this problem?
<br />
private void UserMaster_Load(object sender, EventArgs e)<br />
{<br />
disable_buttons();<br />
}<br />
thank u
Kssk
|
|
|
|
|
Are you calling it before the initialize method which creates the controls and also enables them ? It should work, it will disable all buttons, you need to reenable the ones you don't want to disable.
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 )
|
|
|
|
|
this might have the problem that buttons inside panels or frames are not disabled (just use a recursive walker).
Concerning your question: as was said before: disable all and then enable the ones you like or give every button a describing Tag (for example a groupname or whatever) and check for this Tag in you foreach-loop to only disable the ones in the given group.
|
|
|
|
|
if you replace if (ctrl.GetType() == typeof(Button)) by if (ctrl is Button)
you get simpler code, that recognizes Buttons as well as controls that inherit from Button.
|
|
|
|
|
Hi guys..,
I want to Create Document Library in SharePoint Programmatically using Web Service
from my C# / ASP.NET Application .
I'm using SharePoint 2007, Visual Studio 2005.
Can u please help me ? It's very urgent.
Thanks
Mohamed Nazeem
Software Engineer
Bangalore
|
|
|
|
|
|
Hi,
I hope every one is aware of google chat and yahoo messenger ...
so when ever we login at two different systems using same id (in yahoo) the previous one gets logged off ...n.. in google we can do this n both the connections are alive and whenever a message is send both the messengers get the message....My question is that how the google server recognises which system is connected with the same id ..in clear words how it manages the messaging ..is it based on the ip address or what plz do reply..................regards sindhu tiwari
its me sid
|
|
|
|
|
It obviously keeps a list of IP addresses instead of taking the last one it saw, and just throwing the one it had away.
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 )
|
|
|
|
|
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
|
|
|
|