Software Development Network Logo
  • Visual C#
  • .NET Development
  • Visual Studio
  • Game Technologies
  • Microsoft ISV
  • Audio and Video
  • VS Team System
  • SharePoint Products
  • Windows Vista
  • SQL Server
  • Visual C++
  • Smart Devicet
  • Windows Forms
  • IE Development
  • Visual Basic

Software Development Network >> TheMaj0r's Q&A profile

TheMaj0r

Member List

ReneeC
T.Vargek
Al Harlow
Dean Johnson - MSFT
Chris Holland
steveareno
Jason D. Camp
Scott Allison
CodeSweatAndBeers
Oligarchy
Omar Fawzi
xplosiv_1
sqlguy12
Deepa7476
stombiztalker
Lars E.Nes
Jaime Stuardo
CPS
Mat_77
Jain1122
Only Title

TheMaj0r's Q&A profile

  • Visual C# Rendering UserControls at runtime

    Hi, This is probably a simple issue but I can't work out how best to solve this. I have made a simple user control - I need to draw one of these user controls on the page for each item selected from a database. I have written the code, and the correct HTML is generated. However, the controls aren't rendered on screen. I think this is because the valid is generated at runtime which then doesn't allow it to be rendered as a user control at runtime - it's just treated as incorrect HTML. Code to Generate the UserControls. [code] DataTable dtGroupAccess = (DataTable)sp_procs.GetGroupPermissions(group_key,dbConn.c); this.sPermissions=""; foreach(DataRow row in dtGroupAccess.Rows) { this.sPermissions += &quo ...Show All

  • .NET Development Connecting to SQL Database using Enterprise Library's Data Access block

    Hello, I am creating a windows forms application in C# and I'm trying to connect to my SQL database using Enterprise Library's Data Access application block using the following code (btw, I'm sort of new to these forums and wasn't sure if there's specific way to mark code in a post, so i just changed the font and color): ConnectionStringSettings s = ConfigurationManager.ConnectionStrings["myConnString"]; Database DB = DatabaseFactory.CreateDatabase(s.ConnectionString); So I've created an App.config file defining my connection string, as seen below: < xml version="1.0" encoding="utf-8" > <configuration> <configSections> <section name="dataConfiguration" type="Mic ...Show All

  • Visual Basic ??? :( Loading into & Saving Text File from RichTextBox ): ???

    For the project of compiler, i already have the rows & cols sloutons from these forums, thanks every one for that specally dman1 now for the phase of Lexical Analysis, i have to generate tokens, i m using vb.net, i have made a listbox that holds all possible KEYWORDS alowed in the grammer, i match every seperate WORD with all itmes of that list now the problem is all KEYWORDS found should be displayed & saved in a text file, i want to know how can we save the text in the richtextbox control in a text file, & how can we load it back see simply loading text file into & Saving Text File from RichTextBox Also if someone can tell if we want to check the character we are reading from the rich text box, ...Show All

  • SQL Server How we add date to backup file

    HI, here is our backup command and i like to add date in the backup file name. So daily it add date to the backup file name. Can any one let me know how I can do that. C:\BAK\acct_backup_%date .bak BACKUP DATABASE [acct] TO DISK = N'C:\BAK\acct_backup.bak' WITH NOFORMAT, INIT, NAME = N'acct-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO This should do. declare @f sysname set @f=N'C:\BAK\acct_backup_'+convert(nvarchar,getdate(),112)+N'.bak' BACKUP DATABASE [acct] TO DISK =@f WITH NOFORMAT, INIT, NAME = N'acct-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO ...Show All

  • Visual Studio Tools for Office Event Handlers not working

    I'm trying to attach a simple event handler to a CommandBarButton and it' when I run my example the event is never triggered. Is there something I need to do outside of assigning a Click event handler The most common reason for this is that you've not declared the button object variable at the class level, so it goes out of scope and is eventually garbage collected. If that's not the problem in your case, you need to provide more information. 1. Type of project: VSTO, WinForms, Addin 2. Show the code you use for instantiating and creating the button 3. With which Office application (including version) are you working ...Show All

  • Visual C++ CFile Data Removal probs

    Is There any short way to remove some lines from a file say there is a file called Hello.dat contains 5000 lines 1) In that i just want read first 200 lines 2) Preform some operation 3) remove them i.e. 200 lines if the operation is successful //This is the problem i.e. the third task Some efficient was i.e. without creating another file i.e. new file Sarguna Unfortunately, it seems the Operating System does not allow shortening of a file by removing data at the beginning. It only allows truncation of the tail. Therefore I think it is not possible to solve your problem without read and write operations (on the same or two files). But I would consider the following approach. The first value of your file should be reserved: i ...Show All

  • .NET Development Any performance gain by compiling to x64 instead of Any CPU?

    Forgive me if this has been answered already, but it seems like most of the posts and information I look at never give a clear answer to this question. We have a C# .Net 2.0 application, and are looking to move it onto 64 bit hardware. There are options to compile it in a CPU agnostic form (platform target = Any CPU) or specifically for x64 hardware (platform target = x64). Is there any performance benefit in specifically targetting the x64 platform Or should we stick with Any CPU. Additionally, are there any concerns about cross-compiling on a 32 bit machine build box From what I can tell, there shouldn't be any issues compiling on a 32 bit machine using the standard 32 bit .Net 2.0 Framework. Generall ...Show All

  • Visual C++ g++ and cl.exe - same source, but different behaviour

    Hi,, I've a big problem with this code: #include <stdio.h> #ifndef __GNUC__ # define __PRETTY_FUNCTION__ __FUNCTION__ #endif class RecurrenceRule { public: class Observer { public: Observer() {fprintf(stderr, "A - %s\n", __PRETTY_FUNCTION__);} }; RecurrenceRule(){fprintf(stderr, "B - %s\n", __PRETTY_FUNCTION__);} void addObserver(Observer *) {fprintf(stderr, "C - %s\n", __PRETTY_FUNCTION__);} }; class Recurrence : public RecurrenceRule::Observer { public: class Observer { public: Observer() {fprintf(stderr, "D - %s\n", __PRETTY_FUNCTION__);} }; Recurrence() {fprintf(stderr, "E - %s\n", __PRETTY_FUNCTION__);} void addObserver(Observer *) {fprintf( ...Show All

  • SQL Server "fractional truncation" trying to insert time value into smalldatetime via SQL Native Client ODBC

    The following represents a change in behavior between the SQL Server ODBC driver and the SQL Native Client ODBC driver. I noticed a similar post about this issue, but the scenario below is slightly different. I'm trying to insert a SQL_C_TIME value into a smalldatetime column (SQL_TYPE_TIMESTAMP) via a parameterized insert. With the SQL Server driver, I receive the "fractional truncation" warning with a SQL_SUCCESS_WITH_INFO from the SQLExecute, but the value is still inserted into the table. With the SQL Native Client driver, I again get the "fractional truncation" and SQL_SUCCESS_WITH_INFO, but the value is NOT inserted into table. Here's how to reproduce in ODBC Test. Conn->Full Connect to either drive ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. Write your own SpriteBatch 101 (long:code included)

    People keep asking "why doesn't SpriteBatch do X ". I keep saying "write your own". Well I decided to just write one for you, so people can see how it's done. The SpriteBatch class I wrote performs about 50% faster than the XNA SpriteBatch when all Draw calls are using the same texture. (Best case scenario, but you SHOULD put all your sprites in one or few textures for performance anyways.) On my card, I get about 188 fps with 1000 sprites with MySpriteBatch, and about 124 fps with 1000 Sprites using xna SpriteBatch. MySpriteBatch also supports, or could easily support: Using your own effect file. (2 parameters, viewProjection, and diffuseTexture) Using 3d vertices if you want. (just add the Draw method for it) World, View, Projectio ...Show All

  • Community Chat Adding 3D glasses to gamming

    I think it would be cool to step into a enviroment for 3D graphic around you. It just like a movie with 3D glasses included and object just pop near you and ect... Do you guy think this is a good idea to add this to the PC games I don't know how it will affect our eyes in long run, but I also want to play using 3D glasses. The Chessmaster 2003 has this feature build-in. ...Show All

  • Visual Studio Tools for Office Outlook : GAL

    Hello, I would like to be able to display the "Select Names" dialog, if not access the GAL, using my VSTO add-in. I see references to CDO being a requirement for this but CDO is not supported in managed code. Setting aside the promised Outlook 2007 functionality, is this possible in Outlook 2003 Thanks, Tad Hi Tad, The only way to display the Select Names dialog for Outlook 2003 is by using CDO, which as you stated is not supported from managed code. If re-writing your solution in native code isn't an option, you will either need to target your add-in for Outlook 2007 (which supports this in the object model), or use an alternative APIs to display this dialog. --Ryan ...Show All

  • Visual Studio 2008 (Pre-release) DrawingGroups in Sept .NET 3.0 CTS

    I have a WPF app that runs fine in previous CTSs. I just set up a new machine, and I installed the latest .NET 3.0 tools and SDK. A few minor things broke but were easily worked around. However, I don't understand this error at all: {"Cannot add content of type 'System.Windows.Media.GeometryDrawing' to an object of type 'System.Windows.Media.DrawingCollection'. Error at object 'System.Windows.Media.GeometryDrawing' in markup file 'xxxx;component/ui/Resources/Icons.xaml' Line 442 Position 8."} The relevant XAML: <DrawingBrush x:Key="ZoomInIconHover"> <DrawingBrush.Drawing> <DrawingGroup> <DrawingGroup.Children> <GeometryDrawing Pen="{StaticResource OrbIconBorderPe ...Show All

  • Visual C++ Accessing Image resource (bitmap)

    Hi, I tried but without success to access a bitmap file which I added in my application resource file as following: "resource.h" #define IDB_LOGOBWVISU 107 "app.rc" IDB_LOGOBWVISU BITMAP "Dessins\\LogobwVISU.bmp" How do I access this resource from within managed C++ code taking into account that I want to assign it to following Image object: System::Drawing::Image* Logo_Visu; Many thanks in advance, Stephane Hi Kenny, Really appreciate your help. Can you give me a quick sample on how you would do it considering the following: The image object to which I want to assign resource: System::Drawing::Image* Lo ...Show All

  • Windows Forms Text to Screen

    Hello, I need help figuring out how to write text directly to the screen. I've looked at the forums and the online help but still no luck. Any help would be appriciated. Hi, if you want to write the the screen device context you can use GetDC with a value of null to get the desktop device context, then you can draw onto that directly. The following code is an example of how to draw some red text directly onto the screen: using System; using System.Drawing; using System.Runtime.InteropServices; namespace ConsoleApplication1 { class Program { [DllImport("user32.dll")] static extern IntPtr GetDC(IntPtr hWnd); [DllImport("user32.dll")] static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); st ...Show All

©2008 Software Development Network