|
how to use calculous to programing three dimensional graphics
in another way ,which one can tell me introduction use the skill(technology) programing one-segment program to implement three dimensional graphics...like render a cube on the screen!
it's better write by the c# or java ,certainly write other of language is ok.i an just curious about the technology !
|
|
|
|
|
C++ is the best language to use if you want to write a ray tracing program, and that's what you need to google, ray tracing.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
chenli0513 wrote: how to use calculous to programing three dimensional graphics
You wont get far if you don't know how to spell calculus.
|
|
|
|
|
Calculus isn't appropriate for this; you need linear algebra and geometry.
Your basic problem is transforming a 3D point (space) to a 2D point (x, y coordinates on a screen). This problem has already been solved by others, and is called the "viewing transformation". If you Google this term you'll get links telling you how to do it. It's not hard.
|
|
|
|
|
...is there such a thing?
There is a need to limit the number of characters that can be entered into a NumericUpDown control and I have done this by handling the control's KeyPress event and checking that the length of the text will not exceed the length of the NumericUpDown.Maximum property.
The problem that has left me stumped is handling the case where the user has any number of characters selected in the control and attempts to overwrite the selected character(s) with new ones; I can't handle this case properly because I can't get hold of the SelectedText in the NumericUpDown (because it doesn't exist as a property).
Does anyone have any ideas?
|
|
|
|
|
Hi.
There is no such property.
The property you are looking for is NumericUpDown.Value.
There are three ways for a user to change this value:
1. By clicking the up/down buttons
2. By using up/down (keyboard) buttons
3. By typing any numbers and LEAVE the control
If the typed number is bigger than NumericUpDown.MaxValue (or smaller than MinValue) it will be adjusted.
The Value property will NEVER be bigger than MaxValue..
To control the value, use the ValueChanged event
Kjetil
|
|
|
|
|
Hi, thanks for your reply.
I know validation is performed when the control loses focus, but the thing is I need to be able to perform validation on key press, hence the need for using the KeyPress event and for being able to work out somehow whether or not the text in the NumericUpDown is currently selected.
cheers!
|
|
|
|
|
Hi,
I'm using a propertygrid to view properties of my objects. This works fine for when I have one object selected I also got it to work for multiple objects. But my problem is that I have an "Name" property. When I have selected multiple Items I can set the name property. But I don't want to have the same name.
I there a way to disable this property in the properygrid only when there are multiple objects selected??
Thanks.
|
|
|
|
|
I'm getting this error this morning. I believe it was caused by me deleting an empty resourcefile from my project. I can compile and run the code fine but if i go to any of the ui elements within the project I get the WSOD with this message on it:
Projectitem unavailable.
Hide
at EnvDTE.ProjectItem.get_FileCount()
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObjectProvider.GetFileNameForProjectItem(ProjectItem item)
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.BuildType()
at Microsoft.VisualStudio.Design.Serialization.ResXGlobalObject.GetObjectType()
at Microsoft.VisualStudio.Shell.Design.GlobalType.get_ObjectType()
at Microsoft.VisualStudio.Shell.Design.GlobalObject.GetHashCode()
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GlobalKey.GetHashCode()
at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetTypeFromGlobalObjects(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetType(String typeName)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Any ideas how to fix this?
Cheers
Russell
|
|
|
|
|
I can verify that you get a projectitem unavailable error after removing the settsings file. The solution is as simple as you would think however. Simply add a new settings file usally 'settings1.settings' and move it into the properties folder. VS will then readd a settings.settings file. ?But it works.
|
|
|
|
|
Hi, I have the same problem! how did you solve it?
thanks!
|
|
|
|
|
I'm sorry, I posted this 3 years ago and can't remember the solution.
There used to be a lot of information about WSODs on the web. I think I might have just recreated the controls I was having issues with and copied and pasted the important code back in from the original files.
|
|
|
|
|
How to print demo page using PJL in C#. I have code for print, but I don’t how to execute in c#.
I have followed step Like
private void ConnectToPrinter(string IPAddress, int Port)
{
//Loads the printer's IP address and port
ipEndPoint = new IPEndPoint(Dns.GetHostEntry(IPAddress).AddressList[0], Port);
//Creates a new socket to connect to the printer. (Streams data through TCP)
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Connect(ipEndPoint);
}
o Connect To Printer ( IP, Port)
o strCommand = String.Format("\x1B%-12345X@PJL EXECUTE DEMOPAGE \r\n\x1B%-12345X\r\n"); ;
//Sends the request to the printer.
byte[] sendData;
sendData = Encoding.ASCII.GetBytes(strCommand);
int result = 0;
result = socket.Send(sendData, sendData.Length, 0);
I don’t know , where I made a mistak. Please tell me how to execute PJL Command in C#
Regards
Rajesh
rajesh
|
|
|
|
|
Hello,
m working on C#.net windows application. for version updation i use appupdater dll where in i use virtual directory to update.
When i call
appupdater.CheckForUpdates() i get an exception
System.Net.WebException: The remote server returned an error(404) file not found
Can you give me some suggestions over it.
|
|
|
|
|
I assume an appupdater checks a given URL for an update. What's the URL ? Sounds like it doesn't exist
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
I have checked n debugged with the URL it exixts and i get it properly.
|
|
|
|
|
We are developping a Web Application using Asp.Net. We need to find out the IP number of a client running the Web Browser on a remote desktop connection. In other words, this user opens a Remote Desktop Connection on another remote server and runs the WebBrowser on this remote server, and we need actually the IP number of this user OWN machine.
In fact we could get the user client IP easily using the statement "HttpContext.Current.Request.UserHostAddress, but this brings us, naturally, the IP number of the machine on which the RDP connection has been opened.
What we need is possible? How to to it?
Thanks in advence.
|
|
|
|
|
We have an ASP.NET forum. What you need, is not possible, definately not with ASP.NET.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Ok thank you for your reply..
and Really sorry for wrong forum..
|
|
|
|
|
Hi all,
I have a C++ dll which I can use for communication with an external device. Which works fine with one device. But when I want to get access to more than one devices it fails. But I can make it work by executing my program several times. What can I do to get it work inside of one program?
Thanks,
Ralph
|
|
|
|
|
Create multiple application domains that reference the dll, so you load it seperately each time ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
I haven't seen your code, but from your description it sounds like you may not be completely re-initializing your DLL variables between devices.
|
|
|
|
|
I created a GroupBox(groupBox1) that contains textBox and buttons(i created this with the design option on the Form).groupBox1 is on a Tab that i created it also on the design option.
After Clicking on a specific button(no matter where) the app opens a new Tab.
i want that the new Tab(tab2) will has the same groupbox1(a copy of the first-not a reference)..How can i do it?
I tried this:
GroupBox g = new GroupBox();
Thank you for your attention
G.
|
|
|
|
|
i think u need to add these controls run time to the collection of controls of tab.
rahul
|
|
|
|
|