Good luck. I was way over-prepared for that test. And my examiner was very nice. I'm sure you'll do just fine. :)
DigitalKing
Posts
-
Wish me luck -
Any one use google webmaster tools?Yes - after you validate them, make sure you don't delete the blank html file from your webserver or remove the meta tag. Every once in a while, Google seems to revalidate your site.
-
HELP!!!!! Hurry, Now.I've also encountered this, but the power supply (the 12V part) was dead. I would try it with a different power supply.
-
Weird Quotient testWarm and fuzzy.:rolleyes::cool:
-
Weird Quotient test165 0% are more weird, 0% are just as weird, and 100% are more normal than you! I had to try... http://www.nerdtests.com/thetester/images/php/wq.php?val=8495
-
Finding File Paths from stringUse Regular Expressions: using System.Text.RegularExpressions; ... //Find all paths in the string MatchCollection matches = Regex.Matches(richTextBox1.Text, "\\b[a-z]\\:(\\\\[^\\n\\r\\f\\t\\\\/<>|\":*?]+)*\\b", RegexOptions.IgnoreCase); foreach (Match m in matches) { //do whatever you need to for each path found in the string. The entire path can be found using m.Value //you can also find the index and length of the path in the string by accessing other fields of m. } Hope this helps, DigitalKing
-
How to Exit Nested Methodsvoid event1(...) {
//this event is called first
if (method1())
{
//more stuff
}
}public bool method1() {
//some stuff
if (!method2()) return false;
//more stuff
return true;
}public bool method2() {
//some stuff
if (!method3()) return false;
//more stuff
return true;
}public bool method3() {
//some stuff
if (x == 0) {
return false;
}
//more stuff
return true;
} -
how to get browser histry in c#.netCheck out this article[^]
-
Multiple Icons in Icon File -
Text file Sorting.What's the problem? Are you sorting it numerically or alphabetically? Line by line? Please be more specific.
-
improve the application response speedUse a seperate thread for the video and audio capture (if you aren't already). This will free up the GUI thread, and should improve response time.
-
Few focused questionsThere's no good way to accomplish this, as it is the user's preference. For example, in firefox, the user can select whether to load newly opened pages in the current tab, or a new tab.
-
Sudoku? -
Few focused questions1. Create some registry entries under HKEY_CLASSES_ROOT:
This can all be done programatically, but it takes some work. Look at the Microsoft.Win32 namespace for registry manipulation functions.
- Create a key by the name of the file extension you want
- Set the default attribute of this key to a word that describes your program. It's name doesn't really matter.
- Create a key by the name of the word you decided on in step 2.
- Create some subkeys: 'DefaultIcon' and 'shell'
- Set the default attribute of the DefaultIcon key to the path of your icon. If you want to use the the same icon
as your executable, do something like this:c:\code\mysupercoolapp\exefile.exe,0
- Create a 'open' subkey under 'shell' and a 'command' subkey under open
- Set the default attribute of the 'command' key to the path of your program (include the %1)
c:\code\mysupercoolapp\exefile.exe %1
- Restart
- When a file with the extension you've picked is double-clicked, your application will run.
The first argument will be the path of the file.
2. You can put a link in the startup folder of the start menu, or add a registry entry to either HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever the computer starts) or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (if you want it to run whenever only the current user logs on) 3. As the other post-er said, search for "single instance" 4. System.Diagnostics.Process.Start("http://www.myurl.com"); will open the url in the default web browser 5. I should read up on cryptography 6. They are in a zip file in Visual Studio's program folder: C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary.zip (or similar) Hope this helps, DigitalKing
-
contro with custom propertiesYou have to use fields, you cannot just make variables public: This will not work:
public int MyInteger=1;
This will:
private int myInteger=1;
public int MyInteger
{
get
{
return myInteger;
}
set
{
myInteger=value;
}
}If you want variables to be read only, just omit the set accessor:
private int myInteger=1;
public int MyInteger
{
get
{
return myInteger;
}
}You can adjust the visible attributes in the property designer:
private int myInteger=1;
[Description("A useless number."),Category("Behavior")]
public int MyInteger
{
get
{
return myInteger;
}
set
{
myInteger=value;
}
}Hope this helps, DigitalKing
-
C# equivalent to char * (well, System.IntPtr)??Which API function are you using? You can probably use the StringBuilder class (from System.Text), and (depending on the function) replace the IntPtr argument with one of type StringBuilder.
-
Convert a file to streamThis is a good way, but the FileInfo object is not necessary (unless you are using it somewhere else). Try this:
Stream sm = new FileStream(@"C:\test.wav", FileMode.Open);
Hope this helps, DigitalKing
-
get active program windowTry this:
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();DigitalKing
-
Drag And DropYou are correct. Do something like this:
public Form1()
{
InitializeComponent();
richTextBox1.DragEnter += new DragEventHandler(richTextBox1_DragEnter);
richTextBox1.DragDrop += new DragEventHandler(richTextBox1_DragDrop);
}void richTextBox1_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); //array of the full paths of all files that were dropped
if (files.Length > 0)
{
try
{
System.IO.StreamReader r = new System.IO.StreamReader(files[0]);
richTextBox1.Text = r.ReadToEnd();
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine("Error opening file " + files[0] + ":\n"+ex.Message);
}
}
}void richTextBox1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
{
e.Effect = DragDropEffects.All;
}
}Hope this helps, DigitalKing
-
ComboBox problem windows applicationThis happens because when the combobox is populated, the first item is automatically selected, and therefore, the SelectedIndexChanged event is called. Use a boolean flag to prevent this from happening:
bool AllowSelectedIndexChange = true;
void Form1_Load()
{
...
AllowSelectedIndexChange=false;
combobox1.DataSource = arr;
AllowSelectedIndexChange=true;
...
}
void ComboBox1_SelectedIndexChanged(...)
{
if (AllowSelectedIndexChange)
{
//current SelectedIndexChanged code goes here
}
}Hope this helps, DigitalKing