|
I developed a small remote application, and connected with one of my client. But everytime Iam using the below code to connect with my server and accessing the sqlserver...And hence I found my application is slow at data loading and saving...
Is there any other way to connect the server faster manner ? or Any other approaches...
Thanks for the helps
public string WMSCon_1 = "Data Source=172.178.1.120; initial Catalog=Sales_Master; User Id=codeproject; Password=xxxxxxx"
Actually I given the above connection string and connecting with the client for data access. Simply every where Iam giving the ip and just connecting, whether I have to keep any other things for this remote access to increase the speed..?
Thanks
PARAMU
|
|
|
|
|
Paramu1973 wrote: remote application
What do you mean by "remote"?
Paramu1973 wrote: my application is slow at data loading and saving
You would probably have to show a sample of how you're doing it; it may be very inefficient code. It's unlikely to be due to the connection string.
Perhaps you'll want a Web Service.
|
|
|
|
|
Hi,
Thanks for the helps.
There is nothing to say inefficient. Since I just connect via IP as mentioned in my prior post. Yes. As per the advice, I will try to write the web service and may be the best solution.
|
|
|
|
|
Hi everyone, with the below code, I'm able to draw a rectangle by clicking and dragging the mouse. So the question is: Can I access the controls within that selected rectangle/area? Any clue or a piece of code that puts me in the right direction would be appreciated. Thanks
Rectangle re;
private void form_MouseDown(object sender, MouseEventArgs e)
{
re.X = e.X;
re.Y = e.Y;
re.Width = 0;
re.Height = 0;
}
private void form_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
re.Width = e.X - re.X;
re.Height = e.Y - re.Y;
this.Invalidate();
}
}
private void form_Paint(object sender, PaintEventArgs e)
{
SolidBrush myBrush;
myBrush = new SolidBrush(Color.PaleTurquoise);
e.Graphics.FillRectangle(myBrush, re);
}
private void Form1_Click(object sender, EventArgs e)
{
re = new Rectangle(0, 0, 0, 0);
this.Invalidate();
}
|
|
|
|
|
Without trying it, off the top of my head, one way to achieve this would be to use the Rectangle.IntersectsWith method. Basically, each control on your form has a corresponding rectangle associated with it, and you would be able to compare this with the rectangle you've dragged out.
Note that this assumes you want to pick any control touched by your rectangle. If the child controls must be inside the rectangle, you could use Rectangle.Contains . As an optimisation, I'd be tempted to do one pass and add the control id and rectangle into a Dictionary so that you don't have to look it up every time.
|
|
|
|
|
thanks so much! I was making deep math to solve it. I would'nt think it was so simple )
|
|
|
|
|
You're welcome. Glad I could help.
|
|
|
|
|
I need to call control panel functions using c# or vb.net.
As a example how can i call internet properties using c# or vb .NET. If anybody know please tell me how can i code.
Thanks
|
|
|
|
|
The Control Panel items are executables inside a system folder, and with a special extension of .cpl
You can discover which is which by launching one, then using a tool (e.g. Task Manager) to figure which file is running (it will be a rundll, so you'd have to watch for the actual command line).
And you can launch them using a simple Process.Start
On most systems Internet Settings are handled by C:\Windows\system32\inetcpl.cpl
|
|
|
|
|
I want to write an application that will interface with the Authentec AES2810 embedded fingerprint swipe sensor on my laptop. No SDK came with it, and it is being used presently to logon to Windows.
I installed Windows Driver Kit thinking I could use that to access the swipe sensor, but don't know how to. I have tried Griaule SDK but it doesn't recognize the sensor.
Pls. I need help. I just need the required dlls and skeleton code to capture fingerprint data from the sensor. I prefer C#.
Also I want to find out if there is no scanner dialog / fingerprint dialog that one can use in Visual Studio (eg using WIA) to capture image from a scanner/sensor, like the print dialog in VS.
Thanks.
|
|
|
|
|
Why didn't you start here[^]? They made the scanner so, obviously, they would have some method of using it in your code, such as providing an SDK for it.
|
|
|
|
|
Hi,
Is there any FREE library which will allow me to open a pdf and show it on a winform project without using AcroPDF.dll
|
|
|
|
|
ITextSharp[^].
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
ITextSharp is for create/edit purpose of PDF....? If OP just wants to open the file, then can't he do so by calling Process.Run('FilePath'); method....?
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
Sure, if they have a PDF reader installed and the file association is registered with Windows, they could do that. I was under the impression that the OP wanted to show the PDF in his application.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
A WebBrowser Control should do with a PDF file whatever your Internet Explorer does to it. no need for extra libraries.
|
|
|
|
|
That requires the user to have a PDF reading IE plugin, which counts as an 'extra library' in my book.
|
|
|
|
|
Hi, guys
I am trying to build a website for a small college to finish my third year.the current problem that i am facing now is that i want to query my application for student result using an sms line.
I tryd googling but m nt getting anything, anyone who has some ideas please feel free to help
Thanx.
|
|
|
|
|
Having no experience with this but trying to break it down!
An SMS raquires a phone connection, therefore your app is going to need a modem/phone connection. It is going to have to respond to na incoming call, answer the call and receive the message(I have no idea what the protocol is with SMS). It is then going to have to parse the message and apply the results to a query of the database.
Now you have the query what to do with it, send it back to the calling number! You will either have a register of users and numbers or a way of getting the callers number when you answer the incoming call.
You may also get a completely different approach from someone with knowledge in this area
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
A phone isn't required, you can use a service, such as Twilio to do it.
|
|
|
|
|
You can use a service such a Twilio[^] to provide an SMS gateway to your application. Your app does NOT need a phone to send/receive SMS message, but it will need it's own phone number. This can be provided by Twilio.
There are services like this sprinkled around the web, but as far as I know, none of them are free.
|
|
|
|
|
Hi,
i've downloaded a sample application from here
it has two projects; First a class library project with some classes and interfaces and another a silverlight application that has shortcuts to classes and interfaces of first one.
How can a project has shortcuts to classes of another project?
And what does it mean?
It's in that project not this! I'm confused...
Best wishes
|
|
|
|
|
The class library is compiled into a dynamic link library (dll), which is then referenced by the silverlight application. This gives the silverlight app the ability to use classes and interfaces defined in the class library project. So to use the both, you need to first compile the library project, and then add a reference to the library project in the silverlight project, using the 'add reference' link in project explorer of Visual Studio.
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
In Visual Studio's 'Add Existing Item' dialog box, the 'Add' button has a drop down option called 'Add As Link' that does the job. It does not copy the file to the project folder, it just creates a shortcut to the actual file. So, the file can be shared with multiple project. This is a very dirty thing to do. Ideally, you should abstract common code into a separate class library.
|
|
|
|
|
thank you Shameel
Best wishes
|
|
|
|