ahmedWebDev's Q&A profile
Visual Studio Express Editions More on Random Numbers
Here's a good one for you. I have 5 variables, let's call them 'a', 'b', 'c', 'd', and 'e' Each will be assigned a number RANDOMLY from 0 through 4. However, each will hold a unique value. Only one variable can be 0, only one can be 1, etc. and so-on. How do I do this Thanks Ted The following code will do the trick. Play with it and modify it to you purpose. Its basically taking a value between 1 and 26 and adding 64 to it which will generate ascii code representing A -> Z. Module Module1 Public Const SizeOfNumberArray As Integer = 3 '//Size of array holding random numbers Public Const MaxRandomInteger As Integer = 26 Public Const BaseASCIIValueOffset As Integer ...Show All
SQL Server The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro) after SP1
Having installed SP1, my SSIS packages using the OLE-DB Provider for Visual Foxpro no longer work. Using the latest version obtained from here: http://www.microsoft.com/downloads/details.aspx FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en When attempting to create one SSIS from scratch, the message thrown is: "The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro)." The radio button option of "Copy data from one or more tables or views" and then selecting the "Next >" throw the error. It has to be the SP1 causing the problem because nothing else changed on the Server and everything was working fine prior to this. Microsoft, any feedback on this ...Show All
Visual Studio Express Editions Adobe Reader ActiveX control question
I am using the Adobe ActiveX control on my form to display PDF files in my app. It is working just fine. However, if a PDF file has bookmarks in it, the bookmarks tab of the control opens up. Is there a way to set this so that it doesn't open by default or a way to programatically close it Thanks for any help... Try using the SetPageMode() method. You'll find it documented here... ...Show All
Windows Forms menu item and AddHandler?
Ok, new problem. I can not find where I did this before. Dyamically adding menu items: string sql = "Select * From myTable"; OleDbConnection conn = getDb(); conn.Open(); OleDbCommand myCommand = new OleDbCommand(sql, conn); OleDbDataReader myReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection); while (myReader.Read()) { mnuView.MenuItems.Add(myReader[0].ToString()); } myReader.Close(); I need to add a handler to each menu item for a click event. Check/uncheck and other actions I already have written. It's like right on the tip of my mind, but just can't see it... must be late. Thanks, Zath Excellent! Thanks. I didn't have the Menu ...Show All
Visual Studio 2008 (Pre-release) InlineUIContainers not firing any events in the RichTextBox
Hi, Up until the June CTP, I was able to trap events from elements inside a InlineUIContainer, e.g. // Wherever you create the InlineUIContainer Canvas can = new Canvas(); can.Width = 80.0; can.Height = 20.0; can.Background = Brushes.Blue; can.PrevewMouseMove += ........ InlineUIContainer uiCon = new InlineUIContainer(can); This used to work find as any delegate added to the elements (even though the InlineUIContainer was "Disabled") would fire. Now it doesn't. Can someone please help me Thank you very much, Jaco That is very strange, so is there any reason why the control inside the InlineUIContainer can't be disabled, but still fire events (I know its a b ...Show All
Gadgets Could someone please test my gadget?
Hi, Can someone with Vista please test my gadget I dont have the new OS to test it myself. Please let me know if it works ok. It's a stopwatch and countdown timer. Link to download: http://www.online-stopwatch.com/vist...opwatch.gadget Once you have downloaded the file, you have to rename the extension from ".zip" to ".gadget" Cheers. Fix the background image and its ok, you can see white border around. You can check by your self: http://shrani.si/files/capturesmzb.jpg ...Show All
Visual C++ [MFC] CRichEditCtrl how to set codepage for Unicode?
In MFC, CRichEditCtrl contrl, I want to set the codepage for the control to Unicode. I used the following method to set codepage for it (only for ANSI or BIG5, etc, not unicode). How should I change codepage to Unicode [Step 1] Get the default character format. GetDefaultCharFormat( CHARFORMAT2& _cf ) [Step 2] Modify received character format. [Step 2.1] Modify bCharSet, szFaceName, and dwMask member variables in _cf. For the bCharSet , it should be one of the value of lfCharSet in LOGFONT structure. lfCharSet may be ANSI_CHARSET, CHINESEBIG5_CHARSET, TURKISH_CHARSET, etc. I cannot find a value for Unicode. [Step 3] Set back to RichEdit Control. SetDefaultCharFormat( CHARFORMAT2& _cf ) . ...Show All
Visual Studio 2008 (Pre-release) ListBox/ItemsControl DataTemplate issue
I have a ListBox with a DataTemplate as follows: < ListBox x:Name = " procList " ItemsSource = " {Binding} " > < ListBox.ItemTemplate > < DataTemplate > < TextBlock Margin = " 10 " Text = " {Binding Path=Identifier} " /> </ DataTemplate > </ ListBox.ItemTemplate > </ ListBox > This works fine, i.e. the DataTemplate is applied to my items as expected. However, if I use an ItemsControl instead of the ListBox, i.e.: < ItemsControl x:Name = " procList " ItemsSource = " {Binding} " > < ItemsControl.ItemTemplate > < DataTemplate > < TextBlock Margin = " 10 " Te ...Show All
SQL Server Transact SQL Function
Hi, my name is Manuel...Sorry but I dont't speack english very well. I have a lot of problems with Transact SQL becouse I don't know this language. I need to create a function whitch pass tree parameters: 1. an STR string 2. a char 'x' 3. a int value 'i' This function may add to the left of the STR string a number of 'x' characters up to the 'i' values! For example: PadL(Manuel,'2',10) have to returns 2222Manuel Sorry for my low level of knowledge. Thanks! Use the following funciton.. Create Function PadL(@Value varchar(1000),@Char char,@Len int) returns varchar(1000) as Begin Declare @Result as Varchar(1000); Select @Result = Isnull(Replicate(@Char,@Len-len(@Value)),'') + @Value; Return @Result End go select d ...Show All
SQL Server Default values of columns not transferred in SSIS Transfer Objects Task
I am working on a project that is creating a new application, my area of the project being the migration of data from the old application database, transforming it, and populating the new database. The transformations to the old data are done in a staging database. At the end of the process, the staging database ends up with a lot of new applications tables, populated with the migrated legacy data. We need to move these tables from the staging database to (initially) our test databases, but ultimately what will be the live database. We have tried using the "Transfer SQL Server Objects Task" in SSIS, but have ran into a problem that a lot of the database tables have default values for columns. These default values a ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA help - uni student
Hello everyone, love the new XNA tool they've launched but need some info if anyone can help, you help would be most appreciated. were currently developing a game using the XNA tool Games Studio Express beta version unsing C#, for a game on the PC, but was wondering if there was any code differneces between pc and xbox 360 using XNA, if there are what are they are there any good references site or links on internet that i can read up upon ot find out such graphics interface from pc windows strcuture to an xbox console graphics structure. controller issues from pc keyboard to xbox 360 controller, are there any differences in code, where can i find such informatio on the web. how can i develop g ...Show All
Visual C++ Visual C++ 2003 with Visual Studio 2005 .NET 2.0
Hello! We have a solid C++ code base working with VS 2003 (it's Valve's Source Engine SDK) that we want to hook up with .NET 2.0. The conversion from VC++ 2003 to VC++ 2005 doesn't completely work and the end result is not really usable. We also know that VS 2005 is required for .NET 2.0 and we have no interest of using VS 2003 IDE any more than we have to. We have no need for .NET 1.1 framework either, so it's the differences between native environments for VS 2003 and VS 2005 that are causing us trouble. Is there a way to make VS 2005 use VC++ 2003 environment for its compiling; ie link fluently with the VS 2003 C++ libraries and even be possible to debug against (spawning VS 2003 is acceptable, if we can debug also the .NET ...Show All
Visual FoxPro VFP, .Net, and Wait Window
This question goes out to those VFP developers who have .Net experience. With VFP, when I want to let the user know that something is running, I can issue the command Wait Window "Process is busy doing something important. Please wait..." nowait noclear. When the process finishes, I issue the command Wait clear. This lets the user know that some processing is going on and that they should wait before trying to use the application. I would like to use the same functionality in my C# app, but other than creating my own "Wait" window, I cannot seem to find what I'm looking for. Anyone have some suggestions ...Show All
Visual C# real time use of app.config
I am sorry, can anybody tell me why we are using app.config. Could you please give me a real time excample of its usage I heared if you want to set our code to run in a spcific version of CLR we can configure it in app.config. Can anybody explain these scenario I would greatly appriciate anybody can provide separate answers for all my questions. the configuration file is important in .net framewrok you can use it to control and store many things in your application like in previouse platform we stored this values in registry or in .ini file for example you can store your Connection string in it instead of hardecode it in your application so you can change it in the future iwhith out the need to recompile your appli ...Show All
SQL Server changing a primary key in a replicated table
Hi We have a merge publication - I want to change the primary key for one of the tables (add another column to the primary key) How do I do it Currently there is no data in the table - which I guess might help.. thanks Bruce you can try to run the snapshot agent after change the PK to generate the latest snapshot and reinitialize the subsciption. I'm not sure if it will work. Cheers, Justin ...Show All
