Jump to content
Xtreme .Net Talk

atmosphere1212

Avatar/Signature
  • Posts

    42
  • Joined

  • Last visited

atmosphere1212's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ok, if i were to just expose the control collection as a property and then access it globally, how would I get the instance of the page when im in some random class?
  2. The object in question is a ControlCollection. I dont need to persist it between postbacks, just between different controls and modules in the same post back.
  3. Hey I want to store the address of an object in the session and then recreate the reference later on by the address. Is this possible? The reason im not storing the object in the session is because the object is large and i dont want to serialize it (the session is InProc). The object is also only going to be used during the current postback so i dont have to worry about the address pointing to the wrong object.
  4. Ill take a crack at it, Theres a file in your C:\windows\system32 directory called shutdown.exe. Im pretty sure that this is the file that is run when you shut your computer down. Replace this file with a 'wrapper' file that you will create in visual studio that accepts a password. If the password is correct then run the shutdown file (which will be renamed) However, this is probably not safe at all :P
  5. This doesnt work either. Heres my code Dim curChar As Integer = bStream.Read() While curChar <> 13 And curChar <> 26 And curChar <> -1 curLine += Chr(stripErrorChars(curChar)) curChar = bStream.Read End While That was the code which reads a line of text. The following is the stripErrorChars method Private Function stripErrorChars(ByVal curChar As Integer) As Integer If curChar = 0 Then Return 32 ElseIf curChar >= 128 Then Return 32 Else Return curChar End If End Function
  6. Hey, Im reading in characters of text, one by one, and I want to replace any odd characters of text (above ascii 128) with spaces. However.. when i use someInt = myStreamReader.Read It seems to completely skip over these odd characters.. How can I read these characters?
  7. Hey I am populating a data table and eventually plan to use this table to add the rows to an sql server table. I will be creating each column in the table programatically. How can i create columns with sql server data types?
  8. Hey Im wondering if anyone could shed some light on this entire situation for me. I want to be able to gather information about open windows. For example, i have the window handle (process.MainWindowHandle). What object can i create to reference the window. Im ultimately looking for information such as if its the active window, its name, etc.. thanks
  9. Hey I have a bunch of code that works fine on my computer (which creates/writes to files, creates directories, ect) but when I try to do actions like these on my office network I get exceptions at sometimes where i shouldn't. For example, I when trying to set a files attribute on the network my program might ocasionally throw an exception. I think somethings happening on the network level, which i dont know much about. My idea is to encase all my System.IO calls in try blocks that are encased in a loop to retry if it fails. But my program uses alot of different IO Calls. Is there any way to figure out which ones could cause problems?
  10. If i have an sql command that is guarenteed to return a single cell (ie a count command) is it possible just to grab the integer value without using a sqlDataReader or sqlDataSet, etc...
  11. I have this program that will write to a log file with a specified path. When running this application from my computer and using the target network path this works fine. However, when i place the executable on the network and try to write to the same path (which happens to be the same directory that the executable is in) i get a file permissions error. I am using a fully qualified network path that i have access to. does anyone know what the problem could be?
  12. I am using vb.net with sql server. I am programming a comparison algorithm which checks to see if for each file in a directory, there is a matching file name in a table column. My algorithm requires that both the array containing the disk file names and the column in the datareader be sorted in ascending order. However, I dont think that the comparison method used in vb is the same as that in sql server (order by). (Note: when grabbing the filenames from vb im using directory.getFiles() ) Does anyone know of any differences in the comparison methods between vb and sql server, and if so, instruct me on how to change my vb comparison method so i can sort the filenames in the same way as sql server does.
  13. Hey I have a question regarding how to monitor the progress of a proccess. For example, I have some independant code and when I (the client of the code) call it, I want to display a progress bar (or whatever implementation of progress display i choose) of its proccess without embedding client specific code in it. ie, anyone who runs this proccess can get its progress without having to change it. What is the best method of doing this?
  14. Quick question How do throw an exception such that it is printed to the command output when my program is aborted?
×
×
  • Create New...