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
X

xfitr2

@xfitr2
About
Posts
51
Topics
21
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Expose Property of Constituent Control in UserControl
    X xfitr2

    Obviously so and it is being checked for. I am assumming that the Toolstrip's internal Items collection is not be intialized, but when I go and review the code for the Toolstrip class, you will see that the Items property instantiates the collection if null. Therefore, there should be no null value. Considering that the Designer uses reflection, I am wondering is there is a code path that is not being called in design-time. Any thoughts?

    C# help design docker

  • Expose Property of Constituent Control in UserControl
    X xfitr2

    I have a custom control derived from the UserControl class. I have three controls in the container; label, treeview, and toolstrip. I want to expose the Items collection of the toolstrip so that the user can add objects at design-time. When I add the custom control to a form and click the exposed Items collection in properties, I get the following error message: "Value cannot be null. Parameter name: value." I've exhausted all my resources and would appreciate any help anyone can give on this issue. I have provided my property code snippet I used in my custom usercontrol.

    private System.Windows.Forms.ToolStrip toolstrip;
    
    ...
    
    public ToolStripItemCollection Items {
      get {
        if (toolstrip == null) {
          toolstrip = new ToolStrip();
        }
        return (toolstrip.Items);
      }
      set {
        toolstrip.Items.Clear();
        foreach (ToolStripItem obj in value) {
          toolstrip.Items.Add(obj);
        }
      }
    }
    
    C# help design docker

  • Enable/Disable Button through javascript [modified]
    X xfitr2

    I have a asp.net page where my button is enabled or disabled depending on whether two textboxes are properly filled out. I enable/disable the button through the onchange events of the textboxes. Once button is enabled and I click it, the postback seems to have disappeared because it does nothing. I enable/disable the button like this:

    	function checkBuild() {
    		document.getElementById('sMsg').innerHTML = '';
    		checkBAL();
    		checkINI();
    		if ((checkBAL()) && (checkINI())) {
    			**document.form1.btn1.disabled = false;**
    			checkWarning();
    		} else {
    			**document.form1.btn1.disabled = true;**
    		}
    	}
    

    I've read that in order for the button "btn1" to postback, I must have it enabled onLoad which I have done for testing. Therefore, if I click the button before my javascript fires, it works; only stops working once my checkBuild() function is called by the textboxes javascript onchange event. Can anyone help with this issue? Many thanks.

    modified on Monday, September 22, 2008 10:31 PM

    ASP.NET help csharp javascript asp-net testing

  • Insert statment for multiple tables
    X xfitr2

    In reponse to Michael & Vikram, yes, you should be using transactions on multiple statements. The example I provided to you was based on your original post. If your intentions are not alwasy to insert records, then you will need to modify the stored procedure to check for the Roles, Managers, etc. If found then update your employee table. You will need to know SQL. If you are using a Listbox or Combobox, you can also save the PK in the control collection and just pass that to your stored procedure. There are many ways to kill this bird, it just depends on your requirements.

    C# database tutorial announcement

  • Threaded Form
    X xfitr2

    Thank you for the suggestion. My problem though is trying to get the form to Hide/Close once the user clicks/types outside the form. Is there an event fired when this happens that I am not aware of or do I need to use a global hook? If I was to use a hook, how do I know that the source of the hook was not within the form?

    C# csharp com

  • Insert statment for multiple tables
    X xfitr2

    That was a SQL statement for creating a stored procedure in SQL Server. Once you create it in SQL Server, you can then call it using a class like SqlDataReader and use the method ExecuteNonQuery. Don't forget to add your parameters!

    C# database tutorial announcement

  • Insert statment for multiple tables
    X xfitr2

    CREATE PROCEDURE sp_InsertEmployee @Firstname nvarchar(50), @Lastname nvarchar(50), @Role nvarchar(50), @Manager nvarchar(50), @Division nvarchar(50) AS BEGIN SET NOCOUNT ON; INSERT INTO EMPLOYEES (FIRSTNAME, LASTNAME) VALUES (@FIRSTNAME, @LASTNAME) INSERT INTO [ROLE] ([ROLE]) VALUES (@ROLE) INSERT INTO MANAGER (MFIRSTNAME) VALUES (@MANAGER) INSERT INTO DIVISION (DIVISIONNAME) VALUES (@DIVISION) END GO

    C# database tutorial announcement

  • Rijndael Encryption Question..
    X xfitr2

    I found this article very useful when I had to write an encryption program for my company. http://www.developerfusion.co.uk/show/4647/4/[^]

    C# graphics security architecture help question

  • Determine Double-Click / Middle Click using low-level mouse hook?
    X xfitr2

    Check out this article: http://www.codeproject.com/csharp/globalhook.asp[^] It has a MouseActivity Event that you can see which mouse button was clicked.

    C# question csharp c++ tutorial

  • Insert statment for multiple tables
    X xfitr2

    Your best solution would be to create a stored procedure and call it within your code "ExecuteNonQuery." The stored procedure will do all the work of inserting the records into the proper tables. As far as I know, there is not a way, with SQL Server, to insert into multiple tables with one INSERT statement. This also gives you the ability to do error checking on the back-end.

    C# database tutorial announcement

  • Threaded Form
    X xfitr2

    I am having trouble with closing a form created in a seperate thread. This is what I am trying to accomplish: I have a program that runs in the taskbar. When a user double-clicks a key, a form is created in a new thread and is shown on top of all other forms. When the user clicks anywhere outside the form, the thread will close, but the program will continue to run in the background. This is similar to the Google Desktop functionality. The code works the first time the form is created in a new thread, but if the form has been closed once, you have to click on the form to make it active and then click outside of it before it will close. I have tried using the Deactivate and LostFocus events, but they both only work the first time the form is shown. Any suggestions would be greatful. I have included a snippet of code below. public class MyClass {   private Thread _thread;   private FMain _fmain;   private UserActivityHook _keyhook;   public MyClass() {     _keyhook = new UserActivityHook(false, true);     _keyhook += new KeyEventHandler(KeyDoubleClick);   }   private void KeyDoubleClick(object sender, KeyEventArgs e) {     if (e.KeyValue == 163) {       _thread = new Thread(new ThreadStart(OpenForm));       _thread.Start();     }   }   private void OpenForm() {     _fmain = new FMain();     _fmain.Deactivate += new EventHandler(form_Close);     _fmain.LostFocus += new EventHandler(form_Close);     _fmain.ShowDialog();   }   private void form_Close(object sender, EventArgs e) {     _thread.Abort();   } } References: The UserActivityHook was fortunately posted by George Mamaladze; http://www.codeproject.com/csharp/globalhook.asp[^]

    C# csharp com

  • Notepad Replacement
    X xfitr2

    Notepad++ is the way to go.

    The Lounge question

  • Do you guys use wikis?
    X xfitr2

    I set one up for my company and we have been using it to document projects, network configurations, company standards, etc. We still like to write our docs in Word for each stage of the lifecycle, but wiki is a quick way to share notes during development of changes, snags, etc that need to be formally documented later on.

    The Lounge collaboration question

  • Do you guys use wikis?
    X xfitr2

    I set one up for my company and we have been using it to document projects, network configurations, company standards, etc. We still like to write our docs in Word for each stage of the lifecycle, but wiki is a quick way to share notes during development of changes, snags, etc that need to be formally documented.

    The Lounge collaboration question

  • OLAP Design
    X xfitr2

    This book is great. Thanks.

    Design and Architecture sql-server database design sysadmin learning

  • OLAP Design
    X xfitr2

    My company is using SQL Server 2000 for our OLTP DBs and I have been writing reports using SSRS. The time has come for us to start a datawarehouse because of the amount of processing some of these reports entail. I have done research online about OLAP design and concepts, but I would really like recommendation of a good book that is full of case studies, design examples, etc. Many thanks.

    Design and Architecture sql-server database design sysadmin learning

  • records with their row numbers in a table
    X xfitr2

    I do not recommend this but you could create a insert/delete trigger that loops through the recordset and inserts the new value. This is a performance hit. A sample trigger is below. You must have a primary key on the table to do this. I am confused of why you need to reference the rownumber. It has no significance. If you dont mind a few holes here and there after you have deleted a record, use an Identity column. CREATE TRIGGER dbo.trg_Count ON dbo._TEST AFTER INSERT, DELETE AS BEGIN SET NOCOUNT ON; DECLARE @PKEY UNIQUEIDENTIFIER DECLARE @I BIGINT IF ((SELECT trigger_nestlevel()) = 1) BEGIN DECLARE TRG_TEST_CUR CURSOR FOR SELECT [GUID] FROM _TEST OPEN TRG_TEST_CUR FETCH NEXT FROM TRG_TEST_CUR INTO @PKEY SET @I = 1 WHILE @@FETCH_STATUS = 0 BEGIN UPDATE _TEST SET ID = @I WHERE [GUID] = @PKEY SET @I = @I + 1 FETCH NEXT FROM TRG_TEST_CUR INTO @PKEY END CLOSE TRG_TEST_CUR DEALLOCATE TRG_TEST_CUR END END GO

    Database database sql-server oracle com sysadmin

  • Problem with XMLHTTPRequest [modified]
    X xfitr2

    To answer my own problem. It seems that I will have to create 'virtual threads' in javascript to handle the callback event. http://www.developer.com/lang/jscript/article.php/10939_3592016_2[^]

    Web Development announcement c++ com sysadmin xml

  • Problem with XMLHTTPRequest [modified]
    X xfitr2

    I think that I will just build an xmldoc and send that to the asp page. This way, there will only be one XmlHTTPRequest sent per user click even if there are multiple items selected.

    Web Development announcement c++ com sysadmin xml

  • Problem with XMLHTTPRequest [modified]
    X xfitr2

    Thank you for your response. I just tried your suggestion and now it will process the first request in the for loop and then stops.

    Web Development announcement c++ com sysadmin xml
  • Login

  • Don't have an account? Register

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