|
im a relative noob when it comes to code, im more of a creative 3d designer but as part of my uni course i do need to create a working 2d side scrolling shooter like metal slug using visual studio, direct X 9 in C#... i can use a games engine if i wish as they want to concentrate on my creative skills rather then code work...
SO a couple of questions i have for you very fine people...
---I need a minimum spec for a PC that can run this game, its going to be very simple with only 3 levels and simple 16 bit colours any ideas?
--- Does anyone know of a nice games engine that i can run in VS.
cheers guys...
sam
|
|
|
|
|
|
cheers mate, thats pretty much perfect
|
|
|
|
|
Hi all,
It seems an application i'm working on has developed a problem. My colleague has created a user control which inherits the ListView control so we can implement an edit in place feature.
The edit in place feature simply listens for an event when you click on a rows subitem and if its the cell you want to edit, it will move and resize a textbox over the cell and pull the value.
An event (endediting) is fired when the control looses focus or a certain key is pressed. We use this event do what we want with the value typed in.
This seems to work fine unless you stick in something that causes the listview to loose focus whilst within this event. I am attempting to parse the value typed in and if its invalid, I am throwing an error (messagebox) to notifiy the user and setting the cancel flag (e.Cancel.)
If I use the mouse to click the OK button within the MessageBox, when it disappears an Rubberband appears on my cursor and remains inside the listview. The only way to remove this is to either click the mouse, alt+tab to cause the form to invalidate or press escape.
If I use the enter or escape key to clear the MessageBox, the above doesn't happen and the listview regains focus.
I'm now at a loss, I have no idea where to turn I have tried invalidating the form, the listview etc, i've tried forcing the focus of all of the controls within the same form and i've even tried sending the escape key to the app using sendkeys.
Has anyone got any idea's why? I'd appreciate your input!
Regards
|
|
|
|
|
Well i've resolved it.
By setting the following properties, it no longer causes the undesired effect.
FullRowSelect = true;
HeaderStyle = NonClickable;
HideSelection = false;
MultiSelect = false;
|
|
|
|
|
Hi
I am using Visual Studio 2005 and C# to develop a Windows application.
When the columns in a DataGridView are ordered, it seems as if only the DisplayIndex changes. Is there a way to also change the actual ColumnIndex in the DataGridView (as well as the columns in the DataTable that is bound to the DataGridView) when ordering the columns in the DataGridView?
The reason I want to do this is because the DataTable is sent to another Form as well where it is bound to another DataGridView. Here I would like the column order to reflect the way it was changed on the first form.
Thanks.
Kobus
|
|
|
|
|
only thing that I can suggest is to sort the datatable whenever the user sorts grid column. But I am least confident that I will work.
|
|
|
|
|
Hi, How can i see the Calling Tree of functions in MS VS 2005?
THANKS
Have Fun
Never forget it
|
|
|
|
|
If you mean Call Stack thn go to Debug->Windows->Call Stack in the Menu Options.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
THANKS, Yep that what i wanted
Have Fun
Never forget it
|
|
|
|
|
Look at the StackTrace class.
|
|
|
|
|
Hello
On a serial port data received event I am updating the form controls using delagates by 'invoke'. it is ok there.
On data completion from serial port I created a custom event to mark the data completion and to start processing the data.
Here (on this custom event handler method) I have updated a form text property and it is working ok- no delegates.
is it ok or safe? Should we use delegate and 'invoke' here also for safety. Is there any cross threading issues here? Visual studio gave no comment!
Thanks
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Hello,
Also for data completion you must use thread safe method. Use Invoke method.
Are you on .net 1.1 ?
|
|
|
|
|
Thanks for the reply.
I created a invoke method.(Other case also working OK in test now.)
Using VS2008 .net version 3.5 I think..
Thanks a lot for the confirmation.
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Theres a couple of considerations here. First you should usually get out of your data recieved event as quick as possible. Secondly, you need to marshal stuff onto the UI thread safely.
If its just doing something simple (like updating a label), then use BeginInvoke to update on the UI thread (plain Invoke will block whatever called your event handler).
Otherwise (say theres lots of processing / logging to a database) it may be worth sticking the data in a queue, and emptying the queue on another thread.
|
|
|
|
|
Thanks for the reply
Mark Churchill wrote: get out of your data recieved event as quick as possible
It is done. I am only updating a my own string buffer in the data received event of serial port. So no lags.
but..
Mark Churchill wrote: you need to marshal stuff onto the UI thread safely.
Actually after consecutively dumping the data in a buffer on every data received event I reset a timer count to detect a pause in stream to mark the end of a packet. When the packet stops I create or 'throw' a user event from the timer tick event handler method. Is there any inherent problem in this method?
from my custom event handling function I am using invoke method to update a few labels.
I have some more tasks in my datacomplete custome event like updating a data grid and loading into a buffer etc. Not huge database. I am moving into that only.
Mark Churchill wrote: then use BeginInvoke to update on the UI thread
need to study that method.
Thanks a lot..
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Keep in mind that raising an event isn't generally asynchronous. So it doesnt really "throw", it just calls and returns like any other method (unless you use delegate.begininvoke - which grabs a thread from the pool).
Also using BeginInvoke (control/form.begininvoke) on the UI thread sticks a token for the delegate in the windows message loop. If the message loop isn't pumping for some reason (say its been blocked) then they can queue up. This probably won't happen with serial data rates, but its something to keep in mind if you are updating the UI on a push based model, or if you are doing some complex graphics.
|
|
|
|
|
Mark Churchill wrote: So it doesnt really "throw", it just calls and returns like any other method (unless you use delegate.begininvoke - which grabs a thread from the pool).
m.. new information for me..
reading articles...
will be back later.
trying to grasp concepts. I am coming from a sequential programming experience with micro controllers. Beginner on windows programming.
Thank you.
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Trust me, the micro experience is probably good for you Having more of an understanding of what is happening at the hardware level will let you make better use of the tools. Theres too many beginning programmers that think some sort of magic is happening under the hood, and that things do exactly what the API implies. Theres no magic! .Net hides a lot of the more nasty implementation details from you, but it also makes it very easy to try and do the impossible.
|
|
|
|
|
Mark Churchill wrote: the micro experience is probably good for you
That boosts up my confidence. Thanks for the clues to drive my search
GoodNight from my part of the world! CUL
Thanks for the time!
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
Hi!
I am looking for a piece of C#-Code, that helps me to detect Pings sent to my System in a Network. I was not succussful looking on this site up to now, so can anyone give me little help?
Thank you!
Greetings
Zaphod
|
|
|
|
|
Google[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
use Process object with system.diagnostics.processstartinfo, capture output using redirect standard output, translate and use them
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Thank you!
I will have a try!
Greetings
Zaphod
|
|
|
|
|
I get error message related to this line: 'IE iepopup_1 = IE.AttachToIE(Find.ByUrl("http://site.fi/page.htm"));'
Any ideas?
Exception WatiN.Core.Exceptions.IENotFoundException was thrown in debuggee:
Could not find an IE window matching constraint: Attribute 'href' with value 'http://site.fi/page.htm. Search expired after '30' seconds.
using System;
using System.IO;
using System.Threading;
using WatiN.Core;
using WatiN.Core.DialogHandlers;
using WatiN.Core.Exceptions;
using WatiN.Core.Interfaces;
using WatiN.Core.Logging;
namespace TestSpace
{
public class TestClass
{
[STAThread]
static void Main()
{
testing();
System.Environment.Exit(0);
}
public static void testing ()
{
IE ie = new IE("http://site.fi");
ie.GoTo("http://site.fi/");
ie.Link(Find.ByUrl("http://site.fi/link")).Click();
ie.TextField(Find.ByName("username")).TypeText("user1");
ie.TextField(Find.ByName("password")).TypeText("user1");
ie.Button(Find.BySrc("http://site.fi/button.gif")).Click();
ie.Link(Find.ByUrl("http://site.fi/link_to")).Click();
ie.Link(Find.ByUrl("http://site.fi/page.htm")).Click();
IE iepopup_1 = IE.AttachToIE(Find.ByUrl("http://site.fi/page.htm"));
LogonDialogHandler dhdlLogon = new LogonDialogHandler("popup_user","popup_user");
iepopup_1.AddDialogHandler(dhdlLogon);
iepopup_1.Close();
}
}
}
|
|
|
|