|
at first thanks for ur attention to reply me.
for sure if it was set to release it wouldn`t be a problem.
but the problem is thant it sets to depug and i asked the help here if any one faced a problem like this and solved it , to tell me what was the problem
haitham
|
|
|
|
|
Ok, if you _have_ set the project to debug (your initial post didn't say so!), did you re-build the solution and make sure that the files in your virtual directory were updated?
Does debugging of other projects work? Debugging other web applications? Debugging WinForms applications?
With so little information nobody can tell you the exact reason for your problem.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
sorry for the missing data
this project is a web site project and it was developed by some people, these developers were working with "microsoft visual safecode 6" . this project was working correctly at their machines but when i copied the code to my machine to work in this project the problems started to appear
at first an error message appeared tell me that this code is under source control
when i try to depug the code it poped up the previously illustrated message
this is a brief description for the problem
thanks for ur help
haitham
|
|
|
|
|
Hi,
I would like to "remove" a label if it is empty and move all subsequent labels up to replace its position.
I thought the following would work:
if (labelAddress2_22.Text == "")<br />
{<br />
labelSuburb22.Location.Y = 150;<br />
labelPostCode22.Location.Y = 150;<br />
labelState22.Location.Y = 175;<br />
labelCountry22.Location.Y = 200;<br />
}
but I get a compilation error that the label component is not a variable. I understand this and have looked up the MS help on it but the MS suggestion seems a complicated route to take (or so it seems to me ).
Is there an easier way?
Glen Harvy
|
|
|
|
|
|
Thanks for your reply.
This works fine
if (labelAddress2_22.Text == "")<br />
{<br />
labelSuburb22.Location = new Point(125, 150);<br />
labelPostCode22.Location = new Point(275, 150);<br />
labelState22.Location = new Point(125, 175);<br />
labelCountry22.Location = new Point(125, 200);<br />
labelPhone22.Location = new Point(125, 225);<br />
}<br />
-- modified at 4:06 Friday 1st September, 2006
Glen Harvy
|
|
|
|
|
Yep, that will solve it. The reason the old code wasn't working is because the .Location property returns a System.Drawing.Point object. The Point object is a struct (a .NET value type) rather than a class (a .NET reference type). And when value types are returned, a copy of them is returned. So your previous code was equivalent to this:
Point point = label.Location;
point.Y = 150;
Do you spot the problem? A new Point value has been copied from label.Location, and you've set the Y value on a copy of that value, which has no effect on the label's location.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Dumbest. Movie. Title. Evaaar.
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
i have this line of code in a button1:
private void button2_Click(object sender, EventArgs e)
{
...
ArrayList MyArrayList1 = new ArrayList();
...
}
how can i access this same "MyArrayList1" from another button!??
or from another form or class!???
thank you...
[B]It Is Not That I'm Different!
[I]... I'm Only Making The Difference![/I][/B]
|
|
|
|
|
i just found the answer...
<br />
public static ArrayList MyArrayList1 = new ArrayList();<br />
thank you...
-- modified at 10:28 Friday 1st September, 2006
It Is Not That I'm Different!
... I'm Only Making The Difference!
|
|
|
|
|
Declare the ArrayList outside the method.
Example:
public ArrayList MyArrayList;
private void button2_Click(object sender, EventArgs e)
{
MyArrayList1 = new ArrayList();
}
You need to read more on variable scope.
Regards,
Bhupesh.
|
|
|
|
|
Hi, can anyone help me with the following:
When I use mage to create a clickonce deployment of a program called "TestClickOnce", said program will install directly from the created TestClickOnce.application manifest on the hard drive, but will not install from the web, nor will it update. The error is "+ Downloading http://localhost/installer/1.0.0.3/TestClickOnce.exe did not succeed. + The operation has timed out". Also "System.Deployment.Application.DeploymentDownloadException (Unknown subtype)" although the file does definitely exist...
When I create the deployment from within visual studio, it works fine. Publishing from Visual Studio however also produces the files setup.exe, TestClickOnce_1_0_0_0.application (as well as TestClickOnce.application) and also TestClickOnce.exe.deploy (and also a webpage, but I figure that is not important). Apparently the TestClickOnce.csproj file in the project is also modified by publish in visual studio. What are these extra files, how are they useful? Are they important and if not why are they there? Is it in fact the case that I have to publish it first using msbuild or from within visual studio and only use mage for creating updates? Except only the web stuff does not work....
If anyone can answer any of these questions, provide links to answers or suggest a suitable forum on which to ask them again I would be grateful.
I would also be interseted in finding out more of the intimate details on how ClickOnce works. So far I have only managed to find general information and repeats of the basic how-tos in the MS documentation.
|
|
|
|
|
I wana make sth (pic) to move randomly..
when the setting time gone .. i wana stop working that!
With x , y or anthing ?
pls find out some symbol codes for me .. if u know how to work wth..
i ld be really appreciated!
|
|
|
|
|
Could you rewrite your question in English, so one can understand you?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hello
I have an object, Car which contains an object, Engine as one of its members. I have a collection of Car objects and I want to bind a drop down list to the collection, displaying a property of the contained Engine object:
class Car
{
public Engine engine;
public string manufacturer;
}
class Engine
{
public int capacity;
}
In my code I create a Cars collection:
Cars cars = new Cars();
I add my car objects to the collection and bind my collection to a drop doown list:
myDropDownList.DataSource = cars;
myDropDownList.DataValueField = "engine.capacity";
myDropDownList.DataTextField = "engine.capacity";
myDropDownList.DataBind();
This doesn't work though because the fields won't accept the syntax I use to specify the contained object's member.
On the other hand, this works fine:
myDropDownList.DataSource = cars;
myDropDownList.DataValueField = "manufacturer";
myDropDownList.DataTextField = "manufacturer";
myDropDownList.DataBind();
Can anyone tell me how to get my drop down list to bind so that I can display the contained object's member?
Thanks
|
|
|
|
|
Hello
Could you provide the code for the Collection class Cars? This would make it easier to help you.
Kind Regards,
John Petersen
|
|
|
|
|
I was wondering if you are creating a socket by using this code:
Socket socket_ = new Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp);
what sort of data will you receive? will you get only the UDP portion of the IP packet? or will you get all ip packets with the upperprotocol matching UDP on the port you specified in your IPEndPoint? I'm trying to figure out where i go next in my code. if i need to write code to parse out the udp datagram from the ip packet or the data from the udp datagram. thanks!
|
|
|
|
|
nevermind. i used
BytesReceived = so2.EndReceive(ar);
System.Console.WriteLine("Bytes Received:" + BytesReceived);
and then matched up that number with the data bytes field in the UDP packet in ethereal. i think i made the logical assumption that bytes received: 282 and the length of the data in the udp packet in ethereal is 282 that its one in the same..
|
|
|
|
|
hi,
C# question
I am trying to understand events when used with a DLL file.
I can understand how to write a standalong event handler. But how do you
do event handling when faced with "talking" to a dll which takes care of the event handling?
Here is the situation.
I am writing a wrapper class.
MyClass ---> App.DLL
App.DLL already implements events:
Event1, Event2.
When i open the object browser this is what i see
event App.handleEvent1 Event1
event App.handleEvent2 Event2
The question is how do i implement event handling for event1 and event2 in MyClass?
Appreciate your help in advance.
thanks
Ramesh
|
|
|
|
|
No, you can't. The event model does not propogate events across the boundary of assemblies (DLLs). Callback could be a workaround, but it has some design issues and limitations in your case. By callback, I mean that after the DLL handles event1, make a callback into MyClass object for further processing.
Best,
Jun
|
|
|
|
|
I'm looking to declare an array but I don't know the # of elements I will need. It will be used in a "FOR" loop to read data from a database and I have no clue how many rows will be returned.
So for example, I want to declare my array like the following:
int[] myArray = new int[];
However, it appears I have to declare it with a default value like this:
int[] myArray = new int[3];
So what do I do if I don't know how many elements I will need?
Thanks.
-Goalie35
|
|
|
|
|
Use an ArrayList instead. It'll expand itself as needed when you .Add() elements to it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello
Use ArrayList instead.
Regards
|
|
|
|
|
Use a collection (list/stack/vector/etc) instead. Your scenario looks like a perfect case for dynamic memory allocation.
Best,
Jun
|
|
|
|
|
Hi,
I am writing an application that uses an extended listview. The extended listview is modified to reduce the flickering when being populated by only invalidating the single item being added. However, If another window is dragged to overlap my application while the listview is being populated, the listview does not redraw when the overlapping window is moved out of the way.
Therefore, I think I need to capture the event when the window overlaps my control. How can I do this? I believe there is an win api that can flag this, but I am not sure which one. Anyone know or anyone have a better approach?
Thanks in advance
Peter
|
|
|
|
|
You almost never have to detect overlappings. Windows handles the window stack and z-order automatically. When part of a window is covered, the covered portion won't be updated in the dark. If you force a update, the chances are you also bring that portion to the front at the same time.
Note that this does not stop you from updating the data at any time you want. Windows only controls the rendering on the screen.
Best,
Jun
|
|
|
|