XNA Rockstar's Q&A profile
Visual C++ Is there a way to create a dll in C++ without a def file and have it work for a Visual Basic Host?
Is there a way to create a dll in C++ without a def file and have it work for a Visual Basic Host Yes, I apologise. I am new to this website. I didn't know it mattered so much. It seemed like either the activity had died down on the other threads, or I had perhaps prematurely indicated that a previous reply was an answer. I will check myself in the future. In regard to the def file. Earlier in the process of learning how to make a dll, I got one working using a method that required a seperate file to be compiled along with every program that uses the dll, if I remember correctly. I can't remember what the method was called. If I dig deep enough in my notes I might be able to find it, but perhaps this is unnecessary. My boss sa ...Show All
Visual C# Anyway to know if the program is running under VS IDE ?
I would like to do conditional compilation based on whether the program is running under IDE, is this possible Thanks. ahkow wrote: Thank you for your reply. I am developing a in-house project, I would like the staff to test the debug version, not the release version, I figure that I will have more information if bugs are encountered in debug version. And I don't have to keep switching compilation configuration. My program requires user to login at startup. When I am developing (running under IDE), I want to skip the login prompt. When the staff is running the debug version (not under the IDE), they will have to login. Thanks. I would suggest creating a new configuratio ...Show All
Visual FoxPro Passing multiple variables from forms w/ VFP7SP1
I'm an old Clipper (S' 87) programmer that needs to figure out forms with VFP. The attached code generates a form containing a set of four optiongroups that set basic comm port parameters on the local host for serial communication with an instrument (usually an electronic balance). I'm trying to use the form to replace a series of cascading menus in the original program. My intent is for the form to recognize the 5 existing parameters in the main prg, permit user input and then pass any changes back to the calling procedure or function using a array embedded in the form when the user clicks [OK]. Clicking [Cancel] should leave the parameters unchanged. Can somebody please suggest a technique for passing multiple variables back and forth be ...Show All
Visual C++ Native object needs to keep reference to ref class object
I am new to C++/CLI but I have experience in C++ and C#. I have native C++ that needs to notify a CLI object when its state changes. The CLI object is instantiated/owned by a C# client app. I am trying to use gcroot to hold a reference to an existing CLI ref class object in a member of a native class. I've tried all sorts of variations on gcroot. None of the online examples I've seen show how to assign a reference to an already-instantiated object to gcroot. All my tries result in the same compiler error inside of vcclr.h: 'cli::interior_ptr<Type>': managed type or function cannot be used in an unmanaged function I'm stuck and I have no idea what to do next. I don't even know if what I'm trying to do is possible. The c ...Show All
Visual Studio Tools for Office Need help with programming with outlook 2003
I am using VC++/CLI and I am trying to create an outlook object to connect to outlook and create appointments. Outlook::Application ^outlookApp = gcnew Outlook::Application(); Outlook::AppointmentItem ^oAppointment = gcnew Outlook::AppointmentItem(); The second line gives me the error: Error 1 error C3767: 'Microsoft::Office::Interop::Outlook::AppointmentItemClass::AppointmentItemClass': candidate function(s) not accessible If i try this: Outlook::AppointmentItem ^oAppointment = outlookApp->CreateItem(Outlook::OlItemType::olAppointmentItem); I the the error: Error 1 error C2440: 'initializing' : cannot convert from 'System::Object ^' to 'Microsoft::Office::Interop::Outlook::AppointmentItemClass ^' ...Show All
Software Development for Windows Vista CallExternalMethod in Code-Only and Code-Beside Workflows
I have created two identical workflows that use a CallExternalMethod activity. I'm using .NET 3.0. One workflow is code-only and the other is code-beside. When I configure the CallExternalMethod activity, I see that the Data field in the Properties pane works differently for the two workflows. On the code-only workflow I can specify a member of my workflow class as the data to be passed. I see "Name" and "Path" sub-fields in the Properties pane. On the code-beside workflow I cannot seem to specify a member of my workflow class as the Data to be sent. Also, I do not see the Name and Path sub-fields in the Properties pane. I have checked the help and searched the forums and I can't find any documentation fo ...Show All
Windows Forms LinkLabel - AutoEllipsis on and automatic tooltip
I wanted someone to confirm this for me before I go nuts. If I put a LinkLabel on a standard form, set AutoEllipsis to true and AutoSize to false and make the Text of the LinkLabel larger than the supplied region, the text is shown with an ellipsis and a tooltip will automatically appear with the entire text when the pointer is over the control. If I do the same on a UserControl instead of a standard form, the tooltip does not automatically appear when the text is too large. Is this by design I'm assuming that the standard form might be supplying addional services to the LinkLabel control. I wouldn't be so up in arms about this but, I have LinkLabels in UserControls and they do not automatically tooltip so I have to figure ou ...Show All
Visual C# Generics Problem
Hi, I am having a problem with overloading generics. I cannot do this: Usually in C++ I do this, thi s in the hdVector3D class: operator T*() { return &m_p[0]; } Where: private: T m_p[3]; Where T is the template.So in my main C++ program I do this: hduVector3D<double> position; hdGetDoublev(HD_CURRENT_POSITION, position); Where the type of hdGetDoublev is: hdGetDoublev(unsigned int pname, double * params); So what I have done above is that whenever I do hduVector3D<double> position, I can place it inside the double * params. I wish to do the same within C#. I have done my C# interop and it accepts this: [DllImport("hd", EntryPoint = "#10")] public static extern void hdGetDoublev(uint pname, Do ...Show All
Visual Basic writing ANSII/ASCII characters using streams
Ok so I have some text boxes that have some text in them, I think I know how to convert them to ascii chars by converting them to uni bytes then to ansii/ascii bytes then to ansii char arrays but just in case I have it wrong, and I still am having issues writing them to a data/text file, how do I do this and write them to a file Yep, that was it. Don't use writeline methods. Use Write(someString + Chr(13)) since chr(13) is the ascii representation of a line feed or carriage return. ...Show All
.NET Development Difference CreateGraphics, FromHdc, FromWnd
Hi, I'm a newbie when it comes to working with GDI+ and I'm stuck on how I've to create my graphics object. So far as I know, there are 3 methods (this.CreateGraphics(),Graphics.FromHdc, Graphics.FromHwnd). But can somebody tell me what the difference is between these methods and when to use which method thx in advance. Frederik nobugz, I 'm trying to create a custom datetimepicker where you can change the backcolor. I had some problems to do that so I browsed the internet and found following sample: public class CustomDateTimePicker :System.Windows.Forms.DateTimePicker { protected override void WndProc(ref Message m) { if (m.Msg == (int) 0x0014 )// WM_ERASEBKGND { using(Graphics g = Graphic ...Show All
Visual Studio 2008 (Pre-release) How to start ? Where to start?
Hi all, .Net 3.0 RC1 is out and i was curious on how to start learning the new technologies such as avalon. So downloaded .net 3.0 RC1 and the Windows SDK corresponding to the release (still dowloading it .. it's HUGE .... :S. IS that all i have to do is there anything else i have to install anything for visual studio 2005 I've seen somewhere ... Visual Studio 2005 Extensions ..... do i need that Do i need anything else Thanks for the help! If you can't wait several more days, I think you can install Orcas June CTP like that: msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1 ...Show All
Visual Basic reading binary data from varbinary(max)
I used to do this with an Image data type (sql2000) and an array of bytes. Worked great. Now , in sql2005/vb2005 we are supposed to use the varBinary(max) type . Fine. Anyone know how to get it to work the reader code is straight from the help docs in the section: "Working with large value types" I'm trying to use some of the new functionality but I can't get anything to work well yet with this datatype. Error is on this line at design time: Dim binaryData() As Byte = CByte(reader.GetValue(8)) .....This is supposed to read the 9th column into an array of bytes..... "***value of type Byte cannot be converted to 1-dimensional array of byte***" Here's the code: blob is a varBinary(max) column Private Sub GetImageF ...Show All
Visual C++ Interaction with an application running in CMD
Hi all, I have written code for an appliation which needs to interact with another application which runs in CMD. I want to receive all the information produced by the application running in CMD so that I can manipulate them and at the same time I should be able to provide input to that application. Please suggest me somehting regarding this. Thanks, From application B's perspective, it is getting its input via stdin, as if the user were typing it via the command line. Application B still writes to stdout, and application A can read it from the other end of the pipe, also a file descriptor. I think I got this idea. And the way you have mentioned it, it's exactly the same thing I want to do. I will try this example for my purpose ...Show All
Visual Studio Tools for Office primary interop assemblies
Hello, I hope that I'm posting this in the correct forum.... I'm creating a c# windows app where at some point, it exports data to an excel document, so I have the Microsoft Excel 9.0 Object Library and the Microsoft Office 9.0 Object Library referenced in my project. I have Office 2000 installed on my dev machine. I tried installing my app on another, non-dev machine also using Office 2000, and I got this error when trying to install it: "Unable to install or run the application. The application requires that assembly Microsoft.Vbe.Interop Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator." Now I'm confused because, isn't version 11.0 for Office 2003, which neither o ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Deciding where to land the main window when it's constructed
I have two monitors, one 19" CRT (main) at the right, and a 26" LCD at its left. So far, the XNA examples (the packaged one and some from people) have a tendency of making this window lie on both monitors. There's about 100 pixels laying on my left screen and the rest in the right screen. This makes it the program run VERY choppily, until I move the window fully into only one monitor. Also, while I'm accomplishing this moving task, the mouse cursor refreshes in windows about once per second, increasing the difficulty of that small task. I've tried doing: graphics.GraphicsDevice.Viewport.X = 10; graphics.GraphicsDevice.Viewport.Y = 10; but it doesn't appear as if I can. Not to hijack this thread ...Show All
