Nerseus
*Experts*-
Posts
2607 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nerseus
-
It's a bit unclear to me what's trigger the keydown. As far as I know, a barcode can be interpreted as an image or as a series of characters (usually from using a barcode font). Are you saying you're reading in a string of characters including a barcode and an enter key and using something like VB's SendKeys to send the string to your app? Can you not strip off the Enter key in that case? Isn't there anything to let you know that you're scanning or accepting the barcode data so that you could prevent the Click? Or rather, is there any way that you could prevent the KeyDown (I'm not sure which bit of code - yours or someone else's is causing the event). -Ner
-
I don't think WSH supports .NET unless they've improved it. The JScript is just what you'd get in the browser, but with more rights (to create objects and such without any security popups). I can't remember offhand the names of the objects you want - haven't used COM in over a year now :) - but it's something like: var imageObj = new ActiveXObject("stdole.StdPicture"); imageObj = LoadPicture("filename") I'm about 80% sure the StdPicture is what you want. LoadPicture might be a VBScript specific function, if it even exists there. I know it works in VB6 :) Anyway, I'm still not sure how you'd get a pixel from the StdPicture object. What are you trying to do with WSH that you need to get a pixel? Is this trying to look at another window and get the pixels? If so, you're likely to need the API which I don't think is available in WSH. You might be better off coding this whole thing in either VB6 or at least making a VB6 DLL that you can then use from WSH. I'd suggest .NET, but I believe you'd have to code your .NET DLL to be a COM DLL which is probably more work than you want :) -Nerseus
-
XML is whatever you want it to be - seriously. If the XML is coming from you (from code you write) then you probably don't need a schema (to do semi-automatic validation) or any custom validation as you should know what you're generating. This would be the case, for instance, if you have a method that returns XML or you're getting the XML from a DataSet. If you're receiving data from an outside source then you can't be sure it's "good" XML (might be valid XML syntax, but missing required elements for instance). In that case it's best to use a Schema. A schema, in short, is an XML file that contains information on what another XML file should look like. It would list required elements and attributes, optional els and atts, the number of rows that can/should/must be in each element, datatypes of elements and more. Through a few lines of code you can use the built in validating objects to quickly tell if an XML file matches the schema and get a simple yes/no answer. Assuming you're receiving XML FROM a DataSet, you can easily read it back into a DataSet. If it's not a DataSet I wouldn't try to load it into one. I'd stick with the XmlDocument object. There are methods to find nodes, node lists (including filtered lists), get the attributes and values and more. Now if you have a DataSet, there is a special XML object called XmlDataDocument. It's an XmlDocument object that binds to a DataSet and keeps itself in sync. So if you find a node in the XML and update a text value, for instance, it will change the value in the DataSet as well. Likewise, changing a value in the DataSet will show up immediately in the XML object. -Ner
-
SQL Syntax Help for INSERT INTO WHERE...
Nerseus replied to Gladimir's topic in Database / XML / Reporting
You're combining the two basic forms of the INSERT. You either want the SELECT or the VALUES, but not both. For instance: INSERT INTO Table1 (DescID) SELECT DescID FROM Table2 WHERE MyColumn = 'MyValue' OR INSERT INTO Table1 (DescID) VALUES (123) When using VALUES you must provide an actual value, not a select. If you have a combination of known hard-coded values and values from a table, you use the SELECT as in: INSERT INTO Table1 (DescID, Active, UserName) SELECT DescID, 1, 'djones' FROM Table2 WHERE MyColumn = 'MyValue' In the above, the "1" and "'djones'" are hard-coded - they have nothing to do with Table2. -Nerseus -
You might be able to override the button and handle the EnterKey in a Preview type of event but... why would you want to? Unless you're doing something funny with the button (custom drawing it for some reason) I can't imagine why you wouldn't want Enter to trigger the click event. Anything *but* calling the click event would confuse a user. -Ner
-
If rohankk54 has a licensed copy then he paid some good money for it - why uninstall it because I asked a simple question? If it's his dad's or someone else's then it's their license, not his. I feel the pain of wanting software but it's too expensive. We use Er/Win at work for database modelling and due to its $3500+ price tag per user, we have only one copy for our DBA. The rest of us get printoffs that he has to print. But that's the way it goes, unfortunately. And just because you *can* find software for "free" by downloading it, you shouldn't. If you found a car with the keys in it you wouldn't think about jumping in and taking it anywhere - the same should be true for software especially since we're all developers here and we want to make money, too. There are lots of great tools that are free for modelling in 3D. And many software companies offer free trials of their software and discounted versions for students. There are always options to stealing, which should never be an option. A guy walks into his psychiatrist and says "doc, two nights ago I dreamt I was wigwam then last night I dreamt I was a teepee. What's up?" The Dr. says "You're too tense". Me, I dream of software - I'm not tense. Weird maybe, but not tense :) -Nerseus
-
You can use the object browser (View->Other Windows->Object browser) through Ctrl-Alt-J. I believe Keys is part of System.Windows.Forms (Keys.Escape and such). -Ner
-
You can add them manually (to an ArrayList for example) and bind, or just fill the ListBox manually. Or you could create an expression column with both fields plus the hyphen and bind to that. -Nerseus
-
I was a lab assistant in college. It was mostly keeping the printer stocked with an occasional question about WordPerfect, Viruses, and actual homework. It left me a lot of time to program and play Wolfenstein (the Demo took 3 floppies, it was huge!) :) While it paid minimum wage (maybe less), it looked "good" on a resume I thought. Who knows? If you're looking for money, my sis worked at Dominos while in school, bought a franchise her senior year and then sold it a few years later and paid for her house (mostly). Not a bad start :) -Nerseus -Ner
-
Look at this post. -Nerseus
-
Have you tried to create a setup project yet? Or read any of the help? I'd start there and then ask any specific questions you have. The wizard makes things pretty easy. -Ner
-
I assume you have a way of reading the image into a Bitmap object in .NET and you just need a way to get it saved out again? I'm not sure how you want to resize: stretch the image or just make the image 200x200 and leave some extra "white" area on the bottom of the image. Here's some code to do the stretched version: Bitmap b1 = new Bitmap(@"c:\temp\test.bmp"); // Stretched version Bitmap b2 = new Bitmap(b1, new Size(200, 200)); And some for the non stretched version (well, stretched but keeping the same aspect ratio): Bitmap b1 = new Bitmap(@"c:\temp\test.bmp"); // Non stretched version Bitmap b3 = new Bitmap(200, 200, b1.PixelFormat); // Figure out scaling factor for drawing float scale; if(b1.Width > b1.Height) scale = 200f / b1.Width; else scale = 200f / b1.Height; Rectangle dest = new Rectangle(0, 0, (int)((float)b1.Size.Width * scale), (int)((float)b1.Size.Height * scale)); Rectangle src = new Rectangle(0, 0, b1.Size.Width, b1.Size.Height); Graphics g3 = Graphics.FromImage(b3); g3.DrawImage(b1, dest, src, GraphicsUnit.Pixel); g3.Dispose(); -Ner
-
We put all of our core graphics into a separate assembly (project/DLL) which exposes them as resources. You get them by a string name, which is generally the original filename minus extension but wouldn't have to be. They're called like GetBitmap("mainlogobig") and GetIcon("exclamation3"). That way you an add more later without breaking any interfaces or version numbers but you can separate out the graphics. Just another idea. -Ner
-
I'm not really sure of the difference. These are graduate students that are teaching lower level CS courses. When I was in school they were called teaching assistants but that may have channged or maybe I just don't know the difference. My roomie was one, so I know what *he* was called but maybe they're teachers aids elsewhere? They got the job because they really knew their stuff (C#) and showed us that they really wanted to learn more (very very hungry for technology). They fit right in as that's what we're all about. We all read the magazine, MSDN, get into the technology more than we probably should :) If it weren't for my really cool lava lamp at work, I'd be a "nerd". Oh wait... nevermind. -Ner
-
From what I remember, getting internships in general was pretty hard. They were limited, and so many programmers wanted them. I have no idea whether an internship normally leads to a permanent job after college. I know it works that way in other professions, but I have no experience with it in computers. Having said that, we have just hired 3 part time developers from the local university. One is a student (graduates in December and will come on full time), the other two are teaching assistants and may or may not come on full time when they graduate. We hired the student because we wanted a junior guy and he was very good. He told his teachers about us since we're one of the few C# shops in town and they were interested and also very good. As for learning real world experience from an internship, take note of where you do your internship versus where you might want to work one day. Smaller companies tend to be a little looser on design and documentation while large companies, especially government jobs, tend to put a lot of emphasis on design and documentation (and other procedures). My first job was the former and while I learned a LOT about VB I didn't learn much about working on larger projects the *right* way. It's one of the reasons I left actually, though I wasn't sure what was missing at the time. -Ner
-
What kind of projects did you work on in the past? Do you want to keep the same types of projects? Meaning, if they're database oriented, then I'd suggest looking at ADO.NET (assuming you want to pick up .NET) since it's changed completely since ADO 2.x. The whole concept is different and it takes some practice to get used to the new objects. Of course, just how forms work has also changed. You'll have to scrap any notion of global variables and an auto-created instance of a form (like in VB6 and earlier). You can have static properties which act like globals, and your default Windows app gives you one "free" form that you don't have to create yourself, but there's no more "frmNewForm.Show()" without creating it first. Then there's error handling, debugging, the new IDE and the new files (the project files, resource files, source files, etc.). That's a lot to absorb and nothing mentioned relies on one particular language - this is just the framework and VS. But, the first time you fill a ComboBox with an object that has distinct properties (not just a string and an optional int in the ItemData), you'll be tickled pink. As for the market, I haven't really looked around that much. I would guess that now that VB.NET has been out for a year and upgraded to .NET 1.1, some smaller to mid sized companies might start converting over to .NET where they can. But as for which language to go with, I'd guess it depends on the company. Certainly either VB.NET or C# could do the same task in the same time (given the knowledge of the programmer). There really isn't that much different other than the syntax. It's not like comparing VB6 to VC++ 6 for instance. -nerseus
-
Can you post the answer so that others can get some help from it? -nerseus
-
The x file generally just has a filename. If you look in the code generated by the Direct3D wizard, you'll see the code needed to load the textures (plus a whole lot more!). Just create a new DirectX project and choose to add a mesh and you'll get the code. -Ner
-
Well if you're going to distribute an application (or rather, if I as an interviewer were going to receive an application) I would definitely want the source and not the executable. First, I don't know that I'd trust a potential candidate to write clean enough code that I'd want on my machine (or maybe (s)he's just being malicious). Second, I hate installing just to uninstall something a bit later (too much clutter - I'm a neat freak sometimes - more of an issue with COM+ and registry settings). And third, I'd rather see the source so I could see what kind of code you write. The main reason we don't look at source code from prospective employees is that a small program wouldn't show much about what you could do and a large program would be too hard to sift through. Also, there aren't many developers who write large apps by themself and you can't tell from code who coded what. Too often I get resumes with people that claim to know a whole lot but who, in reality, know the average amount but worked with some guy that knows the real stuff. Now if I were interviewing a candidate for a web job, that's different. Then we like to see website's that they've done (if they have them available for public viewing). I've had less than 5 interviews with people that had websites publicly available though - most can't show them because they rely on a database that's currently in use and behind firewalls, etc. -Nerseus
-
If you have Visual Studio and SQL Server 2000 you can setup a DB project and step through the stored procedure. I quickly glanced at your code but it's too difficult to tell what's going on without knowing what the data looks like. Maybe you could try first trimming out the parts you know aren't running (or suspect aren't running), and throwing in some PRINT '1', PRINT '2' type of statements and run the proc in Query Analyzer to see where you're getting. -Ner
-
As I said, for non-game related jobs, I wouldn't expect any code at all. And if I got some, I probably wouldn't spend very long looking at it. The one time I *did* get source code submitted to me it was filled with expletives (F* this and S* that). He was a senior in college and claimed to have written it earlier that year and was quite proud of his liberal use of comments. We didn't hire him. -Nerseus
-
lol - my memory was working after all, sort of (the enablerefrast.reg was what I was thinking of). I've gotten the Software renderer to work (I think). I used the Project Template that came with DX9 (start a new DX9 project, Direct3D, follow the wizard to the end). You can tweak the code they gave to use it, to turn off the hardware support. At least, I think I tried that around 6 months ago and it worked. I guess it's possible that their cards don't support either...? Maybe try to run the code on your machine, but choose the Software renderer over the Hardware one instead of having it pick it only if hardware isn't supported. If you do build from the wizard, look in the D3DEnumeration class that gets added. It's got a TON of code for setting up the device properly. -Ner
-
If you're binding to a combo's dropdown, you have a couple of options. You can basically divide your binding (or just filling) into two basic thoughts - download everything at once, or download on demand. If you download all at once, you could use a DataReader or DataSet but they're going to be about the same in your case since you really need to wait til all the data is read before showing the form. If you download on demand, you'll have to decide when to do it and what you want. For instance, does the user really need to choose from 400,000 records? Or can they enter a character or two (or more) and then filter? A common solution is to check for a pause after a character (or 2 or 3) has been pressed and then load a filtered list to the combo. From my experience, combos are used in two ways. Either they're filled with a few values that the user doesn't want to type (such as a description), or they're filled with some kind of code + description, such as "UD112 - Broken Arm". In the former, there's no problem filling in advance because there will never be much data. In the latter you'll need to find out from the user's what they want. Normally a textbox is fine - they enter "UD112" and tab out. When they leave the textbox you can do a lookup and fill a label with the description "Broken Arm" so that they can verify the right code. If they really need it, you could provide a button to do a popup (search and select type of thing) or a "Fill Dropdown" type of button. Normally on data entry for code-related fields, the users know all the codes they're entering and don't need the dropdown filled at all. Back to your main issue: If you find a DataReader going much faster, you can always populate an ArrayList object and bind a combo to that. -Ner
-
Yep, the GraphicsDeviceInfo object has a DevType property that takes DeviceType.Hardware, DeviceType.Software, or DeviceType.Reference. As for getting the reference driver to work, I remember reading something about the registry but that may not be right - I have a bad memory sometimes, especially when I'm only half listening. I also have Okbutonitis - when I install things and I get a dialog with only an Ok button, I tend to press it before reading the message. I sometimes catch a glance of the text and think (wow, wish I'd read that) - but I'm too lazy to uninstall/reinstall to read it. Did I just say that out loud? :) I remember from DX8 (or DX7 - and *maybe* DX9) that there was a batch file or small EXE in the Samples folder (I think - all very vague right now) that enabled/disabled the use of the reference driver. That may all be made up and related to something else, but it might be a start. And since you're looking and not finding anything, I'm throwing out anything that might help. I just did a quick search on google (with "site:microsoft.com") and didn't find much. But from a few notes here and there, it appears that they consider the reference driver a developer tool mostly. My guess is that it's not currently installed as part of the enduser runtime (which would make sense given your tests). Since there doesn't appear to be any info on installing that driver by itself, you might want to ask this question on the MS forums (msnews.microsoft.com using Outlook Express or your favorite news reader). They are frequented by MS people on occasion so even if no one else can help you, you might still get an answer from the DirectX team. -Ner