LOTG's Q&A profile
.NET Development Open/close database - Classic ASP - .NET
Supp Coders I need to get something straight, i could not find anything on da net that was helpfull, so ima try it here. ------- Normally in any code that i write i only open the DB once and close the db only once, for example: in form/page load i call my function OpenDB and in form/page unload, i call CloseDB ... now all of that aint a problem thats default classic stuff but now that i started to work more in .NET i kinda get the feeling that almost everytime i execute a query the db has to be opend and the closed again ....while im so used to open a db have my public Obj_Conn callable over all pages to execute queries then fire the queries that needs to be executed then cleanup/close db after all queries ar ...Show All
Visual C++ how to create object from LPDISPATCH
Dear all, I have an ocx. There are 2 methods: long CVsTelComSECtrl::GetType() { return 1; } LPDISPATCH CTelCtrl::Fax() { m_pcFax = new CFax; m_lpFax = m_pcFax->GetIDispatch(NULL); m_lpFax->AddRef(); return m_lpFax; } When I create an application, insert this ocx into application. I could use the method GetType() from this ocx CTelCtrl m_cTel; long lType = m_cTel.GetType(); //Works OK But I cannot use Fax(). How can I create a object with CFax type from this LPDISPATCH. Please help me, Tuan Tuan Le wrote: Thank you very much. In the last sentence, you mean I should add one more method which returns CFax* in OCX Not OCX only when you want to use in the same module, wh ...Show All
Visual C++ worker thread slowed by MFC UI interactions
I create a SDI MFC program in which there is a worker thread to render a 3D scene. I found the rendering speed will be interupted and slowed by some UI interactions, e.g., moving the window by drag the window title, mouse move on some toolbar's buttons. However the program implemented by C win32 API has little performence decrease under the same condition. Could you give some suggestion Thanks. I haven't manually invalidated the view or coustomized its ondraw function. I just create a 3D engine renderer(Ogre 3D engine) in the worker thread and give the HWND of the view to it. Then call the 3D engine's method "renderOneFrame" in the loop of the worker thread. I guess the engine do the ...Show All
Windows Forms TabControl Flashing.
I have an vb.net 2003 winform app that I am working on and I am having trouble the the TabControl control. The TabControl has 10 tabs, 4 of the tabs I have approx. 130 text boxes that is bound to a Access database. I first had trouble binding the text boxes to the database, I have that working. But when the form loads the tabpages flash as the different textboxes are filled with the data. Can anyone help me with this. I am a newbie but learning fast I can post code if that will help. Thanks in advance.... try suspending the layout while you are binding.... 'The tab control Me . TabControl1 . SuspendLayout () 'Do Databinding Me . TabControl1 . ResumeLayout () 'or the tabpa ...Show All
Software Development for Windows Vista Windows Worlflow Foundation Beta 2.2
i m not able to see the Parameters property of sequential worlfolw in the property window and i have installed beta 2.2 of Windows WF HI Chila using the WorkflowRuntime.CreatWorkflow(type,Dictionary<string,object>) overload method to create workflow instance. the Dictionary<string,object> type parameter ship the property value you want pass to workflowinstance. for sample. if you have a class Type Named "WorkflowA" and some property defination like below code. public class WorkflowA: SequentialWorkflowActivity { public string Name { get &nb ...Show All
.NET Development Unable to Connect to ther remote Server
Hi all, I m new to web service. I m using VS 2005, asp.net 2.0 ,C#. I wanna consume a remote web service but got : "Unable to connect to the remote server" error. my code snippit is as follows: WebProxy proxyObject = new WebProxy("http://bluetongue.cs.rmit.edu.au:8080/", true); proxyObject.Credentials = new NetworkCredential("XX", "XX", "XX"); WebRequest req = WebRequest.Create("http://www.webservicex.net/globalweather.asmx"); net.webservicex.www.GlobalWeather gw = new net.webservicex.www.GlobalWeather(); gw.GetCitiesByCountry("Australia");//This line got :"Unable to connect to the remote server" ...Show All
Visual Studio 2008 (Pre-release) XMAL to C# question (2)
Hi, Again i don't know how to translate XAML to C#... :\ so i have this XAML code: <Grid x:Name="MyGrid" > <Viewport3D Focusable="true" Name="myViewport3D" ClipToBounds="true"> <ModelVisual3D> .... as you can see this is a Grid that contain Viewport3D that contain ModelVisual3D. how i write it in C# you dont need to specify < Transform3DGroup.Children > the content in the Transform3DGroup will be added as children ...Show All
Windows Forms Settings for explore
Hello! I hope this is the right forum for this question. I want to know if there is any way of making a setting for the explorer (the one you get when you right click on the big Start-button) that makes a sound/starts to blink etc. when there are new files being created. what i mean is that in one of my folders a program dumps some files every day that i have to check. however i do not know when the program dumps the files so it would be very nice if if made a sound or something. Sorry if i am a bit vague but i really do not know the terms in english. any help is appreciated! Thanks! Sorry but this is not the right forum to post problems regarding Windows operating system (Read here: http://forums.microsof ...Show All
Software Development for Windows Vista Register dlls in Vista
I am using a much modified version of the VB6 P&D wizard, calling DLLSelfRegister in VB6stkit.dll. Under Vista this fails to register the dlls unless the user turns off UAC before running the installer. How can I code it to get the OS to prompt for a temporary lifting of UAC or elevation of status It doesn't work when I am logged in as an Adminstrator; only if I suspend the UAC. Where can I find information about creating the necessary manifest to prompt for elevated rights What is a manifest anyway ...Show All
Windows Forms Calling a separate function immediate upon loading the main form.
Dear All, I have main form where I do all my loading of my data like filling up the combo and grid. So I want a function where upon loading and show all my grid and combo frm1_Load method to call a separate function to do some task. The problem now I am having the function call as my last line in my frm1_Load function but is then delaying the viewing of my form. So how can I avoid this delay and allow the form to appear first. Dear BlueMikey, I dont really get your answer. Do you have any sample of it please Thanks. ...Show All
Visual Studio 2008 (Pre-release) IS WCF for me?
I want to know if Indigo based architecture is designed to solved 2 specific problems: 1) Web pages that need to render changing data... example: a real time temperature monitoring page. There are different technologies that work today, but likely they need special ports for communications or/and massive footprint downloads and java or activeX components to be installed... I would like to know if the Indigo's Web Services Subscription can be use by the client to render changes when the data on the server needs it. Is this the right use for the technology 2) For embbeded devices that need to communicate information over a WAN, does indigo solve downlink/uplink communications (and if yes) is there any design or methodology to support d ...Show All
Game Technologies: DirectX, XNA, XACT, etc. lost device in multiple device scenario
i'm using multiple devices to render multiple windows, on loosing a device my d3dDevice->Reset() function fails. i'm releasing all the resources allocated for that window on loosing th device. do i have to release all the other devices and their resources in such case what could be possible reason that the device reset fails The easiest way to understand that sort of issue is to use direct3d debug runtime using the control panel and activate all debug functions you can. It'll certainly display relevant informations in the debug output concerning the problem. Concerning your specific issue, be sure to wait that IDirect3DDevice9::TestCooperativeLevel returns D3DERR_DEVICENOTRESET before yo ...Show All
Visual Basic How can I cycle through all the System.Drawing.Colors?
I worked out the Console version to cycle through all 16 available colors: Sub Main() Dim x, y As Integer For x = 0 To 15 Console.BackgroundColor = CType(x, ConsoleColor) Console.Clear() For y = 0 To 15 Console.ForegroundColor = CType(y, ConsoleColor) Console.WriteLine("Background: {0}; Foreground: {1}", x, y) Next y Console.ReadLine() Next x Console.ResetColor() Console.Clear() Console.WriteLine() End Sub I also worked out a program that cycles through 4 colors in a Windows form: Private Sub btnCycle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCycle.Click Static x As Integer x = x + 1 If x = 5 Then x ...Show All
SQL Server Moving Data From Excel to SQL Server 2005 Express
I am trying to load data from an Excel spreadsheet file into SQL Server 2005 Express. I understand that DTS is the best tool for doing this but from my research it appears that DTS is not available with the Express edition and the import wizard that does come with Express is not well suited for this type of conversion. Does anyone have any suggestions for how to achieve this objective Thanks for any help you can provide. Buck. Thanks for the very helpful information. I will be studying it and making some decisions on how to proceed. It is nice to have options!! ...Show All
Visual Studio Tools for Office MailMerge.CreateDataSource
Is there anyway to get a Dataset or a DataTable as the source The header in any case would be > 255 characters. Is there another way to have <<variable>> fields populated without using MailMerge TIA That was not the problem. Come to find out I had not published. There is another problem. We are instructed to first save the document before we attempt to change the data island. As I understand it, the code I got from Cindy eliminates the mail merge fields so I cannot change the anyway. Is there any work around so I can change data islands and send to different people using Mail Merge Fields ...Show All
