Topics
-
- 1 reply
- 1.1k views
you know where in task manager you can set the priority of a thread, so it gets max cpu time, well is there any way to do that in c# code to make my app top priority??
Last reply by HJB417, -
-
- Administrators
- 3 replies
- 806 views
im getting this error: An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll Additional information: Collection was modified; enumeration operation may not execute. i have no controls on the forum. i have overriden the onPaint method and the OnPaintBackground method. in my own paint method im drawing a simulation to the screen. i have bots, to which i pass a graphics object and draw them. each time they move, i invalidate the form and redraw. when they start moving too much, i get the error above. any ideas?
Last reply by fguihen, -
-
- 1 reply
- 2.6k views
I have the following code to render to a texture: Bitmap bm=new Bitmap(512, 512); Texture tex=new Texture(device, bm, Usage.RenderTarget, Pool.Default); device.SetRenderTarget(0, tex.GetSurfaceLevel(0)); device.Clear(ClearFlags.Target | ClearFlags.ZBuffer , Color.Blue, 1f, 0); SetupCamera(); device.BeginScene(); Draw(); device.EndScene(); device.Present(); It's crashing on creation of the texture. Is there another option other than the bitmap creation? Thanks. -Nick
Last reply by DrunkenHyena, -
-
- *Experts*
- 3 replies
- 1.3k views
Hi, My project uses directX to render several MDI child forms. In the activate event of each child form is: parameters = new PresentParameters(); parameters.SwapEffect = SwapEffect.Discard; parameters.AutoDepthStencilFormat = DepthFormat.D16; parameters.EnableAutoDepthStencil = true; parameters.Windowed = true; video = new Device(0,DeviceType.Hardware, this,CreateFlags.SoftwareVertexProcessing,parameters); In the OnPaint Event of each form is the render loop. A few questions - 1. Is there a better way to switch between rendering forms other than creating a new device each time. 2. With this setup, sometimes when I press the close box on one of t…
Last reply by DrunkenHyena, -
-
- 3 replies
- 1.2k views
Hi I trying to set the texture to a cube, but when I render it the box just gets the textures main color. I use the following code to create and set the texture to the box Mesh = Mesh.Box(Device, SizeX, SizeY, SizeZ) Texture = TextureLoader.FromFile(Device, CurDir() & "\Textures\" & TexturePath, 0, 0, 0, 0, Format.Unknown, Pool.Default, Filter.Linear, Filter.Linear, Color.Blue.ToArgb)
Last reply by DrunkenHyena, -
- 4 replies
- 1.2k views
I'm having hard time with this thing.. so, the problem is as follows: - I've got a mesh loaded from an .x file, this mesh is a sphere, and also textured. Everything works just fine. - I've also got a directional light that illuminates everything just as it should. - The problem lies here, the larger I scale the mesh it begins to de-illuminate. For example, the XYZ scales are all 25, thus making the loaded mesh bigger in every direction.. but at the same time the light doesn't seem to have any effect to it. I've noticed that if I make the scale of the mesh smaller it begins to illuminate bit by bit until the scale reaches 1, and it's perfectly illuminated. So the p…
Last reply by DrunkenHyena, -
- 2 replies
- 1.2k views
Hi, all. I got stuck...here.. Let me simplify my problem.. I added One TextBox, and Required Validator associated with the textbox. And, Submit button. When submit is clicked it should do some thing before submit. So, when button clicked javascript function "SaveData()" must be called. So, I added following code to Page_Load event. this.btSubmit.Attributes.Add("onclick","return SaveData() ;") ; After adding this, validator doesn't work! Event with empty textbox, it still submit to server without stopping.. SaveData() is this. <script language="javascript"> <!-- function SaveData() { if (!true) return false ; try{ //d…
Last reply by goodmorningsky, -
- 2 replies
- 698 views
I have a database and if I do not set the password, my connection works fine. When I add a database password, I get an error message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user." Here is my connection string: strCN = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source='" & strDBPath & "';" & _ "User ID=Admin;" & _ "Password=" & strDBPW Now if I take password off of the database and remove the & strDBPW from my connection string it works fine. Any ideas? Thanks, Chester
Last reply by cpopham, -
- 1 reply
- 2.7k views
I use SreamWriter and WriteLine to write to a text-file. But StreamWriter adds an extra carriage return to the end of the file. I tried Write instead of WriteLine but it didn't help. :confused: How can I get rid of the extra carriage return in the end of the file? :cool: I'm using VB.NET 2003
Last reply by JumpyNET, -
-
- Administrators
- 2 replies
- 1.3k views
i am trying to place a label on a GDI circle, and move it along the screen on the circle. the circle is a graphical representation of a person. here is how i create a label for each person: lab = new Label[People.Count]; foreach(Person p in People) { p.People = this.People; int sad = this.People.IndexOf(p); //labels[People.IndexOf(p)] = new Label(); lab[People.IndexOf(p)] = new Label(); } when i update the circles position, i draw the label like this: foreach(Person p in People) { p.update(); p.DrawToScreen(f.Graphics); // Label label = (Label)labels[People.IndexOf(p)-1]; // label.Location …
Last reply by IngisKahn, -
-
-
- Moderators
- 2 replies
- 1.3k views
Hi! :D Someone need a cheap alternative to Crystal Report? Why don't you take a look to my last effort? :) (www.neodatatype.net) It's really simple to use also if it is not so powerful as CR :(
Last reply by neodatatype, -
-
- 3 replies
- 1k views
I need to use a 32bit datatype that is in the order of big-endian. I'm unsure of how .NET order's it's data, depending on if it's big/little I could change the data it must hold. Does anyone know what scheme MS uses? The data I'm using is 0x7E.
Last reply by HJB417, -
-
- Administrators
- 2 replies
- 868 views
Hi! I am looking for some GUI Test tools for a windows forms app. Do you know some good? regards, gicio
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 4 replies
- 784 views
When I maximise one of the child forms in my application and then open another child form this form is maximised as well, is there a way to stop this. i.e. when I maximise a child form this does not have a knock-on-effect and make every form maximise???? cheers Simon
Last reply by lidds, -
-
- 0 replies
- 725 views
Hi, I want to sort an ArrayList that contains structres. I have this code so far Public Structure statData Implements System.IComparable Public period As String Public player As String Public rnds As Long Public score As Single Public scoreRank As Long Public scOut As Single Public scOutRank As Long Public scIn As Single Public scInRank As Long Public net As Single Public netRank As Long Public points As Single Public pointsRank As Long Public putts As Single Public puttsRank As Long Public SortBy As String Public Function CompareTo(ByVal obj As Object) As Integer Implements…
Last reply by rotsey, -
- 0 replies
- 666 views
Hey, Having real trouble on my MDI application. I create two window as follows frmSChild objfrmSChild = new frmSChild(); objfrmSChild.MdiParent = this; objfrmSChild.Show(); frmMChild objfrmMChild = new frmMChild(); objfrmMChild.MdiParent = this; objfrmMChild.Show(); And I have tried to put in a way of having it tiled on startup, but I cant get it to work. Ideally I want a form that I have created to perform this so that the form appears on startup and the user can choose the layout. So later I have this to create an instance of the form Layout I already have. public void Layout() { frmLayout layout = new frmLayout(); layout.ParentFormL…
Last reply by srd1984, -
- 0 replies
- 5.8k views
I've created an app that uses a xmlvalidation reader to load an xml file. my problem is that the xml file contains a reference to a dtd external to our network. When i try to load the document I get this error: "The remote server returned an error: (407) Proxy authentication Required" This is what i have in my app.config. I Also verified that my machine.config file has a 'usesystemdefaults="true"' entry. <configuration> <system.net> <defaultProxy> <proxy usesystemdefaults="true" proxyaddress="http://myProxy:8080" bypassonlocal="true" /> </defaultProxy> </system.net> </configuration> …
Last reply by PePe, -
-
- Moderators
- 1 reply
- 608 views
i'm using microsoft visual studio 6.0 and i made a prog that will login and out of a server basically i want to add a loop or a timer to it to make it do the same thing every two minutes here's the code i got thus far i just need to know the code to make it repeat the proccess every two minutes Dim ReturnData As String Private Sub cmdStart_Click() ReturnData = Inet1.OpenURL("http://***.1**.**4.***//PPP_doLogin.cgi?ConnID=oe00", icString) Timer1.Interval = 5000 Timer1.Enabled = True End Sub Private Sub Command1_Click(Index As Integer) Select Case Index Case 0: If txtURL.Text <> "" Then RichTextBox1.Text = Inet1.OpenURL("http://1**.1**.**4.***//PP…
Last reply by Robby, -
-
- 12 replies
- 1.3k views
Ok, I made an msn bot in visual basic.net a while ago in windows forms, and I want to make it into a console application. I have run into one major problem though. In my windows application version every chat session ran in a different window. Is there any possible way to simulate or do this with a console application? Thanks in advanced --decrypt btw, I am using vb.net
Last reply by Uncle Gizmo, -
-
- Leaders
- 1 reply
- 885 views
Hi, I habe a Problem with multitasking. I habe a 1 timer to display "Please wait, Downloading settings ..." but it displays at the End of process. I want to display it during a process. I sue applications.ToEvents() But it hepls not. Please help me, Erdenemandal my code Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim frm9 As New Form14("Download setting ") frm9.Show() Application.DoEvents() Label1.text = "Please wait, Downloading Settings ..." timer1.Start() end sub
Last reply by Iceplug, -
-
Who's Online 0 Members, 0 Anonymous, 83 Guests (See full list)
- There are no registered users currently online