|
Hi,
does anybody know a printer controller for Visual 2003?
I would like to make a function that will print directly after clicking on a button.
Thanks,
Oren
|
|
|
|
|
You actually expect us to view *all* of those?
Aside from the fact that they appear to have been stolen from traincert, why would I want to do that?
The posting is almost certainly a copyright violation.
My idea is that you should remove the postings and delete you post before the publisher of those training videos sues you, or charges you with theft.
|
|
|
|
|
Hello,
(call it my laziness or my haste that I am post a question straight here instead of consulting the reference books)
I have a point class in my project called FoxPoint, can I make a 2D array like this:
FoxPoint[,] strokes = new FoxPoint[4, 10];
It's giving me strange errors:
Error 1 Inconsistent accessibility: parameter type FOX_CSharp.FoxPoint[*,*]' is less accessible than method 'FOX_CSharp.ConComp2Form.DrawBoundries(FOX_CSharp.FoxPoint[*,*])' C:\...\FOX_CSharp - Integrated - Aug 05 06\FOX_CSharp\ConComp2Form.cs 195 21 FOX_CSharp
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
You have something wrong with "public" and "private". Change all to private or change all to public to solve it. See this:
http://www.dotnet247.com/247reference/msgs/7/38448.aspx
|
|
|
|
|
I thought the same when I first looked at the error message, but the funtions is public. Do I need to put 'public' before 'class' as well?
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
DrawBoundries is public , but takes an argument FOX_CSharp.FoxPoint[*,*] that is less accessible (e.g. private). To call the function, you actually need a FoxPoint , so the funciton can be called only as if it were private.
You need to make FoxPoint public, too.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
How to disable outlook security setings and avoid security warnings, dialogs, messages, alerts etc? So that my service keep on working without users' interactions.
|
|
|
|
|
I'm not sure that you can. I've not found a way
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You can't. You'll have to use a 3rd party library, like this[^], to do it for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Not meaning to sound cocky but doesn't this mean you can do it? If the third party company has done it, or do you mean it can't be done in C# / .NET?
Regards
Malc
*********************************************
|
|
|
|
|
Noone's figured out how they do it yet, but I suspect they rewrote the API's Outlook is using, and left out the Security junk. That could be done in any language, but it's a lot of work just to get around that warning.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
And how do they do it? any clue...
|
|
|
|
|
If I knew that, I'd tell you, now wouldn't I?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want to to get to know how to develop a simple parser to analyse simple c# code .
e.g:Chech a for loop in a sample code to verify that it is syntacticaly :-correct.
Guneendra
|
|
|
|
|
|
hey
i am developing a web application using asp.net, but coding in C#.
i need to insert into my database (sql server 2000/access). how shud i do it.
i have two textboxes.. watever the user enters in it, it shud be added in a particular table.
Kunal Piyush
|
|
|
|
|
You take the values and run the query through an SQLCommand Object, that's the simplest solution...
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
i coded a bit.. but now sql database i showing an error if i keep the field "Username" as a primary key.
firstly the data is entered in a very ad-hoc fashion.. there is a row empty at the top...data entered in between two rows which are already filled with data..
and if i delete some data,then i get the error as
"Another user has modified the contents of the table,the database row ur modifying no longer exists in the database....... violation of PRIMARY KEY constraint...."
THE CODE:-
try
{
SqlConnection conn = new SqlConnection("server=(local);" +
"database=path;" +
"connection timeout=3;" +
"Trusted_Connection=yes;" +
"Integrated Security=true;" +
"user id=sa;" +
"password=");
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "Insert into login(Username,Password) values('"+uname.Text+"','"+pass.Text+"')" ;
SqlDataReader dread = cmd.ExecuteReader();
if (dread.Read())
{
failed.Text = "Could not add the user";
}
else
{
Response.Redirect("success.aspx");
}
conn.Close();
}
catch(Exception kp)
{
failed.Text=kp.Message;
}
}
Kunal Piyush
|
|
|
|
|
Hey all,
As mentioned in one of my earlier posts, I'm currently coding a class which inherits from System.Windows.Forms.Button.
My goal is to create a ShapedButton class, with a built in functionality to shape the button according to a drawing in a Bitmap object.
I do not intend to write a new UserControl, encapsulating a button.
My intension is to directly inherit the Button class.
However, the problem is that it would be immpossible to design my ShapedButton in design view, and I would have to manually write the code to InitializeComponent().
How can I use my ShapedButton in the designer?
Do I have to create a UserControl?
If that's the case, then how can I inherit Button? There's no multi-inheritance, and I would have to inherit UserControl first...
Thanks in advance,
Shy.
|
|
|
|
|
shyagam wrote: How can I use my ShapedButton in the designer?
Do NOT write any code in InitialiseComponent, the IDE recreates that code.
shyagam wrote: If that's the case, then how can I inherit Button?
You can't, as you say, once you inherit from UserControl, that's it, excepting for interfaces.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Do NOT write any code in InitialiseComponent, the IDE recreates that code.
What can I do than in order to gain the ability to design the button in the designer?
|
|
|
|
|
It's not exactly what you wan't, but it might help you out a little bit because it enables you to use at least some designer abilities. To outwit the designer do the following:
Let's say you have a class MyButton derived from Button . To place an instance, first place a usual Button Control on your form by using the designer (let's name it myButton1). In your code replace the designer generated code private System.Windows.Forms.Button myButton1; with private MyButton myButton1; and in InitializeComponent() use your own class, which results in replacing this.myButton1 = new System.Windows.Forms.Button(); with this.myButton1 = new MyButton(); . This should make the designer switch to your own data type permanently and your own properties and events should also be listed by the designer. Hope this helps.
|
|
|
|
|
Well... I didn't try your suggestion, so I can't tell you if it works...
I have found my truly beautyful solution (in my opinion at least ).
I have discovered that after inheriting System.Windows.Forms.Button, the icon of my file in the solution explorer, changed itself to a component's icon.
So I started reading about components, and finally I've discovered my solution:
A component is defined as a class which implements the IComponent interface, or inherits from a class which directly/indirectly implements the IComponent interface.
So I checked the heirarchy of the Button class, and there it was!
Button indirectly implements the IComponent interface.
So I kept on reading, and found that with some simple attributes added to your class, your class can have what is called a "Design-Time Support"![^]
Thank you all again.
I hope this info would help others to achieve similar goals.
|
|
|
|
|
Hi
I was just searching for that solution - great !!!
My problem was that I could not open the designer after I derived a class from TreeView (I got HTML errors in the designer) .
Now I added the following property to the derived class:
[Designer(typeof(SimpleControl.Design.SimpleDesigner))]
then I reopend the form in designer - in voala the garphic was displayed !
Thanks a lot for that hint!
|
|
|
|
|
the question is simply this boys n girls, ladies n gents,
how do I iterate thru all the elements of a Datagrid in a windows form (.net 1.1). thats when I take input from user. how do i know the number of rows entered in it.
thanks
Rocky
|
|
|
|