|
Hello,
Yes you have a null ref. exception here.
wind[0] and wind[1] are not initialized
//Constructor code
for(int x=0;x<wind.Length;x++)
{
wind[x] = new int[10]; //for example
}
Hope that helps!
All the best,
Martin
|
|
|
|
|
You forgot to allocate the size of the second dimension of variable wind.
You need to do something like this:
int[][] wind = new int[2][];<br />
wind[0] = new int[3];<br />
wind[1] = new int[5];
Set the size of the first dimension to 2 (you've done that). Then you need to set the sizes of the second dimension for each of the elements (!) in the first dimension.
By the way, if you want the sizes of the second dimension to be the same, you might consider using a two-dimensional array like this:
int[,] wind = new int[2, 3];
|
|
|
|
|
Hello,
jjansen wrote: By the way, if you want the sizes of the second dimension to be the same, you might consider using a two-dimensional array like this:
int[,] wind = new int[2, 3];
Thank you for the information about the 2D-array. (never used it before)
How do I get access to a spezial array?
(int[] intarray = wind[0]) //doesn't work
Thanks for your time
Martin
|
|
|
|
|
Hello,
I am trying to implement drag within my shell namespace extension. I noticed that in MFC you are able to set up a message area to attach to the events such as OnBeginDrag.
My question is; How do I attach to those events using c#?
Thank you,
Rick
Rick
|
|
|
|
|
iwant to know what the unit which we messauer with on this document and what to do to convert it to centemeter
as example
Graphics grahpics = e.Graphics;
Brush brush = new SolidBrush(Color.Black);
Pen pen = new Pen(brush);
Font font = new Font("Arabic Transparent",22);
grahpics.DrawString("Omar",font,brush,50,50);
this 50 is the cordinate what by which unit its and how if i want to as example if i want to begain with cordiate 2 cintimeter how can i can comvert it
|
|
|
|
|
Hello
AFAIK the units used in printing are "tenthes of inch". ie. 1Unit = 0.1Inch
You can write your own transforming method, knowing that each inch = 25.5 mm
=> each unit = 0.255 mm
=> each mm = 3.92 unit
so if you got your dimensions in mm, just multiply them by this factor (3.92), and they will be in "hundredths of an inch" just like the .Net printing methods and objects want.
Example:
2cm = 20mm => 20 X 3.92 = 78 Unit
Regards
|
|
|
|
|
|
How to flip mesh object in DirectX horizontally or vertically?
Sarajevo, Bosnia
|
|
|
|
|
How about rotating the world?
Device.Transform.World = Matrix.RotationX(radian);
/\ |_ E X E GG
|
|
|
|
|
This is not an option. I want to flip a specific mesh, not the whole world, as there are many meshes in the world that should retain its positions.
Sarajevo, Bosnia
|
|
|
|
|
i downloaded a web application and when i run the project this msg popped up to me.
Error while trying to run project: Unable to start debugging on the web server.the project is not configured to be debugged.
thanks in advance.
haitham
|
|
|
|
|
What's so hard to understand? You're being told that the project configuration is not set to debug (but to release), so it cannot be debugged.
Simple as that.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
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!
|
|
|
|