Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

sumeat

@sumeat
About
Posts
28
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • System clock loses time and jumps back up
    S sumeat

    Hi, Thanks for the response. I have looked into the GetSystemTimeAdjustmemt function and when I call this function on my target system it returns 15.625 ms for interval and increment and TRUE for the disabled flag. According to help if time adjustment is disabled then the interval is added to the time at each clock interrupt and time may be synchronize using "other mechanisms". I do see a task running in the task manager that syncs the clock to RTC causing the jump in the time. I am not sure if it is timeserv.exe or not. It came and went so fast. Is there a way to change the sync interval to something else other than an hour?

    C / C++ / MFC hardware beta-testing help code-review

  • System clock loses time and jumps back up
    S sumeat

    I don't handle clock interrupt in my application but may be one of the drivers (camera) does. I wrote a sample app to display the values returned by GetSystemTimeAdjustment and found that the interval and increment values are 15.625 ms and that adjustment is disabled. The MSDN help says that when time adjustment is disabled then the clock will synchrnoize using "other mechanism" and make a noticeable jump. I am guessing that the system clock is synchronizing every hour to the RTC on the motherboard. The questions I have is: 1. Why is it syncing exactly every hour? 2. What can I do to make it sync say every 10 minutes or so? I'd appreciate any thoughts/ideas on this matter.

    C / C++ / MFC hardware beta-testing help code-review

  • System clock loses time and jumps back up
    S sumeat

    It happens only when my application is running. I ran perfmon in parallel to my application to see if this is really happening and not some bug in the logger code.

    C / C++ / MFC hardware beta-testing help code-review

  • System clock loses time and jumps back up
    S sumeat

    Hi, I have an application that controls a hardware system including a camera. I have noticed (after studying the logs) that when the application is running the system clock loses time gradually over an hour and then catches up the lost time in one stroke. This causes a big jump - 2 to 3 minutes - in the log times. To futher validate my theory I ran perfmon.exe and configured it to capture CPU usage every 30 seconds. In the log generated by perfmon I notice the same jump in the time. Another interesting fact is that the interval between 2 jumps is exactly 1 hour. I have tried shutting down unnecessary services/processes to reduce the number of processes that are running but the problem still persists. I'd appreciate any feedback and/or solutions

    C / C++ / MFC hardware beta-testing help code-review

  • Windows Form DataGrid
    S sumeat

    You can show controls in DataGrid, for e.g. showing a button control in a column by adding those controls to the grid. // Create a control Button myButton = new Button(); myButton.Visible = false; // Add the button to the data grid myDataGrid.Controls.Add(myButton); // Now handle the Paint event of the grid OnDataGridPaint(..) { if (myDataGrid.CurrentCell.ColumnNumber = ) { myButton.width = myDataGrid.GetCurrentCellBounds().Width; } } // CurrentCellChange event OnDataGridCurrentCellChangeEvent(..) { if (myDataGrid.CurrentCell.ColumnNumber = ) { myButton.Location = myDataGrid.GetCurrentCellBounds().Location; myButton.Visible = true; } else { myButton.Visible = false; } } // Handle Layout and Scroll events of DataGrids OnDataGridLayout(..) { OnDataGridCurrentCellChangeEvent(); } OnDataGridScrolled(..) { OnDataGridCurrentCellChangeEvent(); } This is just psuedo code. You may have to do some more tweaking for this to work. But this is generally how it is done (or how I have done it!) Hope this helps. Suhas

    C# tutorial question winforms

  • package and deployment related question
    S sumeat

    Hi, I recently had to build a installation program to install my application and I tried to do it using the "Deployment" project in Visual Studio.Net. After much research and help from the folks on this message board I was able to build the installation package. There are 2 things to be done: 1. Create a new project of type "Deployment" and add all the components of your application to this project. You can specify the folders they need to be on the target computer, the icons/shortcuts on the desktop, the item in the Start->Program Menu, etc. On building this project it will generate a .wsi file, a setup.exe along with other files. All the files generated in the Debug directory constitute the installation package. The above package will run perfectly on any computer as long as it has .NET framework installed on it. If not then you have do the second thing. 2. Download the BootStrapper sample from the following link: http://www.microsoft.com/downloads/details.aspx?FamilyId=BF253CFD-1EFC-4FC5-BA7E-6A6F21403495&displaylang=en Its in unmanaged C++. Build it and it will generate a setup.exe. It also has a settings.ini file. Copy the setup.exe and settings.ini into a folder, say, myfolder. Then copy the .wsi generated in step 1 above into myfolder. Then copy the dotnetfx.exe (the .net framework installer) into myfolder. The dotnetfx.exe can be downloaded from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=D7158DEE-A83F-4E21-B05A-009D06457787&displaylang=en All files in myfolder now constitute your new installation package. This installation will first check if .NET is installed or not on the target computer, if not, then it will silently install it and then it will install your application. I hope this helps. Suhas Those who can, do, those who cannot, teach.

    C# csharp sysadmin help tutorial question

  • Closing an MDI Child Form
    S sumeat

    Form has a ActiveMDIChild property, this is the currently active child form. You can use this property to close the topmost (active) child form. Suhas

    C# question help tutorial

  • Seperator line in Windows Form
    S sumeat

    Use the group box control with no text and height set to 4 or less pixels. Suhas

    C# question

  • deployment help
    S sumeat

    Hi, I recently had to build a installation program to install my application and I tried to do it using the "Deployment" project in Visual Studio.Net. After much research and help from the folks on this message board I was able to build the installation package. There are 2 things to be done: 1. Create a new project of type "Deployment" and add all the components of your application to this project. You can specify the folders they need to be on the target computer, the icons/shortcuts on the desktop, the item in the Start->Program Menu, etc. On building this project it will generate a .wsi file, a setup.exe along with other files. All the files generated in the Debug directory constitute the installation package. The above package will run perfectly on any computer as long as it has .NET framework installed on it. If not then you have do the second thing. 2. Download the BootStrapper sample from the following link: http://www.microsoft.com/downloads/details.aspx?FamilyId=BF253CFD-1EFC-4FC5-BA7E-6A6F21403495&displaylang=en Its in unmanaged C++. Build it and it will generate a setup.exe. It also has a settings.ini file. Copy the setup.exe and settings.ini into a folder, say, myfolder. Then copy the .wsi generated in step 1 above into myfolder. Then copy the dotnetfx.exe (the .net framework installer) into myfolder. The dotnetfx.exe can be downloaded from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=D7158DEE-A83F-4E21-B05A-009D06457787&displaylang=en All files in myfolder now constitute your new installation package. This installation will first check if .NET is installed or not on the target computer, if not, then it will silently install it and then it will install your application. I hope this helps. Suhas

    C# csharp visual-studio sysadmin tools help

  • ComboBox in DataGrid
    S sumeat

    pahluwalia@hotmail.com wrote: newGrid[indexPage].TableStyles.Add(dgdtblStyle); newGrid[indexPage].TableStyles[0].GridColumnStyles.Add(myColStyle); Add custom column styles to the custom table style AND then add the custom table style to the datagrid's table style collection. If you do the reverse, the way you have done, the data grid will not use your column styles

    C# css help

  • DataGridColumnStyle
    S sumeat

    I have a project downloaded from somewhere (I dont remember from where) that demonstrates how to do this. If you let me know your email id I can send it to you. Suhas

    C# question

  • How do I deploy my application
    S sumeat

    Hi, I have build a C# application. It runs fine on my computer :) Now I want to distribute this app to others. But some of the "others" do not have .NEt installed on their machine. How can I distribute "all" that is need for the app to run. I am sure the good folks on this board would have come across this problem before and would have some solution/suggestions for me. Thanks, Suhas

    C# csharp question help

  • how to prevent window close by clicking window close button
    S sumeat

    private void Form_OnClosing(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = true; //prevents the form from closing } This will prevent the form from closing ever!!!!! You do want the user to close the form somehow if not by clicking on the "cross"??

    C# help tutorial question

  • ComboBox in DataGrid
    S sumeat

    To disallow users from clicking or selected a particular column, you will have to use custom table style for your data grid. In this custom table style you will have to add custom data column styles - DataGridTextBoxColumn. Derive a class from DataGridTextBoxColumn and in that override the Edit method and in that method do nothing. public class MyTextBoxColumn : DataGridTextBoxColumn { public MyTextBoxColumn() { // // TODO: Add constructor logic here // } protected override void Edit(...) { if (!ReadOnly) { base.Edit(..); // call base class } //don't call baseclass, so no editing.... } } This should take care of it! Hope this helps. Suhas

    C# css help

  • MDI problem
    S sumeat

    I tried this and it worked for me. No icons are displayed. My MDIClient window had following properties 1. MaximizeBox - false 2. MinimizeBox - false 3. ControlBox - false 4. FormBorderStyle - FixedDialog 5. WindowState - Normal Try with these property values and it should work! Suhas

    C# question csharp help

  • WindowsControl Background
    S sumeat

    I tried the same and it works. The background color of the custom control did not hide any controls on it. How are you doing it? Can you paste your code or some pseudo-code Suhas

    C# question

  • How to Scale down controls on a window
    S sumeat

    Hi, I have a client window (in a MDI app) with lot of controls - listboxes, buttons, pictureboxes, etc - on it. I want to show a scaled-down version of the window i.e. show a window 1/8th size of the original window with all the controls on it. Is there a way to scale down the controls? Something like: Form newForm = new Form(); newForm.size = OriginalForm.size/8; for(i = 0; i < controlsOnOriginalForm; i++) { // Get control from original form // create same control, size it and put on the new form } Any suggestions / help would be appreciated. Thanks, Suhas

    C# help tutorial question announcement

  • Get window content as bitmap
    S sumeat

    Hi, I want to get the contents (client area) of a window as a bitmap. The window size is greater than the size of the screen i.e. it has scroll bars. All I have manage to get is the visible contents of the window. How do I get the contents that are visible after scrolling? I would appreciate any help. Thanks, Suhas suhass

    C# question graphics help

  • Distribute code in separate files
    S sumeat

    Hi, Is it possible to distribute C# class code in separate files as is possible with C++ classes? The classes in my application are getting bigger and bigger and distributing different functionalities in separate files could help in managing the code. Thanks,

    C# csharp c++ help question

  • How to change Back Color of ToolBar
    S sumeat

    How to change the back color of a tool bar control? Thanks

    C# tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups