|
You would need to post the code that is handling your processing.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
this is the code we are using for the processing.
// for Application LOAD when we start our machine.
public static bool AutoStart {
get
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
string startupValue = (string)key.GetValue("VideoRep");
key.Close();
if (startupValue == null) return false; else return true;
}
set
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
if (value)
{
key.SetValue("VideoRep", "\"" + Application.ExecutablePath + "\"");
key.Close();
}
else
{
key.DeleteValue("VideoRep");
key.Close();
}
}
}
// for Remember Me Checkbox functionality.
public static string[] RememberMe
{
get
{
string uname = "";
string pword = "";
if (File.Exists(CONFIG_FILE))
{
BinaryReader binReader = new BinaryReader(File.Open(CONFIG_FILE, FileMode.Open));
try
{
// If the file is not empty, read the application settings.
if (binReader.PeekChar() != -1)
{
uname = binReader.ReadString();
pword = binReader.ReadString();
}
}
catch (Exception) { }
finally { binReader.Close(); }
}
return new string[2] { uname, pword };
}
set
{
if (File.Exists(CONFIG_FILE))
File.Delete(CONFIG_FILE);
if (value != null)
{
try
{
using (BinaryWriter binWriter = new BinaryWriter(File.Open(CONFIG_FILE, FileMode.Create)))
{
binWriter.Write(User.Username);
binWriter.Write(User.Password);
}
}
catch (Exception)
{
}
}
}
}
//checkbox checked events code
private void cbRememberMe_MouseClick(object sender, MouseEventArgs e)
{
if (User.RememberMe[0] != "") User.RememberMe = null; else User.RememberMe = new string[2] { User.Username, User.Password };
}
private void cbLoadStartup_MouseClick(object sender, MouseEventArgs e)
{
if (User.AutoStart) User.AutoStart = false; else User.AutoStart = true;
}
this is process we are doing please give me reply, what should i do to make both functionalities work together.
|
|
|
|
|
I am having the strangest problem. When I open up a form, it gives me the following error.
Warning 1 Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\yeshivot.mdb'
It is important to note that my app is working ok, but that the error comes when I open up the form in Visual Studio which. Now I went into the config file, and it says that it is pulling the file from datadirectory which I guess stumps me. I did see that the directory does exist, and that I could put the file in there and forget about it. However to me that would just seem like not really dealing with the problem. Where is DataDirectory defined? Why isn't it the directory where my app is being developed? And one more thing that is perhaps the most strange of all is that I don't own Visual Studio 8. I am using 2005.
Please enlighten me someone.
|
|
|
|
|
bfis108137 wrote: And one more thing that is perhaps the most strange of all is that I don't own Visual Studio 8. I am using 2005.
VS2005 is Visual Studio 8. On the Help menu choose the last menu entry "About Microsoft Visual Studio".
led mike
|
|
|
|
|
I guess you are right but that doesn't help me with that issue I was dealing with. I have however cheated and copied the database to that location and it works now. I would like some clarity on why my database needs to be there and not in the app folder.
|
|
|
|
|
I am trying to populate the drowdown list of a combobox in the dropdown event with the list of sqlserver but when i click the dropdown button the list populates, shows briefly and then closes.
What can i do to prevent this from happening.
Please help.
I tryied with this code but no luck.
private List<string> GetSqlServers()
{
List<string> resultList = new List<string>();
DataTable dtServers = SqlDataSourceEnumerator.Instance.GetDataSources();
foreach (DataRow row in dtServers.Rows)
{
if (row["InstanceName"] != DBNull.Value)
resultList.Add(row["ServerName"].ToString() + "\\" + row["InstanceName"].ToString());
else
resultList.Add(row["ServerName"].ToString());
}
return resultList;
}
private void cmbServers_DropDown(object sender, EventArgs e)
{
if (cmbServers.Items.Count == 0)
{
cmbServers.Items.Clear();
cmbServers.Items.AddRange(GetSqlServers().ToArray());
}
}</string></string></string>
|
|
|
|
|
Have you ever heard of DataBinding? I suggest you do some reading on the subject. I would bet there are many articles here on CodeProject covering that subject like this one for example[^]. Look in the "CHAPTERS" items on the site menu.
led mike
|
|
|
|
|
My problem is that SqlDataSourceEnumerator.Instance.GetDataSources(); return a DataTable with more than one column.
I want to show to the user [ServerName] if [InstanceName] is null or
[ServerName]\[InstanceName] if not.
That is why i didn't use data binding.
Ok i can bind the result of GetSqlServers() method in the dropdown event of the combobox but my initial problem does not dissapear.
I want it to populate in the dropdown event because it takes a long time and i don't want it to run unless the user clicks dropdown otherwise he can just edit the server name in the combobox.
The problem is that after the list is populated it is automatically closed. How can i prevent that to happen.
Please help.
|
|
|
|
|
Hai,
Plz help with my doubt.
I have a datagrid (17 columns) used for inserting datas to the database thru datasource and xmlschemas.
while editing i use the same datagrid to diplay the datas from the database got after selecting the employee id.But the problem is the already exixting columns in the datagrid doesnot hide and the datas come after the 17 columns.
how this can be achieved??????
|
|
|
|
|
Hi,
Use the Clear property to clear the Columns of the DataGrid before repopulating the Grid.
this.dataGridView1.Columns.Clear();
Hope this would be helpful.
John Adams
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hello,
I have an Windows application in VB.Net 3.5.
I have an MDI form which has a set of menus. One of these menu items has a keyboard shortcut (Ctrl+F). When I run the form stand-alone, the keyboard shortcut works just fine.
I integrated this form into an Explorer-type form (the MDI form is launched after double-clicking a line item in a list) and the keyboard shortcut does not work now.
Can anyone help me understand why this doesn't work?
Thanks,
Joe
|
|
|
|
|
Make sure you have the parent [and possibly child form][s] KeyPreview property set to true.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I just tried that. I hear a windows tone, meaning that the key command is being processing by the child form, but the menu command in the MDI is not executing. How can the child pass the keystroke to the MDI?
Joe
|
|
|
|
|
Hi,
Currently I have developed a service.It is working fine.
Now I want to Implement thread synchronization using Mutex.
Iam very new to threading concept..I unable to do that
Kindly help me in doing the same
|
|
|
|
|
Before getting too far in answering your questions, what have you read/learned so far on threading? How much do you understand so far on mutexes, semaphores, deadlocks, and race conditions? As you are new to threading, try to come up with a 1-line description of each of these in your own words. I've learned the best way to understand something is to try and explain it out loud.
Before you start writing any synchronization code, I highly recommend you read up on the items I mentioned as much as possible. Thread sync problems can be a pain to debug later if you don't account for them right away. I woudl also check out the MSDN documentation on the Mutex and Semaphore classes. There's also a C# threading tutorial that has sample code for using the Mutex class. At the risk of sounding unoriginal, "Google is your friend".
Once you've read through the samples, see what you can come up with on your own and then we might be able to give you more detailed help.
Dybs
|
|
|
|
|
Hi,
I am building a class libarary project in MS VS 2005, when I deploy my application I don't want to my clients reference to my assembly or know about methods in my assemby.
Could anyone help me?
Thank a lot!
|
|
|
|
|
If I understand your question correctly: you want to prevent clients from reusing your code through referencing in their own projects.
If that is the case, then you may want to look into obfuscation (I use Spices.VSIP.Obfuscator). Obfuscation assists in preventing decompiling of projects and assists in scrambling method names so that only authorized programs can interact with them.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi
can any body please tell how to navigate between forms in windows application.
like back and forward in web browser.
Thanks in advance.
ngrj.
|
|
|
|
|
create a form object, close the previous form and open the next form
|
|
|
|
|
If you have two forms open and you simply want to move back and forth between them by showing one form at once and then other, you can simply use Show and Hide property of forms...
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
I have more than 50 forms.
i need to navigate between them the same
way as back and forward.
Thanks in advance
ngrj.
|
|
|
|
|
Create a MDI Form and load your forms and child forms.
Here you can create a navigator to control them
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
I had written service which will fire for every 3 seconds.Actually I had written a service which fire when an user open a word document and click print button on it.For this Iam using WMI from that Iam checking jobs for every 3 sec.
Now I want to make my service work only when a print button(i.e., normal print option from notepad,wordpad,document....like..)is fired.
I think i have to watch the events.....how to do that i have no idea..
Kindly help me and guide in proper way..
Thanks
|
|
|
|
|
Please don't cross post.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
After adding a toolbar to my application, I decided to change the appearance of my toolbar buttons to the more modern "flat" style by setting the toolbar's "Appearance" property to "Flat". But when you do that, you also get another feature which is a "transparent toolbar". The unwanted transparency causes problems with my application. For example, a portion of the bitmap which was previously located underneath the toolbar is seen behind the buttons and moving the window causes the background to become garbled.
So my question(s) are:
- Is there any way to have flat style toolbar buttons without being forced to use a transparent toolbar?
- If the answer to the previous is "no", then is there a way I can force the toolbar background to always be the "control color"?
Thanks -- Greg
|
|
|
|