|
How can i display picture on button tool ?
Well dragging picture box over button tool doesnt solve this as i want button click option aswell. Its just instead of writing text over button i want picture .
Thanks
|
|
|
|
|
PictureBox.Enabled=false;
Luc Pattyn
|
|
|
|
|
You can specify a bitmap for a button, or there's a bitmapbutton control ( and you can specify a bitmap for that )
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi all,
I am trying to get around with this problem i.e. How can i create many sub forms within one main parent form.
My application consist of different games, so now i want to have something like this ->
A select option over the left of the form, say i put few buttons. Now with each click of button it should give me new form within the same form but the option of buttons should be there in each form to revert back to the last form or to go to next form ...Say previous and next button type...
I have googled but not getting any appropriate solution.
Any solution to my problem ?....
Thanks a lot in advance.
|
|
|
|
|
|
What about TabControl with TabPages?
All the best,
Martin
|
|
|
|
|
Based on this can i ask how the option forms with a listview changing the panel on the right are designed? SOmething like e-mule options?
I know how can it be done, i just want to ask how they visually design it. Can a form be placed inside a panel for example?
|
|
|
|
|
hey guys, currently I'm working on a project for myself that contains alot of entery forms that are basically the same (text boxes, code ...), but of course they each are connected to different tables and they have different names, so I want to creat one and just duplicate it for the others (just change some names !) I tried to use Inherited Forms but I couldn't change anything there ! can you give me a hint !
Thanx alot
Mr.K
|
|
|
|
|
Hello,
Seem that your controls on the base form are private members.
You could change them to protected or public than you would be able to change their properties.
All the best,
Martin
|
|
|
|
|
Maybe you dont need different forms at all, you might just come up with one that adapts itself
to a range of requirements, and then you create many instances of it.
Once you get it to work, it would save a lot of code and hassle, and it may open up a range of
new possibilities too.
I got used to create most dialogs programmatically, my typical application has only two forms
that resulted form Visual Designer: the main form, and the About form. Everything else, I
tend to program (based on some dialog classes I created over time, and keep expanding when
the need arises).
Luc Pattyn
|
|
|
|
|
OK, I am really stuck.
I have a form with a button. I click the button and I want to display a dialog box.
I created the dialog box using the age old inheritance stuff. That is:
public class MySpecialDialog : System.Windows.Forms.Form
I customize the form to my hearts content. Glory be. How simple can this be?
But when I try do instantiate this customized dialog:
private WindowsForms.MySpecialDialog aDialog;
aDialog = new MySpecialDialog();
and then show the dialog in the button click routine:
aDialog.ShowDialog();
I get a form that is just a blank form.
Could someone tell me what I am missing here?
Thanks in advance, Vern
|
|
|
|
|
Is the dialog of type dialog?
Also make sure the constructor calls the InitializeComponents method of the WYSIWYG part won't work right. Also ...
<br />
if(aDialog.ShowDialog() == DialogResult.OK){}...<br />
will let you use it.
File Not Found
|
|
|
|
|
Ennis:
Thank you very much for your response. Calling InitializeComponenets in the constructor did the trick. I really appreciate your help.
Vern
|
|
|
|
|
Also, for future reference, the VS Desiner will often drop events on accident. So if your controls ever stop responding to user events check the events list.
File Not Found
|
|
|
|
|
I do believe I know what your talking about. I remember working on a project where I know I had an event handler and one day it was just gone. Now I know it was not my imagination.
Thanks again.
|
|
|
|
|
Ok, thanks to some help, I think I have what I need to extract the data I need from a HUGE (900Mb-2Gb) text file.
Now I need to store the huge volume of data so that I can process it. Its only 5 fields, but lots of entries. I will need to group the data based upon various fields so I can bin and plot it. I will also need to do things like MIN/Max/Average of one field for groups of another field.
So the question is what type of data structure do I put it into? Any suggestions?
David Wilkes
|
|
|
|
|
amatbrewer wrote: So the question is what type of data structure do I put it into? Any suggestions?
A database. It is designed specifically to hold and process large volumes of data like this.
|
|
|
|
|
and with several gigs of data, that DB should be something other than access.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Ie every time your app runs the data is different I wouldn't recommend a database. When parsing the national do not call registry I wrote a simple binary search to traverse the massive mulit-gig file to return entries by area code.
Putting it into SQL Server took 2 days. Based on the need and my knowledge of algorithms no db was a better answer.
Of course depending on how complicated you get will depend on when a db becomes a valid choice.
File Not Found
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Ie every time your app runs the data is different I wouldn't recommend a database.
Thanks!!! I had not thought of that part. The data will be 100% new each time. I basically need short term data storage that I can build and access quickly, and that is gone once I am done.
We are only talkign about 6 fields (all numbers with one being in Octial format). But the quantity of data is Huge!
I am working on creating an object that will read the file, parse out the data I need, and store it so I can perform functions on the data.
This is an entirely new area for me and I am open to any ideas.
David Wilkes
|
|
|
|
|
Use streams and only persist the results to permanent storage. You may have to fiddle if you havent taken a good Data Structures and Algorithms class but it can be done reasonably fast.
File Not Found
|
|
|
|
|
I am all getting confused. I searched on the net but got more. Basically, when and where do we use class as an Interface, abstract class and static Class or methods. What are the advantages.
I know that Interface doesn't have any implementation it just have methods declaration.
Static class doesn't get instationed.
Thanks
|
|
|
|
|
If you want to define multiple items that must be implemented in a class to guarantee an operation, then use an interface. This means that you can refer to the class that instantiates it without needing to know what the class is. As an example, suppose that you have developed a database agnostic application and you want to read a DataReader, then you could do this:
public class AgnosticReaderImplementation
{
public void Fill(IDataReader dr)
{
while (dr.HasRows)
{
...
}
}
}
This way, the code outside your class could pass in a SqlDataReader, or an OracleDataReader and so on.
An abstract class is normally the base for something else, so it defines the basics (or common options) for your implementations. It is a relatively high-level abstraction that you must inherit from to do something useful. Consider this very trivial example.
public abstract IdBase
{
private string _id = string.Empty;
protected object lockObject = new Object();
private bool _isDirty = false;
public Id
{
get
{
lock (lockObject)
{
return _id;
}
}
set
{
lock (lockObject)
{
Changed(_id, value);
_id = value;
}
}
}
private void Changed(object old, object change)
{
if (old != null && !old.Equals(change))
isDirty = true;
}
public bool IsDirty
{
get {
lock (lockObject)
{
return _isDirty ;
}
set {
lock (lockObject)
{
_isDirty = true;
}
}
}
}
public class DatabaseHandler : IdBase
{
}
This means that in the class DatabaseHandler there certain items that have already been applied by virtue of being in the class IdBase. You can't instantiate IdBase directly, because it isn't really very useful on its own, but it does give you a good base for using in other classes.
Implementing things as static means that you don't have to instantiate a class to call a method. This is useful, for instance, when you want to do something like writing to a log. Suppose that you have a class called Utility which implements a static method WriteToLog, then all you have to do in your code is call Utility.WriteToLog to call it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
An interface is a contract that a class has to fullfil to implement it. You can write code that uses an interface without first having a class that implements it. This is for instance used in the framework to allow for custom comparers.
An abstract class is a class that you can not instantiate, only inherit from to create other classes.
A static class is just a container for static members. You can use it as a container for things like global settings or factory methods that only create objects of other classes.
---
Year happy = new Year(2007);
|
|
|
|
|
I was wondering. I see how complicated the messages on this board are. That I am wondering where I can turn for my insignificant questions as a programmer who has less than 1,000 lines of code in experience.
I find Visual C# 2005 Express Edition very nice, I got a book about it. And that in my second attempt to make a program to multiply matrices and vectors by operators I got a problem which is so weird because according to the book I read this shouldn't be a problem at all. To write a method to create an instance of a class you use a method with the same name as the class, simple, but I got the error message that it wasn't allowed because it caused a name problem.
Wouldn't it be a good idea to add to this board a group or category for beginners?
Ranger
Beginner.
|
|
|
|