|
Hi,
How can i draw a rectangle and ellipes in a user control or in a bitmap without erasing the background, also i need to able to change the thickness and color.
Can i get a simple exapmle?
Thankyou
YPKI
|
|
|
|
|
There are hundreds, if not thousands, of 'Drawing/Sketching' articles, both here on CodeProject and elsewhere.
Search around!
When you find one you like, have a go at altering it to suit.
If you get stuck somewhere whilst doing that, then come back here with a specific problem.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
pwm1964 wrote: I don't run into all the gotchas associated with applying the wrong techmology
In that case you might want to start with a spellchecker.
Just kidding. Now to seriously answer your question. Is that your idea of requirements? Really? If you think what you posted qualifies as the entire set of requirements applicable to the question you posed, then there is nothing here anyone can do to help you, try as they might.
pwm1964 wrote: I want to start off on the "right" path
The right path, always has been and always will be, to study the techmologies you need to use so that you understand them well enough to use them correctly, period. The fact that you posted this question in an internet forum is a contradiction to your statement.
But good luck anyway
|
|
|
|
|
|
Hi,
I had small application of BHO through which I can get all the HTML Elements of a webpage through DwebbrowserEvents. but when I click an anchor element which has attributes href and target, say target = "new" and href = "efiling/NewFormsFees.pdf", the newwindow is opened, but unable to get the newwindow handle, I mean if I perform any operation on webbrowser.Document, these reflects on old window but not on newwindow in which PDF file is opened. How can I get access of newwindow in which pdf file is opened?
|
|
|
|
|
I wrote following C code in notepad;
//Test.c File
__declspec (dllexport) int MyFunc (void)
{
return 5;
}
And compile on command prompt using with Borland C++ 5.5.1 compiler with following command;
bcc32 -tWD Test.c
And use in C#.NET 2008 with following code;
[DllImport("Test.dll")]
static extern int MyFunc();
private void button1_Click(object sender, EventArgs e)
{
int str = MyFunc();
}
BUT I GET ERROR!!! Entry Point Was Not Found.
What can I do???
|
|
|
|
|
C# isn't a procedural language, but an Object Oriented language. This is what an 'empty' console application looks like;
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
There's a Button1_Click , so I guess you want to build a Windows-application. I suggest you download SharpDevelop and use that to create your Windows application. You can use notepad to inspect the source that it generates
I are troll
|
|
|
|
|
Or maybe he posted a snippet instead of All of his code..
|
|
|
|
|
That might be, we'll find out when he (or she, or they) answers
--edit--
-tWD -> creates a DLL and there's no exception reported on the compilation of the Borland C library.
It would help to know where the error occurs (on start of the .NET project, or when calling the library)
I are troll
modified on Monday, March 23, 2009 10:10 AM
|
|
|
|
|
I get error when I call function on C#.NET application.
|
|
|
|
|
the error occurs in c++ code not in c#(test.c), your library doesn't have main library entry point
please read how to create dynamic library in windows
read this[^] first as reference
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
when i click that linkbutton any file will download from db
|
|
|
|
|
OK. And the question is?
जय हिंद
|
|
|
|
|
Unfortunately for you the subject line does not support newline characters and the rest of my message can not be displayed
|
|
|
|
|
Hi:
Can anyone suggest a good source code arranger/formatter that works with C#?
It must be able to create regions using a defined logic and lots of code formatting options.
I have looked at NArrange (which looks great), but I can't seem to get my head around its configuration options
Thanks in advance,
Martin.
|
|
|
|
|
I am calling a C++ dll in C# code. The called function takes a 2 dimesnsional array but gives the follwoing error when the values are to be printed from the C++ code. The code snippets are attached below.
-------------------------------------------------------------------
"An unhandled exception of type 'System.AccessViolationException' occurred in Utility.exe
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
-------------------------------------------------------------------
The DLL import function is as follows:-
[DllImport("ClusteringDLL.dll", EntryPoint = "?getdata@CClusteringDLL@@QAAXQAPAM0H@Z", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
public static extern void getdata([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, SizeConst=4)] float[,] dx, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, SizeConst=4)] float[,] dy, int it);
-----------------------------------------------------------------
The C++ function is as follows:-
CLUSTERINGDLL_API void __cdecl CClusteringDLL::getdata(float *dxm[], float *dym[], int s) //function for getting the data from user
//CLUSTERINGDLL_API void __ CClusteringDLL::getdata(float (&dxm)[Size][2]) //function for getting the data from user
//CLUSTERINGDLL_API void __thiscall CClusteringDLL::getdata(int dxm) //function for getting the data from user
{
std::cout<<"Enter the number of clusters";
std::cin>>numClust;
std::cout<<std::endl<<"Enter the number of points";
std::cin>>numPoints;
if (numPoints==numClust)
{
std::cout<<std::endl<<"Reenter the number of points as the number of points=number of clusters";
std::cin>>numPoints;
}
for(int i=0;i<=s;i++)
{
std::cout<<std::endl<<"X Co-ordinate:"<<dxm[i][0];
}
}
---------------------------------------------------------------------
The code throws the error when one tried to print the X co-ordinate as shown on the last line of the code.
-------------------------------------------------------------------
And the calling function in main is as fiollows:-
Dllc.getdata(dx, dy, it);
I have tried different calling conventions as well as different ways of writing the signature of the function. But the same error comes up. Any qucik help will be highly appreciated.
Regards
Amit
|
|
|
|
|
First ensure that it is working when called from C++.
My doubts are on the line
for(int i=0;i<=s;i++)
I guess it should be
for(int i=0;i<s;i++)
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes the code does run and it even prints value which is in the C++ code. It prints the 0th element of the x array as 0 which is wrong and then throws the error.
Regards
Amit
|
|
|
|
|
Hello all,
Im looking for some opinions and/or suggestions on the best way to handle file uploading and downloading to/from a server with my application.
At the moment I have implemented an FTP solution to allow files to be transfered to and from the server, this seems to be working fine but I am not sure if i have chosen the best option for the task (in terms of performance and reliability). I know it is possible to store files in an SQL database (which I am currently using for data storage), but avoided this approach as I didnt want to pack my database with file storage.
Can anybody offer an opinion on a 'best practice' route for this kind of functionality? or perhaps offer another alternative I could look into?
Im not completely against SQL storage if anyone can put a good argument forward for it? After all I just want wants best for my offsprings
Thanks
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
have you tried remoting? that would really help you to write codes to upload and down load files using a file system not the SQL server
|
|
|
|
|
Thanks for your reply
Have been looking at 'C# Remoting' and have a found a few articles with varying approaches to how to acheive a file upload/download system. Though all of them (of the ones i looked at) seem to require a server-side application. Something I was hoping to avoid using.
Is this the idea you had in mind? i.e. creating a server app and communicating with that for file transfers
Also where you thinking of any perticular method, like using the System.Runtime.Remoting classes, or was your suggestion just for a general remoting solution?
Either way thanks for the suggestion, has been interesting to read about, but like I said, I want to avoid creating a server app if possible
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
yeah!! you would need a server app to achieve what you are looking for in remoting. it's not at all complicated though, you will have more control over the transer as well among other benifits.
I would recommend "Wrox Press-Professional C#" book,
Good Luck
|
|
|
|
|
Hi everybody.
Maybe some of you have better experience with the Sync Framework than I have. I am trying to sync an XML file and some images between my desktop and a PDA, using C#.
I saw there is a sample of using Microsoft Sync Framework with a device, but it uses Web Services and I would very much prefer to do without those. I already built a .Net Framework 3.5 C# Windows Forms Application and a similar thing (3.5) on the Mobile device. Do you think it is possible to use WCF or SyncFramework to get some files Desktop <-> PDA?
Thank you for your time ::- ) !
|
|
|
|
|
The project "aa.mpp", the other project "master.mpp".
1.I open the "master.mpp"
2.select "Insert->Project"
3.select "aa.mpp",
4."aa.mpp" has been add into "masther.mpp"
How to finish above funtion by coding.
Thanks all
|
|
|
|