Jim_Fort_Worth's Q&A profile
Windows Live Developer Forums Order update issue
Hello adCenter team, Here is the problem we just encountered today: We want to update the names of some orders, but it doesn't seem to be as easy as calling the updateOrders method. First of all, it seems that adCenter does not support partial updates (at least not for orders!). We have to fill up almost all the fields in the AdCenterOrder even if we wanted to modify only the name of the order. In particular, we have to provide a new starting date for the order. But, if we do this and the order belongs to an active campaign, we get error -100837 ("Can not update the alive Order" - "The start date or budget type of an order cannot be changed once it has gone live."). Pausing the order and t ...Show All
.NET Development How to pass binary data from C++ dll to a C# application via Interop?
Hi, I have a slight problem with passing binary data from a C++ dll to a C# application and I hope someone over here is able to give me some guidance. Some background info: I have a C++ dll that extracts a char* of binary data containing an image, e.g. JPG, GIF. If the output is written from the C++ dll as shown below, it works. The jpeg file is output correctly. FILE* pJPGFile = fopen("E:\\test.jpg","wb"); fwrite(myBinaryData,1,size_h,pJPGFile); fclose(pJPGFile); However, when I tried to "send" this block of data to a C# application, the byte array (the datatype I'm using on the C# end) doesn't have the complete data. _declspec(dllexport) bool GetImageInfo( BYTE* imageData ) { //..some processing imageDat ...Show All
Visual C# C#: Launch URL from inside a windows application
Hi, I am new to C#, and was wondering if someone could provide sample code for launching a default website from within a windows form I have a userform with various buttons. I would like to click on a button and then launch the desired intranet website. I poked around the web and this is what I have found:- Private void button8_Click( object sender, EventArgs e) { string targetURL = @http: //www.duncanmackenzie.net; System.Diagnostics. Process .Start(targetURL); } Any help is much appreciated. Yes that should work for you. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using ...Show All
SharePoint Products and Technologies No support for Code Behind files
This has been posted in other non-MSDN forums (as far as I am aware) so I will add it here in the hope of getting some answers. I have been evaluating SharePoint Portal 2007 and in particular its support for ASP.NET pages. What I found is that while adding custom C# code to an aspx file to handle an event such as a button click within the <script runat="server"> tag is okay, you cannot abstract this out to a Code Behind file. I tried using the "CodeFile" attribute and was presented with the "The codefile attribute on the page directive is not allowed in this page" error. This seems to me to be an odd emission, reading the marketing material I was convinced that it had full support for ASP.NE ...Show All
SQL Server Access denied to file for RESTORE
I'm running the isqlw.exe command from a console app. The output log file is telling me access is denied to my My Documents folder (where the .bak file is) to do the restore. It keeps erroring and teminating the RESTORE command. It's not read only or anything (not that I'd think that would necessarily affect it) and I don't know why it would throw an OS access denied error on any part of my computer for me since I'm logged into the computer as an admin and I'm using the sa login info in the isqlw command. Restore and Backup commands refer to the local file system of the server, so when specifying the path to the backup file you have to keep in mind that its the SQL Server file storage you are using. If that ...Show All
.NET Development StringBuilder(string) constructor bug or undoc behavior
If you attempt to create a new StringBuilder by initializing from a string that contains a null character, only characters just before the null are copied into the StringBuilder. Since both StringBuilder and string support embedded null characters, and the documentation doesn't mention this, I expected the full string to be copied in. It doesn't seem reasonable to have to write a loop to append the characters from the string into the StringBuilder. The full string *is* copied. It is just hard to see because Windows is still a zero-terminated string operating system. This is true both for output and for the debugger. The latter being a bit of a bug in my book. This code Dim s As String = "Hello" + Chr(0) + " ...Show All
Visual Studio Reportviewer
How do you change the style of a textbox field using conditional formatting when in local mode no server. When I use =IIF(Fields!price.value < 200, "Red", "Black") all I get is the word Red in the field. I want the field to change to Red. else can I use the name of the textbox to change the foreground color to color.red ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream Although I’m a huge C++ fan but.. XNA will be using C#, DirectX is now shipped with many samples tutorials for managed frame work, and the bench mark between C++VS C# graphic applications isn’t noticeable even sometimes its better on C# with all that I guess its time to migrate from C++ to C#... ...Show All
Visual C# Spell Checker using word.
I came across this code on the net and was wondering if anyone could help me tweak this to search more than just one textbox. Thanks protected void Button1_Click( object sender, EventArgs e) { Word. Application app = new Word. Application (); app.Visible = false ; object template = Missing .Value; object newTemplate = Missing .Value; object documentType = Missing .Value; object visible = true ; object optional = Missing .Value; object saveChanges = false ; object originalFormat = Missing .Value; object routeDocument = Missing .Value; Word. _Document doc1 = app.Documents.Add( ref template, ref newTemplate, ref documentType, ref visible); doc1.Words.Firs ...Show All
Visual C# DateTime formatting in 2005
Having converted a medium to large website from .NET 1.1 to 2.0, I found that some machines displayed datetimes in en-GB format while one in particular (running under server 2003) displayed datetimes in en-US format. The code was identical as were the regional settings. I discovered that IIS on this machine had the default web-site still pointing to 1.1 (the virtual website for my system was set to run under version 2). When I pointed the default website to version 2 and pressed the Edit Global Configuration button and selected the Application tab, I found that the culture was set to af-ZA. I set this to en-GB and restarted IIS. Lo and behold, the datetimes were displayed properly. I then pointed the default website back to version 1.1 ...Show All
Visual Studio Express Editions How do I set the fontsize and color of body text using mailto:?
-Visual Basic 2005 Express- I've searched the internet and forums for 2 hours looking for a way to 'programmatically' change an emails font and color in the body. I haven't found anything on either of these. The following code is what I have so far. It works fine but I'd like to change the font size and color. There must be a way... Process.Start( "mailto:" & clemail.Trim & " SUBJECT=Notification%20of%20payment%20recieved&BODY=Payment%20recieved%20" & temp2 & "%0D%0ADate:%20" & Date .Today & "%0D%0A%0D%0AThank%20you%20for%20your%20payment.%0D%0A%0D%0APlease%20retain%20this%20receipt%20for%20your%20records." ) clemail is the customers email address. Any ...Show All
Visual C++ strange error :-S
BITMAP HdcToBitmap(HDC hdcNeedle, int needleWidth, int needleHeight) { HDC memDC_Needle = CreateCompatibleDC(hdcNeedle); HBITMAP memBM_Needle = CreateCompatibleBitmap(hdcNeedle, needleWidth, needleHeight); SelectObject(memDC_Needle, memBM_Needle); BitBlt(memDC_Needle, 0, 0, needleWidth, needleHeight, hdcNeedle, 0, 0, SRCCOPY); BITMAP bmpNeedle; GetObject(memBM_Needle, sizeof(BITMAP), &bmpNeedle); return bmpNeedle; } There are some questions that remain - where are you getting these APIs from What sort of project did you create What IDE are you using As nobugz said, the errors you're getting make no sense, they appear to be errors in the calling convention of the APIs. ...Show All
Visual C++ Reinstalling VC++ 2005 - New machine
Hi, This week, I acquired a new computer. Before I erase former computer, I installed and configured my development environment. No problems except when I tried to install and configure Visual Studio 2005. Everything went OK except the fact that after successfully compiling a sample C++ application, I cannot run it... I even tried to run a few C++ applications (.exe) I made in the past (out of VC++ 2005 environment on former computer), directly from Windows explorer, and I cannot run them either... Seems something is missing... I compared programs installed between my former machine and my new machine and the only difference I could see  ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Packaging assets
I haven't got into using XNA as of yet, however I very much like the idea to play my games on the Xbox360 (blah blah blah). I see that the XNA team has put large amounts of effort into some asset management in XNA, that includes the XACT audio cues for like "make it possible to change the sound triggered by some event without doing it in the programming". I'm fairly deep into the process of making my customized packaging format with the goal to essentially archive anything (textures, sounds etc) into a single or more packages. There are several reasons, one of them because I started before the XNA project was convened, and to ease distributions on levels and mods by packing several files, textures, sounds, scripts in a single package file. ...Show All
Visual Basic How do i fix to make this code work properly?
This is my mainform's code This is my main form's code Imports System.Runtime.InteropServices Imports System.Text.RegularExpressions Imports System.Threading Public Class Form1 Public Delegate Sub _idDelegate( ByVal found As String ) Public Delegate Sub _postDelegate( ByVal html As String ) Public Delegate Sub _linkDelegate( ByVal link As String ) Public _onID As New _idDelegate( AddressOf ID) Public _onPost As New _postDelegate( AddressOf Post) Public _onLink As New _linkDelegate( AddressOf Link) Private Sub link( ByVal link As String ) End Sub Private Sub Post( ByVal html As String ) End Sub ...Show All
