|
Hi,
Below link will generate round corner Div. you can apply it for your gridview by little modification.
CSS generator to round corner[^]
Thanks
-Amit
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I have frmSearchResult and showing it from frmMain like this:
is_form_exists = false;
foreach (Form search_form in this.MdiChildren)
{
if ((string)search_form.Tag == "BROWSE_PATIENTS")
{
search_form.Activate();
is_form_exists = true;
break;
}
}
if (is_form_exists == false)
{
frmSearchResult SearchResultForm = new frmSearchResult(public_var);
SearchResultForm.Tag = "BROWSE_PATIENTS";
SearchResultForm.MdiParent = this;
SearchResultForm.Dock = DockStyle.Fill;
SearchResultForm.find_what = "FILE";
SearchResultForm.find_text1 = (sender as TextEdit).Text.Trim();
SearchResultForm.find_text2 = null;
SearchResultForm.Show();
}
and in frmSearcResult_Activate event I am running a coded to populate data.
My problem now, if the form already exist and I am passing vartiable from my frmMain to it then it will not refresh but it will just activate the frmSearcResult form.
How can I solve this?
|
|
|
|
|
Refresh (repopulate) the data right after the Activate, and before the break.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
how?
my code in frmSearcResult is public like this:
public void browse_result()
{
......
}
but when i try to run it after the
search_form.Activate();
search_form.browse_result();
is_form_exists = true;
break;
It doesn't requires it!
|
|
|
|
|
Means you'll probably have to move the initialization-code from the constructor to some public method, so that you can invoke that method on an existing object.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have a question.
How can I pass value to find_what, find_text1and find_text2 in this code:
if ((string)search_form.Tag == "BROWSE_PATIENTS")
{
search_form.Activate();
is_form_exists = true;
break;
}
|
|
|
|
|
jrahma wrote: How can I pass value
Add a parameter to the method;
public class SearchResultForm: Form
{
public void SetSomeStuff(string WHAT, string t1, string t2)
{
this.find_what = WHAT;
this.find_text1 = t1;
this.find_text2 = t2;
}
}
..and it goes like this;
SearchResultForm.SetSomeStuff("FILE", (sender as TextEdit).Text.Trim(), null);
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
How can I att-- title explains.
|
|
|
|
|
I don't think that's possible at all[^] with managed code.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Maybe you get me wrong, what I want to do is that realize what "messages" are windows sending, like spy++
|
|
|
|
|
Member 8551910 wrote: Maybe you get me wrong
I didn't
Member 8551910 wrote: what I want to do is that realize what "messages" are windows sending, like spy++
Spy++ is not written in a managed language.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
You can't do it in managed code. That's a little technique call "DLL injection", which cannot be done in managed code because .NET does not support the exports required to pull it off.
You can still do what you want, just not in C#. It has to be done in C/C++.
|
|
|
|
|
Oh well now im sad.
btw, @dave is target app able to tell if dll is injected to them ? I mean obviously they do but is it like "hey my variable just froze, there must be an injected dll" or they somehow instantly realize ? (talking about big cheat protection systems like vac)
My hopes alredy in toilet now so im just wondering...
|
|
|
|
|
No, there is no way for the target application to know that it's had some DLL injected into it.
|
|
|
|
|
hi,
I have a C# app that access MSSQL 2000 via web service calls to retrieve/update some records. This app has been working well in Windows XP. The web services are also developed in C#. The MSSQL database is residing in a separate server.
Recently, I copy and run this app in a Windows 7 laptop. The time to retrieve/update some records has grown exponentially! It took almost 20 minutes to insert 1000 records, and almost 1 hour to insert 3000 records. These same functions could be carried out in less than 10 seconds in Windows XP.
I tried disabling IPV6, autotuning in the Windows 7 laptop, but that did not help. Any idea what could be the cause of such slowness and any suggestion to solve this strange behaviour is much appreciated.
Thanks!
|
|
|
|
|
There's really is not enough information to answer this question at all. Anything anyone says is purely guess work.
But, first things first. Was the laptop connected to the network over wireless or wired?? Do it on wired network and see what happens. Wireless can be excruciatingly slow compared to wired.
|
|
|
|
|
hi Dave,
Thanks for the response.
I have tried both wired and wireless network, and the results are the same. Please note the MS SQL2000 server, the web services and the C# application are running within an intranet.
I could not understand why a C# app running on a higher end Windows 7 OS laptop (higher processor, ram etc) could lose out to an old Windows XP OS laptop, in terms of accessing the database records.
Please note that the testing environment for both laptops are the same: MS SQL 2000 Server and web service running on Windows 2000 server. I am just running a C# application on both laptops that access the database via the web services.
Do I need to add additional libraries or something for the Windows 7 OS? I am really at a loss where / which direction should I be looking to troubleshoot the problem.
|
|
|
|
|
There are no additional libraries. Chances are really good it's something O/S related, not your code. The onyl thing I can think of is make sure the machine is patched up to latest, including IE patches.
|
|
|
|
|
Hello everyone
This is a program for downloading a file from a url
when i download a file i got a error like access to the path is denined can any one tell me why this happen
This is my code.
<pre lang="c#">
public static void Download(String strURLFileandPath, String strFileSaveFileandPath)
{
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(strURLFileandPath);
HttpWebResponse ws = (HttpWebResponse)wr.GetResponse();
Stream str = ws.GetResponseStream();
byte[] inBuf = new byte[100000];
int bytesToRead = (int)inBuf.Length;
int bytesRead = 0;
while (bytesToRead > 0)
{
int n = str.Read(inBuf, bytesRead, bytesToRead);
if (n == 0)
break;
bytesRead += n;
bytesToRead -= n;
}
try
{
FileStream fstr = new FileStream(strFileSaveFileandPath, FileMode.OpenOrCreate, FileAccess.Write);
fstr.Write(inBuf, 0, bytesRead);
str.Close();
fstr.Close();
}
catch (Exception e) {
MessageBox.Show(e.Message);
}
}
private void button2_Click(object sender, EventArgs e)
{
if (phpurl.Text == "") {
MessageBox.Show("Invalid Url");
}
else if (Uri.IsWellFormedUriString(phpurl.Text, UriKind.Absolute) == false)
{
MessageBox.Show("Invalid Url");
}
else {
Download(phpurl.Text, @"D:\test");
}
}
Also this is my manifest file
="1.0"="utf-8"
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
</application>
</compatibility>
</asmv1:assembly>
Please help me..
Thanks in advance.
|
|
|
|
|
The local user does not have the right to write to that particular location on the D drive.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
What line does this exception occur on??
Either the URL you've specified doesn't exist or you don't have permissions to see it or the filepath that you're writing to doesn't exist or you don't have permissions to write to it.
I think the meaning of the error is pretty obvious, given your code.
|
|
|
|
|
Dave Kreskowiak Thanks for your replay
this is the line exception occur.
FileStream fstr = new FileStream(strFileSaveFileandPath, FileMode.OpenOrCreate, FileAccess.Write);
Please help me.
Thanks in advance
|
|
|
|
|
Also make sure that file doesn't already exist on your system and is not open by another program (or even your own).
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Hi dybs,
That is a empty folder and there is no way to use the file by any other program.
Please help me.
Best regards,
Thanks in advance
|
|
|
|
|
The user that is running your code does not have permissions to write to either D:\ or to D:\test. Or, the filepath you specified in that line of code (use the debugger to find out what it is) doesn't exist.
|
|
|
|