Alex Wied's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Alpha blending not working with C# and Managed Direct X 9
Hello, I'm trying to render a 2 triangle strip with alpha transparency. Here is the bitmap loading code, I have tried both methods with no luck: particleTextures[0] = new Texture(device, new Bitmap("alphatest.png"), 0, Pool.Managed); and particleTextures[0] = TextureLoader.FromFile(device, "alphatest.png", 0, 0, 1, 0, Format.A8R8G8B8, Pool.Managed, Filter.None, Filter.None, Color.FromArgb(255, 0, 0, 0).ToArgb()); This is the drawing code: CustomVertex.PositionTextured[] verts = new CustomVertex.PositionTextured[4]; verts[0] = new CustomVertex.PositionTextured(-10.0f, 10.0f, 0, 0.0f, 0.0f); verts[1] = new CustomVertex.PositionTextured(-10.0f, -10.0f, 0, 0, 1.0f); verts[2] = new CustomVertex.PositionTextured(10.0f, 10.0 ...Show All
Visual Studio Express Editions Accessing elements from a different window form
Hey everyone, Just downlaoded C# EE (Express Edition) the other day and ive gone through the 10 hours of Absolute Beginners videos, so i have a decent understanding of C# now and the way Visual CSharp Express Edition 2005 works. My question is this, Say i have a new Windows Form popup as a dialogue box with a single text area known as textBox1, and when someone clicks on the "Add" button it is to add the contents of the textbox onto a RichTextArea known as mainWin in the "main" class. So what im asking is, in the class button click 'contructor' i think its called (when you double click on the button in the designer view) How would i go about accessing main.mainWin (and its set to public) (ps. id LOVE to post source co ...Show All
Visual C# Use function from DLL file
Hi, I'm a beginning C# programmer and I'm writing an earlier written program(c++) in C#. I have a DLL file called K8062D.dll which has following functions: StartDevice Opens the communication link to the K8062 device StopDevice Closes the link to the K8062 device SetChannelCount(Count) Sets the maximum DMX channel in use SetData(Channel, Data) How can I call these functions from C# Best regards, Yannick Michael_Grumbach wrote: Do I just make sure the dll file is in the same directory, or do I put a reference to it in the code somewhere Putting Dll in the same directory as of your application is enough and you dont need to do anything. Best ...Show All
Internet Explorer Development IE7 the culprit? outlook express hotmail problem
I use OE6 to archive my hotmail locally via dial-up until I installed IE7 and then I'm requested to logon when synchronizing my hotmail folders. I have not been able to logon yet and synch my mail. I also have McAfee security running and have disabled it to see if the connection is being firewalled to no avail. I just need to know for sure if hotmail is no longer available to OE users or there is an easy fix to restore what was a very handy facility. Help! Afew minutes after I posted this I found KB907942, an obscure update that Most Magnificent Microsoft has for just this problem. I will repost if it doesn't work. Duh, my bad. KB 904972, it was late after a long day when I posted. My apologies, Hope th ...Show All
Visual Studio Express Editions How to create a shared folder on a file server and assign share level permissions.
Hi, I am very new to VB but I have built an application that needs to create a shared folder on a file server and then set NTFS permissions as well as share level permissions. I have search for hours on how to do this and I have come up empty. I got it to work by running a shell command but I am a little disapointed by the dos pop-up windows that come up. Not to mention I am relying on XCALC.BAT and RMTSHARE.EXE for it to work. If there is no easy way to get VB to do this than can I use some shell command that does not pop-up when it runs that part of the app Any Help would be much apprecitated. In .NET you can set the file or folder attributes and add the accounts you want accessed to that folder. As for making it a physica ...Show All
Windows Forms TreeView Owner Draw problem
I'm trying to draw my own tree views but I get a strange result. My code is essentially private void TVDrawNode( Object sender, DrawTreeNodeEventArgs e) { e.Graphics.DrawImage(e.Node.TreeView.ImageList.Images[e.Node.ImageIndex], e.Bounds.Left + 15 * e.Node.Level + 5, e.Bounds.Top); e.Graphics.DrawString(e.Node.Text, e.Node.TreeView.Font, Brushes .Black, e.Bounds.Left + 15*e.Node.Level + 30, e.Bounds.Top); } and later DirTView.DrawMode = TreeViewDrawMode .OwnerDrawAll; DirTView.DrawNode += new DrawTreeNodeEventHandler (( DrawTreeNodeEventHandler )TVDrawNode); When I run this for the first time I get http://server6.theimagehosting.com/image.php img=TreeView1.gif (except ...Show All
Windows Forms [Reflection] Removing Handlers
Hi, I want to remove all the handlers for my (for example) Checkbox Control, but I dont know the Event Handlers Name's, so I cant' use RemoveHandler Obj.XEvent, AddressOf Me .XEventHandler Any suggestions Thanks in advance Thanks for the answer and for the explanation, it is clearer now !! Before Posting I was convinced too that it was impossible I tried everything and I found many users asking for the same issue with no answer. Thanks again ...Show All
.NET Development Login to a secure site
hello, i want to build a win form application that will log to a secure site. my problem is that the log in of the site require 3 diffrent parameters to connect (2 Diffrent id's and a password)all of them should be sent in POST (i guess). the login URL also uses SSL. what type of classes can be used to be able to login to this kind of site and after that use an HTTP request in it I hope i my question was clear enough Thanks. Hi, You could try the following code and see how you go... It works on most websites (all I've tried except for one, which I'm looking for help with too :) NetworkCredential credentials = new NetworkCredential("my_username","my_password"); ...Show All
Visual Studio 2008 (Pre-release) sending 30 MB from a WCF server to many clients
I need to create a solution for this scenario: A lot of clients all over the world (winforms) should play media files that a server sends them. The server has a playlist of media files for each of those client. Whenever a playlist is changed on the server the client should 'know' about it and download the media files. the size of the files could be around 30 MB. Should I use WCF to send the files to the client or should I use FTP instead What is the diference between WCF and FTP in terms of speed , security and scalability i think u should use windows media service instead of use wcf. The stream media service is better than wcf is at this case. ...Show All
Microsoft ISV Community Center Forums Reversing a lists order in excel for my macro
Hi there. I have a macro that im building within excel, but am stuck on an excel function. Does anyone know how to reverse the order of a list ini excel. I have a column set up of names. How can i select this list and have it reverse the list in a separate column. I dont want it reversed alphabetically, or numerically... my example would be this... Cell A1 - A5 Paul Barry John Steve Jim i would like to either select the 5 cells and have click a button to reverse this order, or have it return the reversed order in column B1 - B5... giving me the result of Jim Steve John Barry Paul The only way ive seen how to do it is with the offset function but ive had alot of trouble with that for some reason and hoped someone had anot ...Show All
Visual C# help with events to make this little code from patterns & practices work
Hi I saw this code in patterns & practices for defining events for business entity: My question is right at the buttom. // Define a common event class for all business entity events public class EntityEventArgs : EventArgs { // Define event members, to provide information about the event } // Define a delegate specifying the signature for business entity-related events public delegate void EntityEventHandler(Object source, EntityEventArgs e); // Define a custom Entity class that raises events when the business entity state changes public class OrderEntity { // Define 'before' and 'after' events for business entity state changes public event EntityEventHandler BeforeChange, AfterChange; // Private field ...Show All
Visual C# Finding a process name from an address.
If i have a string that contains an address to a program, or other file, how can i remove the address up until the point of the file I've tried using the substring method, but that only works up to a point. I can remove the drive letter and semicolon, but then it doesn't remove the backwards slash. So far i have: private void buttonLoad_Click(object sender, EventArgs e) { string processName = label3.Text; // label that stores the application path. int index = processName.IndexOf(@"\"); int length = ( processName.Length - 2 ); MessageBox.Show("Index " + index +", Length " + length + Environment.NewLine + processName.Substring(index, length)); processName = processName.Su ...Show All
Visual Studio 2008 (Pre-release) debug.assert didn't work in debug mode.
Hi, I am working on a wpf project and debug.assert won't pop up the message box when the condtion is false. public class MainApp { static string KioskName = "Kiosk" ; [ STAThread ] static int Main( string [] args) { D ebug .Assert( false , "test" ); => this won't stop if I run in debug mode (using F5). ... } I guess this might have something to do with my project set up but I can not figure out why. (If I create a new wpf project, debug.assert works fine) Please help since debug.assert really helps during development. thanks/chong Thanks for the suggestion but I have "DEFINE DEBUG CONSTAND" defined in the " ...Show All
Windows Forms DataGrid Expand problem
Hi, I have written a small application which displays the related database tables in the datagrid control. I have a button on the Form which has the following code in its click event : private void expand_Click(object sender, System.EventArgs e) { if(dataGrid1.IsExpanded(0)) dataGrid1.Collapse(0); else dataGrid1.Expand(0); } My datagrid has to tables Customer and Orders. When I follow the following steps and click on the expand button, I don't see the orders table link. 1) Expand the second row of the customers table. 2) Click on the link for the expanded row. It will display the chid records. 3) Click on the back button. 4) Click the expand button on the Form. Now instead of orders link I see the name of t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Multiple Cores, etc... on the 360
Hello everyone, Like practically everyone here, I'm truly excited about the idea of being able to run my own games on the 360! I've long been interested in the concept of running my own code on a console and it's always annoyed me that systems needed to be locked down so heavily because of the pirates who spoil the fun for all of us. So I just want to say thanks to Microsoft for giving us hobbyist/one-guy game developers the chance to develop for the console like this! It's like my prayers have been answered! Now for a couple of questions: 1) I'm just wondering how the multiple cores in the 360 will work Will the managed code automatically utilize all three (well, in effect, six) cores or w ...Show All
