Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. misterstick

    Preventing 'Save As' on Excel 2007 Workbook

    on reflection, very few people are actually morons, and, unless you're dilbert, your boss os unlikely to be a pointy-haired computer ignoramus. so, paranoia kicks in. it's a test. they're testing your ability to deal with failure. they are asking you to do something they know you cannot in...
  2. misterstick

    Preventing 'Save As' on Excel 2007 Workbook

    change jobs. the person asking for this is a moron. tell them about the dos, and about the fact that whatever you code, the user can turn macros off and your work will be wasted. mr s. <;)
  3. misterstick

    Method overloading question

    i'm surprised this compiles. it's certainly pretty poor coding. what does the non-ref one do that the ref one does? it's such poor coding that it smells like hoemwork. but, whatever, the ref keyword isn't optional, including it should call the second overload. fb.foo(a); fb.foo(ref a); mr...
  4. misterstick

    Preventing 'Save As' on Excel 2007 Workbook

    if you don't want this data copied, don't release it. it would be much easier for you to come to terms with the fact that you've released it into the world and no longer control it than it would be for you to try to code round what you're proposing. the users can always copy your spreadsheet...
  5. misterstick

    Why use delegates?

    a delegate is a description of a function. if you have an integer, you declare a variable of type byte, int or long. these types are self-describing, the amount of memory they take up and the maximum and minimum values they can hold are already declared for you. if you want a variable to...
  6. misterstick

    Is my understanding of code generation in WinForm apps correct?

    pretty much. program.cs could all be done behind the scenes, but then you wouldn't see that there was stuff you could configure. form1.designer.cs is for the designer, yes, but you can edit it if you need to and are reasonably careful. it's always annoyed me that given that you need to...
  7. misterstick

    mass compile in sql server

    the answer is to use the command line utility sqlcmd, issuing the command :r script. now, where's my sockpuppet to give myself a star. mr s. <;)
  8. misterstick

    oracle &quot;@script&quot; equivalent

    or rather, the answer is "use sqlcmd" the command is :r script. how hard was that? mr s. <;)
  9. misterstick

    mass compile in sql server

    further to thread183-1532457 i have multiple stored procedures. the code for each is in a separate t-sql script file. a change of server has changed the way that dates are handled...
  10. misterstick

    oracle &quot;@script&quot; equivalent

    ok, so the answer is "you can't." that's so alien. all my programming career i've believed that each unit of code should be kept separate. SSMS allows you to do this with its creation of container documents or "solutions". that t-sql then gives you no way to automate the running of those...
  11. misterstick

    oracle &quot;@script&quot; equivalent

    ok, so that allows me to execute arbitrary code, for which many thanks. what if i want to keep the code in a script file on disk? how do i then call that code from within a different script? in oracle, it's @script or @@script (although @@ is borked by design) in C it's #include <script.h> in...
  12. misterstick

    oracle &quot;@script&quot; equivalent

    i'm moving from oracle to sql server. in oracle i'm used to using modular scripts, including the text of one script in another. e.g. <script name=script1> create table xxtest as ( field1 char(10) not null ); </script> <script name=script2> @script1 </script> running script2 would then...
  13. misterstick

    finding an item in a contextMenu

    third post? not bad at all. mr s. <;)
  14. misterstick

    Enable/disable buttons according to txt file

    disabling the button is a useful visual cue to the user that there are no more records in that direction. if the click event just does nothing what does that mean? are there no more records or is the process not working? how many times do you have to click the button before you realise it's the...
  15. misterstick

    calling event from within another event

    if you really have to call one event from another, you could overload the method so that you can provide default parameters (OTTOMH): private void textBox1_KeyPress() { textBox1_KeyPress(this, new KeyPressEventArgs()); } mr s. <;)
  16. misterstick

    Preventing Excel screen action during a VBA routine

    1. stop using ActiveSheet 2. Application.ScreenUpdating = False 3. be really careful mr s. <;)
  17. misterstick

    How to control movie files in web form?

    treat your users like adults. if they say they've watched the video take their word for it. alt-tab and mute ensures you won't be able to tell if they've watched the video over the web if you're not there at the time. full stop. if you really want to make sure they've watched it test them on...
  18. misterstick

    excel nested if or vba code

    this is a case for VLOOKUP. 1. tidy up your table of currencies, rates and whether to divide or multiply. (i'd advise you to get this consistent and always do one or the other: it's not hard) something like this: CCY RATE D/M GBP 1.0000 M USD 2.1985 D KWD 3.6666 M 2...
  19. misterstick

    Sorting a text file

    you could try the dos sort utility. in a dos window: sort < inputfile.txt > outputfile.txt mr s. <;)
  20. misterstick

    App Start Behavior

    bill77771: it should be in the System namespace by default: System.Devices.Keyboard. importing VB-only code seems to defeat the point somewhat. mr s. <;)

Part and Inventory Search

Back
Top