|
Well, I can allready connect to a database. But do you know how to use the Local Database which is embedded in visual studio?
|
|
|
|
|
AFAIK there is no database embedded within Visual studio - unless you are talking about datasets?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Well I really am talking about a database. When you go to your project and add an item, there is also an item called "local database". This is the database I am talking about.
I've never heard of dataset's though, does this has to do something with databases too?
|
|
|
|
|
The thing you are referring to is 'An empty SQL Server Compact Edition database for local data'
So presumably you need to look at connection strings for that, but its not embedded within your app.
Datasets are collections of datatables. Try Google.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi guys! I want to know if it's possible to store PDF document at local database and then to retrieve the document and work with it? Thanks
|
|
|
|
|
laziale wrote: I want to know if it's possible to store PDF document at local database
Store your document in binary and do whatever you want
|
|
|
|
|
can you please give me a example how to do that, and then how to retrieve back and show on the screen as PDF file again. Thanks a lot!!
|
|
|
|
|
|
|
You are welcome
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hello,
I am working on asp and asp.net 1.1 with C#.
I am working with load balancer and providing feed to servers with some methods in my project. Sometimes when one server is busy because of heavy traffice its load is balanced by few connected servers and this time these servers receives data sent by different users.
Now my question is:
How can I get server information (like hostname, IP Adress etc.) which is recieving the data at this moment.
Thanks in advance!
Regds,
Sandeep
Ahuja
|
|
|
|
|
|
I think it's called Wireshark now. As I recall the name Ethereal caused some legal problem.
|
|
|
|
|
thanks tony & vikas..
Actually I am looking for some code (asp/asp.net) to fetch the server hostname/IP Address..
thanks again for your posts
Regds,
sandeep
Ahuja
|
|
|
|
|
thanks tony & vikas..
Actually I am looking for some code (C# with asp.net) to fetch the server hostname/IP Address..
thanks again for your posts
Regds,
sandeep
Ahuja
|
|
|
|
|
Dear All,
I want to design a form designer where i can put my own button control,text box control, image control and other such controls.
i am starting this from my c# knowledge but i dont know where to start and how to design such application.
plz give references where i can start for designing such application.
Thanks in Advance,
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
|
|
Here's a general (very general) approach I've found helpful for a similar application:
1. Implement a MyControl base class that has features common to all of your controls: Coordinates, size, color, text, enabled, style, etc...
2. Add a DrawOn (Graphics g) method in this base class that draws a basic control. This will be overridden by your derived control classes that want to display the control differently.
3. In the form your user is designing on, have a List<MyControl> member that has all the controls the user has added so far, in the order they've added them. (If you want to serialize forms, use ArrayList instead because generics can't be serialized by default.)
4. In your form's OnPaint handler, iterate through your MyControl list, calling the DrawOn method for each control.
5. In the form's mouse-move handler, set the new coordinates of all selected controls, and invalidate their previous and current positions.
That's it. A bit simplistic, but that's what makes this approach easy to use.
|
|
|
|
|
thanks it help me alot but i have problem with creating tools i mean toolbox
like button controls, image controls etc...
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
You can use a toolstrip with the control names. When the user clicks a control name, create a new instance of that control and add it to the List of controls.
You can also show a properties dialog for each control type so the user can customize the control by filling in its properties.
|
|
|
|
|
Hi,
I've a .net Compact Framework 2.0 VS C# Project.
On it I have a control (a picture box) which at runtime I can drag left and right on my screen within set co-ordinates.
I update the picture with one of two images which are embedded images)
However, when I do drag this control at runtime, there is a delay in the refresh, so what I am getting is a smear of controls across the screen momentarily while I'm moving the control. I want the control to move seamlessly like that on the iPhone.
I've included my code below.
I've googled this problem and came across the following. http://www.pcreview.co.uk/forums/thread-1301356.php I've attempted to implement this but am not sure if the programmer intends on dragging the panel about the screen, or if the panel is refreshing the form itself. Either way, my implementation of this code has a permanent spear of my control across the screen, and also the background of the form has become invisible
I understand Double buffering isn't available in .net CF. I don't have the experience myself to implement an alternative to double buffering. I've tried adding a pixel count to the code, to stop the control from being drawn unless a the control has moved a certain amout of pixels, this make the control movement jumpy and I still have a smear as the control moves.
If anyone has any idea how to reduce this effect I'd greatly appreciate it
best Regards
Gemma
//Variables
private Boolean dragInProgress = false;
int MouseDownX = 0;
int MouseDownY = 0;
int pixelcount = 0;
Point temp = new Point();
int percentage_light;
Bitmap lights_on, lights_off;
//Embedded images are loaded when the form loads
private void Form1_Load(object sender, EventArgs e)
{
lights_on = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("DeviceApplication1.images.light_intensity_slider_h.png"));
lights_off = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("DeviceApplication1.images.light_intensity_slider.png"));
}
#region Button Slider bit
private void picCameraDimmer_MouseDown(object sender, MouseEventArgs e)
{
if (!this.dragInProgress)
{
this.dragInProgress = true;
this.MouseDownX = e.X;
this.MouseDownY = e.Y;
}
return;
}
private void picCameraDimmer_MouseMove(object sender, MouseEventArgs e)
{
pixelcount += 1;
if (dragInProgress)
{
temp.X = this.picCameraDimmer.Location.X + (e.X - MouseDownX);
temp.Y = 168; // Set the x co-ordinate so button can't move sideways
this.picCameraDimmer.Location = temp;
int x_size = Convert.ToInt16(temp.X);
percentage_light = (int)((x_size - 33) / 3.91);
if (temp.X < 36) // Set button to it OFF Location
{
temp.X = 36;
this.picCameraDimmer.Location = temp;
picCameraDimmer.Image = lights_off;
picCameraLight.Size = new System.Drawing.Size(5, 5);
}
else if (temp.X >= (36) && temp.X <= (428)) // Button is between its OFF and MAX points
{
picCameraLight.Size = new System.Drawing.Size(x_size, 5);
picCameraDimmer.Image = lights_on;
this.picCameraDimmer.Location = temp;
Invalidate();
}
else if (temp.X > 428) // Set button to its MAX location
{
temp.X = 428;
this.picCameraDimmer.Location = temp;
picCameraDimmer.Image = lights_on;
picCameraLight.Size = new System.Drawing.Size(428, 5);
}
return;
}
}
private void picCameraDimmer_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.dragInProgress = false;
if (temp.X == 36) // Button is at its OFF location
{
// Send 0 for light intensity
// s_data[4] = (byte)(0);
// sound.Play();
}
else if (temp.X == 428) // Button is at its MAX location
{
// s_data[4] = 100;
// sound.Play();
}
else if (temp.X > 36 && temp.X < 428) // Button is between OFF and MAX points
{
this.picCameraDimmer.Location = temp;
// s_data[4] = (byte)(percentage_light);
}
}
return;
}
#endregion
|
|
|
|
|
How to convert the .HTML file (Text and Images) into .pdf file using C#
Thanks in advance
|
|
|
|
|
|
If your boss can afford it, tell him to buy TxTextControl .NET. AFAIK, in the standard version it can handle html and rtf. In the professional, it adds support for doc and docx. All these formats can be exported to PDF.
Check it out here: http://www.textcontrol.com/products/dotnet/[^]
|
|
|
|