|
Hi,
C# vs2005. Im creating a simple web page image upload program.
The user enters a local directory and the web page displays thumbnails of all the images in that directory.
This works fine if I create thumbnail files on the server and display the images using their virtual paths eg "/images/image1.jpg"
Copying the files can be time consuming so im trying to get the same result without creating my own thumbnail copies.
I create ImageButtons and set the image url to be the absolute location of the image on the client eg "c:\temp\images\image1.jpg"
When I run the app the images are not displayed. If I copy the generated html and load it in another instance of internet explorer the images are displayed fine.
How can I get images to be displayed using absolute paths when the images reside on the client?
Many thanks,
Chas
|
|
|
|
|
I have created an invoice like crystal reported,
Which gets it data from a stored procedure with 1 parameter which tells which invoice data to use.
Now the problem is that it always tryes to execute this stored procedure from the server it was created on, I have set the database login but it still doesnt execute from that database.
Now im either looking for a method of fixing this or another method to get the data in.
I have tryed using a dataset using the SetDataSource function but i have no idea how i can assign or even get the fields in the crystal report designer mode to there proper locations.
Thanks
ReportDocument Report = new ReportDocument();<br />
if (File.Exists("factuur.rpt"))<br />
{<br />
Report.Load("factuur.rpt", OpenReportMethod.OpenReportByTempCopy);<br />
}<br />
else if (File.Exists("..\\..\\factuur.rpt"))<br />
{<br />
Report.Load("..\\..\\factuur.rpt", OpenReportMethod.OpenReportByTempCopy);<br />
}<br />
else<br />
{<br />
MessageBox.Show("Factuur.rpt niet gevonden, opdracht kan niet uitgevoert worden");<br />
return;<br />
}<br />
Report.SetDatabaseLogon(settings.user, settings.password, settings.server, settings.db);<br />
Report.SetParameterValue("@FactuurID", ID);<br />
crystalReportViewer1.ReportSource = Report;<br />
<br />
|
|
|
|
|
Strange but give this a try -
Within crystal reports, ensure file/ report options/ 'save data with report' is unselected.
Ensure settings.server value is the correct one you want.
In the Report.Load try only sending the filename.
Failing that I would just open the report in crystal reports and under database - set datasource location use the final database you want.
Thanks,
Chas
|
|
|
|
|
hi how can i changed the components icon,
pelase check the link
Sample.jpg
(32 KB)
i can change the Toolbox icon for new components but when i dragged it into form i have got the default icon . how to solve it !!
Thanks in ADvance
|
|
|
|
|
How are you setting the toolbox icon? Using the ToolboxBitmapAttribute, it sets the icon in the toolbox and in the form's component area.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Dear guru's,
I want to start my first WPF-exercises.
Can you give me a hint, which components I need to download for this purpuse?
(e.g. NetFramework 3.0)
Another stupid question: Are WPF-applications possible on Win-XP?
Thank you for your help
|
|
|
|
|
Hi there
In order to run WPF applications, you'll need at least .NET 3.0, but if possible, use 3.5, which are both supported by xp as well. If you're a novice developer, have a look at Visual Studio 2008 Express for Windows - it'll give you everything to get started.
http://tinyurl.com/yrxzhk[^]
Happy coding!
Philipp
|
|
|
|
|
C# Express 2008 has built in support for WPF projects - nothing extra required - as has Visual Studio 2008. Most sites with articles on WPF seem to use expression blend for UI designing, but it's not necessary - just easier.
No problems running WPF apps on XP!
|
|
|
|
|
Thank you for your help! ! !
|
|
|
|
|
Hello every body.
My project is C# project on VS2005 .net
How can I catch a key pressed but not like event for a Form , tabControl and other component, for all program.For exapmle:
If my program is started and is pressed keys like F1,F2,F3... and etc. I want to make some function on this Keys pressed.
Thanks for all in advance.
|
|
|
|
|
t_nedelchev wrote: How can I catch a key pressed but not like event for a Form
What do you mean?
only two letters away from being an asset
|
|
|
|
|
I think he means an application wide keypress event handler.
|
|
|
|
|
Have a look here[^]. I haven't tried it but it looks like it'll do what you want.
|
|
|
|
|
|
Hi,
yes you can create system-wide hotkeys.
My Code Rescue article[^] uses them (but does not mention it in the article itself).
There is some P/Invoke involved, calling Win32 functions.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hello every body.
How can I catch Key press but not like event for a Form or other component.
For exapmle:
if my program is started end is presed keys F1,F2,... and etc. I want to catch this Keys presed.
Thanks for all.
|
|
|
|
|
Set your form's KeyPreview property to true then use the form's KeyDown, KeyPress or KeyUp events.
|
|
|
|
|
Thanks DaveyM69 it works!!!
|
|
|
|
|
I am out of my element when doing graphics. Can someone give me hand.
<br />
<br />
private void draw()<br />
{<br />
if (end == 0)
{<br />
g = pictureBox1.CreateGraphics();<br />
pictureBox1.Image = bitmap;<br />
}<br />
<br />
g.DrawRectangle(new Pen(border, (int)n_size.Value), startX, startY, endX - startX, endY - startY);<br />
<br />
if (end == 1)
{<br />
<br />
bitmap = pictureBox1.Image;
<br />
} <br />
}<br />
<br />
TNX
|
|
|
|
|
Bitmap class has several constructs. Choose the one that meets your needs
|
|
|
|
|
A snippet of code would be helpful.
|
|
|
|
|
|
electriac wrote: pictureBox1.Image = bitmap;
set
pictureBox1.BackgroundImage = bitmap
and Try to use this concept
<br />
Bitmap bm = new Bitmap(600, 600);<br />
Graphics g = Graphics.FromImage(bm);<br />
g.DrawRectangle(new Pen(border, (int)n_size.Value), startX, startY, endX - startX, endY - startY);<br />
pictureBox1.BackgroundImage = bm;<br />
bm.Save("bm.jpg", ImageFormat.Jpeg);<br />
Hope this will help
|
|
|
|
|
How to Import + Export Excel file to MS SQL Server? Write C#.
Not using MS SQL 2005 and .Net 2005.
Help me....
Thanks.
|
|
|
|
|
You can use either Excel object Model or OleDb provider to read and write from excel document. As for sql server, you can use ADO.NET
|
|
|
|