Ron Liu's Q&A profile
Smart Device Development How to Display part of a large Image?
I have a image with 2MB, I only want to get part of the image and display in a picturebox without load the whole file, how to (I'm a Chinese boy, so my Eng is not very well, forgive me) hcaihao@gmail.com Thanks for your reply, I think there is some ambiguous with my express. I mean I want show a rectangle area in a image, such as a quarter. ...Show All
Windows Forms SendKeys.Send("+?") doesnt work ?
Hi, I wrote a transliteration conversion program with Keyboard Hook, works like a charm, except of one thing - combination SendKeys.Send("+ ") doesn't work ("A" here is a russian "A", and "+" means SHIFT). All other letters work fine: SendKeys.Send("+ ") SendKeys.Send("+ ") SendKeys.Send("+ ") ........................ No problem, except SendKeys.Send("+ "). It is the same as SHIFT+SendKeys.Send(" ") - doesnt work either. In two words, I can't print a capital russian A, by pressing SHIFT-a. Any ideas why SendKeys.Send doesn't work with only this letter Do you mean that you can print a capitalized Russian B by SendKeys.Send("+B"), but cannot print a capitalized Russian A in the same way Altoug ...Show All
.NET Development PrintDialog Not displaying in 64 bit
Hello, I have the following code that I'm running without problems on 32 bit, it brings up the print dialog just fine, however on 64 bit it doesn't work, nothing displays; we had the same problem with the crystal viewer and they gave us a hot fix to fix the issue; do I need to write directly to the windows api or create my own print dialog to get around this Is this a known issue, I didn't find anything on it. Using frm As New System.Windows.Forms.PrintDialog frm.Document = mPrintDocument If frm.ShowDialog( Me ) = Windows.Forms.DialogResult.Cancel Then Return End If mPrintDocument.Print() End Using Error handling was removed for clarity... thank you in advance. Phil ...Show All
SQL Server SQL Query to output formatted Excel file
I need to create a query (SQL 2000) that renders a formatted excel (xml or xls) file for each row that is outputted. The details, I have a Campaign table that contains information for Auto and Life "Leads" and the data is submitted by telemarketers directly into the database. I need to render a file for each line, and it would be good if It were an Excel XML or XLS file, because that's what we've been using for a while. Hi Tobi, Have you had a look at FOR XML For example: SELECT * FROM sys.objects FOR XML AUTO. If indeed you wish to create a file automatically for each line then SSIS (DTS in 2000) will be able to do this. Cheers, Rob ...Show All
Visual Studio Team System deploy/schema compare scripts - Option for checking IF EXISTS
My scripts need to check for existence of tables, columns, etc. before creating or altering. My procs and functions need to check existence and drop if they do already exist then create. Is there any way to control script preferences to accomplish this Nope - MSBuild isn't even an option all the time. Some of production environments are self-hosted clients. All their VPN access is different and sometimes I can't access anything in my own domain other than the computer I'm RDCing from. So MSBUILD can't connect to both Target and Source servers at the same time. Additionally, I would never (well maybe after many years of getting comfortable with this new tool) consider using MSBuild to update a product ...Show All
Internet Explorer Development CORRECTION TO PREVIOUS POST - IE 7 opening to Run Once page with error on it.
I downloaded updates last week. I have been using IE7 for a while with no problem. I dwnloaded the updates. Now when I open my browser the page tries to go to http://runonce.msn.com/runonce2.aspx . There is an error reported for this page and it will not open up I get a blue screen. How do I eliminate this I have my home page set in the tools section but when opening it won't go to my home page until I hit the home button on the tool bar. What error is reported for the page Is there a script error Also, could you run Internet Explorer (No Add-ons) from Start->All Programs->Accessories->System Tools and see if the runonce page opens fine ...Show All
Windows Forms Runtime-only properties?
Exactly how do I create a property for a class (specifically an inherited class from Textbox) that is runtime-only i.e. it doesn't show up in the properties grid during design-time Since the get requires use of other runtime-only properties (such as SelectionStart) and really only applies during runtime (it get's the line number that the carret is on) I know there must be some way of doing it. Thanks in advance for any help. Hi By adding the Browsable attaribute with false arguments make a property invisiable to Desginer. private int myVar; [System.ComponentModel. Browsable ( false )] public int MyProperty { get { return myVar; } set { myVar = value ...Show All
Visual C++ unresolved external symbol
I'm coverting a project from VC 7 to Visual Studio 2005 but get the following errors: some.lib(some.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" ( 0Init@ios_base@std@@QAE@XZ) some.lib(some.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::~Init(void)" ( 1Init@ios_base@std@@QAE@XZ) Any hints That's not what the linker log shows, it clearly links to the static libraries (libcmtd.lib and libcpmtd.lib). To link to the DLLs, it needs to process msvcmrtd.lib and msvcprtd.lib. ...Show All
Visual Studio Team System TFS Source Control Restore
Hi, We moved our TFS from one machine, to another machine. We backed all our databases up and restored them on the new Server according to the procedure explained on MSDN. Anyway, I saw all my portal documents and Work Items but when it somes to the files stored in Source Control part, I get TF30059:Web Service Initialization Error and nothing shows up. Is there any missing configuration or restore procedure I have made Hi All, If you are getting login errors, then you may be trying to connect to the wrong database server (the old one) Please check that you ran renamedt correctly (renaming server name in the connection string as noted in the instructions) You can check that it ran correctly by looking at the tbl_databases table i ...Show All
Audio and Video Development How to get the current playback position ?
Hi all, Is anyone know how to get the current playback position Regards, lka In Media Foundation, the current playback position is available from the clock at IMFMediaSession::GetClock(). This clock gives you presentation time. For single-topology playback (like playing a single media file, no sequences or any other IMFMediaSession::SetTopology calls), presentation time is usually going to be the time that an application would want to display in its UI as "current position". To get this right in general (when more than one topology is being played), you need to be aware of the fact that when MF moves from playing topology1 to topology2, the presentation time keeps moving up conti ...Show All
Visual Studio Tools for Office Insert XML to a Rich Text Content Control
I'm able to save the Range.WordOpenXML rich text content to a table in a database. I want to use this content to generate a new rich text content control... I used the following code.. Object theRange= ( object )myRange; Word. ContentControl myCC = Globals .ThisAddIn.Application.ActiveDocument.ContentControls.Add(Word. WdContentControlType .wdContentControlRichText, ref theRange); This works fine...now i want to fill it with some content... I tried two different ways... Mind that documentInhoudDatarow.tblComponentRow.ComponentContent is the stored WordOpenXML.... 1: Directly into the OpenXML..... string oldValue = myCC.Range.WordOpenXML.ToString(); myCC.Range.WordOpenXML.Replace(oldValue,documentInhoudDat ...Show All
Visual Studio Express Editions Using VScrollBar
Hello! I Would like to learn use Vertical ScrollBar. For exemlpe I wont to put many controls on my form, and than "move" this controls with VscrollBar. I can't find any help to this topic! Than You ;) A very simple example which may help. All the code in the form load is just to create the controls. The bit you asked about is all in the Sub VScrollBar1_Scroll Public Class Form1 Dim WithEvents VSB As New VScrollBar Dim Label1 As New Label Dim label2 As New Label Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Controls.Add(VSB) Me.Controls.Add(Label1) Me.Controls.Add(label2) VSB.SetBounds(20, 20, 20, 200) VSB.Value = 50 VSB.Maximum = Me.Height ...Show All
Visual C++ Array Classes
Hi. I was wondering if Visual C++ 6.0 had support for a 2-D Array class. I've found a 1-D class that I could use, but I think a 2-D class would better suit my application. My problem is I have a connection box I want to model. It had 4 columns and 10 rows. Depending on which setup of connection box, 24 of those 40 possible connections will be active. But the kicker is that if a column is active, all rows in it are active, or if the row is active, all cloumns are active. I think it would be easier if I could address each pin by it's row and column address. All the array will hold would be int values. those values would determine the connection type. not-used, used&good, or used& bad. From those 3 choices a loop would run to "dr ...Show All
Visual Studio Team System problem when publishing new workitems from Microsoft Project
Hi! We have a problem when trying to publish work-items from Microsoft Project. The problem seems to have to do with the way TFS handles user names. In our organization the domain accounts have the form "Lastname, Firstname". When I try to create a new Work Item in Microsoft Project, it creates the workitem and assigns it to me, "Doe, John". The problems happens when I try to publish it. Microsoft Project says that the username doesn't exist. It seems to me that the system is interpreting the name "Doe, John" as two users "Doe" and "John". Is this by design This is a major problem for us, since we cannot change the way domain accounts are represented. We are now using local accounts as a ...Show All
Visual Basic Non-WinForm wrapper for VB6 OCX
A while back I successfully built a VB.NET user control as a wrapper for a VB6 OCX. I now have to do the same thing but for a non Win Forms application i.e. a ASP.NET app or a web service. Is it possible to build a .NET assembly that can be called from a formless application (another assembly/ASP.NET/web service) that wraps the VB6 OCX The control itself has no graphical presence only a handful of properties, method and events. Any advice appreciated. (Originally posted in the VB General section yesterday) I've searched all over the net looking for a solution to this - nowhere to be found. I must be stubborn, because I didn't really need to keep trying, but eventually I figured it out - for ...Show All
