DianaChia's Q&A profile
Visual Basic Access an application in server by multi-users
I am a new VB.Net developer. I created a standalone desktop window-based application to query SQL server database and print them in crystal report. It is running well on desktop. My problem now is I want to put it on server of my company so that other users can easily access it without installing it on each PC. So I installed it on server and share the folder. On desktop, I allocated the shared folder of server and run it. But an error came saying: An unhandled exception of type "System.Security.SecruityException" occurred in ***.exe. I don't have any idea on how to deal with it. I appreciate if anyone can give m ...Show All
.NET Development Cant view .asp pages in VS2005 local development server
I have site that is mized .ASP and .NEt. I am developing with VS2005 local web server. ANy attempt to view an ASP page gives: ' This type of page is not served'. I can work around this on my remote server in IIS settings-- how do I do this on the local server OK, this is how you do it In VS2005 go file/new website choose HTTP (instead of File) for location Then supply a URL (e.g. http://localhost/MyWeb ) This will create the virtual directory on you machine When you then click view in browser it will launch IIS not the development server so you should be able to work on asp or aspx ...Show All
Windows Forms Scrollbars and Custom Border Painting
I've customized a panel to draw a custom border utilizing WndProc but I have a problem when the scrollbars are displayed, take a look at the lower right portion of my border. I have attached a snapshot of the problematic control and a .NET panel equivalent. I think the corner box is misplaced and not painted on the correct intersection of the two&nbs ...Show All
Windows Forms checkbox greyed out
Hi I have added a checkbox column to my datagrid with this code.... Dim boolCol = New DataGridBoolColumn boolCol.MappingName = "ID" boolCol.HeaderText = "Process This item" CType(boolCol, DataGridBoolColumn).AllowNull = False boolCol.Width = 100 &nb ...Show All
Smart Device Development KeyDown-Event when I'am in gameloop
Hi, I write a little Game for my pocket-pc. When the program runs into the gameloop how I can handle some key events Will they fire although Yup, you can handle KeyDown event. A PPC app has autogenerated code for key handling as follows private void Form1_KeyDown( object sender, KeyEventArgs e) { if ((e.KeyCode == System.Windows.Forms. Keys .Up)) { // Up } if ((e.KeyCode == System.Windows.Forms. Keys .Down)) { // Down } if ((e.KeyCode == System.Windows.Forms. Keys .Left)) { // Left } if ((e.KeyCode == System.Windows.Forms. Keys .Right)) ...Show All
Windows Forms Differences between 1.1 and 2.0 : events triggered
Hi there, I've just migrated our application to version 2.0 of the .NET framework, and I have an issue with the way events are handled. Seemingly, they are handled differently between v1.1 and v2.0, though I've been unable to find any mention of this difference in the documentation. The issue is to do with events triggering before a dialog is made visible. Specifically, I'm creating a form, and then before showing it I'm optionally choosing a tab other than tab zero as the active tab. I achieve this simply by setting the SelectedIndex property of the tab control to be non-zero. Attached to the tab control I have an event ha ...Show All
Visual Basic Delegates and KeyUp
I am dynamically adding inkedits(rich textboxes for all intents and purposes) to a form and i want to capture the F2 key when the focus is on one of them and that key is hit... I wanted to do addhandler inkedits.keypress but that event only works for ascii keys. If i try inkedits.keyup the compiler is expecting a delegate object.. the examples i can find through searching the web dont really help me with the syntax.. i know i need to declare a delegate but i dont see how i can get it so i can create the code to handle the F2 event and create the instance of that delegate... Thanks for any help you can give. Confusedly, D ...Show All
Windows Forms mshtml DrawToDC overflow (ManagedIHTMLElementRender )
Hi, I am using mshtml browser in my .NET application. i want to save the image of the html page. so i used ManagedIHTMLElementRender and draw to DC etc to save the image. on saving image, anything beyond width > 1024 or height > 1024 in html element comes as empty space in saved image. i am not sure how to resolve it as DrawToDC 's return type is void and also its not throwing any exception my code is as follows: IHTMLElement element = tableElement as IHTMLElement; . . Image im = null; Graphics g = null; Graphics g1 = null; IntPtr phdc = IntPtr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Format48bppRgb Textures
I am running into problem when trying to render bitmap to texture. an image edited in Adobe using RGB 8bit/channel ( Format32bppArgb ) is displayed fine, ahowing appropriate alpha transparency as well. But the one edited using RGB 16bit/channel ( Format48bppRgb ) is not displayed properly. Color information is not interpreted properly. I am using following code: System.IO.FileStream fs = new System.IO.FileStream(fileName,System.IO.FileMode.Open,System.IO.FileAccess.Read); Bitmap bmp = new Bitmap(fs); bmp.MakeTransparent(alphaColor); texture = new Texture(device,bmp,0,Pool.Managed); What code could supoprt both formats ...Show All
.NET Development CLR and Native code
Hi all, I'm very confused of what is the role of the CLR after the MSIL is converted to the native code Does the CLR pops out each machine instruction and executes them Thanks, Suresh. I often read that CLR allocates memory,does garbage collection,resolve assemblies etc., I beleive these services are associated with the code at runtime (native code) Can you please explain more in detail... Thanks, Suresh. ...Show All
Windows Forms possible to use VS 2003 IDE "server explorer" behaviour?
hiya, I really like the way that server explorer: 1) stays collapsed at the left hand side of the screen when it is not in use. 2) expands to cover a tiny area when the mouse hovers over it. I have a fairly busy winform where this functionality would come in very handy to hide/display my "search" control. If this is not possible,   ...Show All
Visual C++ LNK2005 - delete already defined in nafxcwd.lib
I try to compile a VC6 program with VC7 (Visual Studio.NET 2002) and I get following link error: error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" ( 3@YAXPAXHPBDH@Z) already defined in nafxcwd.lib(afxmem.obj) http://support.microsoft.com/support/kb/articles/Q148/6/52.asp ...Show All
Visual C# Generating ReadOnly field using CodeDOM
Hi, I am tring to generate some ReadOnly fields using CodeDOM. i.e. My output should looks like -- VB Public ReadOnly _Field as New MyFieldType However I can't find the right MemberAttributes combo (Using MemberAttributes.Const doesn't do the trick). Can someone point me to the right direction Thanks Conrad ...Show All
.NET Development Obtain a Stack dump ?
I would like to know if it's possible to perform a full stack dump in .Net Since the VS debugger is basically capable to navigating through the stack granting a visual access to all managed variables of the stack, this must be possible somehow. Such feature would be really useful for various purposes including debugging (post-app crash forensics) but also performance tuning (post-run stack analysis), etc... Does anyone know how to perform a stack dump in .Net Thanks in advance, Joannes If you are using Windows 2003 Server this might help: http://www.interact-sw.co.uk/iangblog/2004/11/16/stackdump ...Show All
Visual Basic Datagrid OnClick to display row's data on another form2
Hi, I'm using a data adapter 'da1' to fill a dataset 'ds1' which is used to display data in a datagrid 'dg'. How do I code datagrid OnClick event on whichever row the user click on the datagrid, to cause a new form2 to popup with textboxes to display the selected row's data and allow the user to edit the data and click 'update' so it will be updated to the database. The user can alt-tab to switch to main form and select another row, the new's row data will be displayed on form2's textboxes and editable too. Any idea how i can do that da1 --- Table1: ID, Name, Age, Job Table2: ID, Status, Salary I did not include the other tables into ' ...Show All
