Stéphane Beauchemin's Q&A profile
Visual Basic Adding Leading Zeros to String
I have written the following function to add leading zero to a string, my question is there a simple way to do this Can you use the string.format Private Function FixLength( ByVal String1 As String , ByVal length As Integer ) As String 'check that string is not already the correct length If String1.Length <> length Then Dim output As String = String1 For bitcounter As Integer = 1 To length - String1.Length output = "0" & output Next Return output Else 'if the string is already the correct length then return it Return String1 End If End Function When you originally convert a number to a string, you can use String.Format to add leading zer ...Show All
Smart Device Development Any class can act like java.lang.Class ?
I need a class that act like java class (java.lang.Class) to create an object that created from class name. Example I define a config file for my application and defined a element that processed by custom class, in java.lang.Class we can use Class.forName("class_name") then we got a object that type is "class_name". And I know that Windows Mobile can not act like desktop Windows (not all method supported, this make me in doubt to reference the vjscor.dll, in vjscor.dll contain the java.lang.Class class), so any class/method can act like java.lang.Class (forName method). Thanks for any reply. How about .NET type like System.Threading.Thread can it automatically created even we didn't kno ...Show All
Visual C++ when I upgrading a project from vc6.0 to vc2005 ,I wonder if it is necessnary for me to add reference of those dlls to the proje
In vc2005, when using a dll or a lib in a project ,it is necessnary to add reference of that dll to the project.But when I upgrading a project from vc6.0 to vc2005 ,in the additional dependency of general option of linker of configration property, I can see all the dll and lib files.In the situation, I wonder if it is necessnary for me to add reference of those dlls to the project ,or just keep the project setting no changing I appreciate your help. A project that does not target the CLR. The terms: "managed" - targets the CLR "native" - does not target the CLR are used quite often when talking about different kinds of Visual C++ applications. ...Show All
Visual Studio Need help making Crystal Report group on Criteria for one field mutliple times.
I'm try to create a report will group one date field several times based on criteria. First group I'm making is a grouping by Client #, second grouping I need to have it give me a count of the date field only if the date is between the current date and 10 days ago. Then the next field I need it to give me the count of the date field if it contains a date more than 10 days ago and less than 20 days ago, and so on till I get to 100 days. I just cant figure out how to get my report to give me the count for that specific client #. Below is how I picture it looking like... Client 0-10 10-20 20-30 30-40 05INS 100 2 11 15 99REC 44 33 22 12 08RET 22 11 11 66 And so on, ...Show All
SQL Server How to remove Projects and reports from web browser
I am creating, building, and deploying reports via a web browser interface in SQL 2005 Visual Studio. There are a few projects that I no longer want the masses to see when the go to \\servername\reportserver . I have deleted all files associated with the projects and reports, and removed them from within the report server, but when I open the web browser I can still see the old projects and open the reports. Where is the browser getting this information even though the data doesn't even exist as far as i can tell, and how to I actually delete those entries that i no longer want seen. I have heard that I can go the actual web page itself, and delete the items using "show details", but I am unfamiliar with where exactly that ...Show All
SQL Server SQLEXPRESS instance on SQL SErver 2005 standard edition
What happens when you install a SQLEXPRESS instance on a machine that already has SQL Server 2005 Will the SQLEXPRESS still run in the limited mode or will it sense that an full standard version of SQL Server 2005 is already present and just "upgrade" itself On the otherhand, how do I "upgade" an existing instance of SQLEXPRESS to a full version of SQL Server 2005 standard edition without uninstalling and installing the standard edition. If I have both the instances then will the SQLEXPRESS be freed from its limits Thanks, Vikram I've got a question related to this topic. I've got one box that had a trial version of SQL Server 2k5 Standard on it and found out that the software ...Show All
Visual Studio Express Editions How do you propagate a SQL Sever schema change to an existing VB 2005 project
I am working with VB 2005 Express and SQL Server Express. I have an app up and working well based on the current SQL database schema. How can I change the database schema (add a table, change the data type on a column, etc.) and propagate this change into an existing VB 2005 application. I tried this once by trying to reconfigure the database via the Wizard and lost all of the previous customization of the database (queries, fills, etc.) in the VB application. (I resorted to a backup copy.) Squire, Thanks for your reply. Let me provide 2 simple examples: 1: Change the data type of a field from varchar(5) to bit. 2: Add a new field to an existing table on the server. I tried doing the first example - change a varchar ...Show All
Visual Studio Tools for Office using VSTO w/ ASP.Net 2.0
Hi, Newbie using VSTO and developing office applications. The task is to import and export data from and to database, but user can select from a list columns what they want to add, there will be a dialog will appear and allow user to select data to be included in a word document, how can this be done I installed PIA, VSTO2005SE w/ runtime, MS Office 2003 Web Components and will use MS Office 2003 (ver 11.0.7969.0) with ASP.Net 2.0. I tried some links and cannot find Actions Pane Control. What Am I missing Can anyone point me to some sample codes or resources to do this Thanks in advanced. den2005 The updates that caused problems in the spring were all Office updates. Everything should b ...Show All
Smart Device Development Attach Windows CE 5.0 emulator to Visual Studio 2005
Hi, I would like if someone could help me out on this. I installed the Windows CE 5.0 emulator on my machine. But It is not recognised by the device emulator manager. So i cannot directly debug or run from Visual Studio. Is there a way to add this emulator to the Device emulator manager so that i can directly run my applications from Visual Studio 2005. Barry For those of us on Win2k3, PB which is needed for the 'rolling' process, will not install. Is there a way around this Thanks very much in advance. ...Show All
Visual C# Assign a bmp resource to a bitmap variable
I create a resource bitmap as bmp. I can not assign this resource bmp to a Bitmap variable. What I would like to do is change or swap between two bmps every second in a picturebox image. thanks in advance for your help and time, Edward remember that the filename IS case sensitive so watch out for that. you can also try to use Application.Name as suggested earlier to make sure that the product name is correct and in the correct. ...Show All
Silverlight (formerly WPF/E) Inline XAML
Been trying to follow the CTP SDK documents I can't seem to get "inline" XAML going in a HTML page e.g. have the XAML tags in a HTML page and not in a seperate .xaml source file. Anyone have better luck or have a simple example cheers Yes that is the one. Tried to follow the section on "Creating Inline XAML Using the SourceElement Property" cheers ...Show All
Visual C# Doubt in Switch-Case statement.
Hi, I have a basic doubt in using a switch case. For the case stmt am unable to have a static or readonly value. The compiler gives a error "A constant value is expected". i.e, if i have a variable like - private static myval = "R1"; -- switch { case classname.myval: // gives compiler error } Would be much happy to know the logic behind this. Thanks. >> i.e, if i have a variable like - private static myval = "R1"; Note that if you make it private static const string myval = "R1"; it should be OK. ...Show All
SQL Server Update Datetime
Question How can one update a DateTime field when the change request may alter any of the attributes of the time (Day | hour | hour & minute). WHY Of course the whole point of a timestamp is to stamp the time of the record. The problem comes in when the user wants to tweak that timestamp. I am not interested changing anything about the time at the seconds point. The user will only change major time factors. Platform .Net 1x C# SQL Server 2000 Eventually this will be in a Stored Procedure. advTHANKSance > Can you explain how you will pass the change units From the example you provided, I would surmise that it would be best to pass in each change item in individually to the stored Procedure. Then it would be up to t ...Show All
Visual Studio Express Editions Manually Locating a Form in Minimized State with Form.ShowInTaskbar=False
I need Help . . . in VB.NET 2005: You know, I have a button in Form1 and when pressed the Form2 will be shown. The Form2.ShowInTaskbar Property is Set to False , So when the Form2.WindowState is minimized (as I pressed the minimized box) I just want to Locate Form2 in minimized State Manually by Code. Please help me , I need this code very much I have a button in Form1 and when pressed the Form2 will be shown. The Form2.ShowInTaskbar Property is Set to False , So when the Form2.WindowState is minimized (as I pressed the minimized box) I will see Form2`s title bar in the Button-Left of my monitor ( only when the Form2.ShowInTaskbar Property is Set to False) So ...Show All
.NET Development Iframe templates
I am using Microsoft EW, I am using a template that is iframe, my APS.Net Contols all state that Contols in this category require the Microsoft .Net framework 2.0, I checked in add/remove programs and I have it installed 89.47mb, I get the message on a form section, I have posted the question on EW forum but not help yet. Can anyone help please!!!! Debra **do i need to change a html page to a dwt page to make these controls work ...Show All
