|
I'm not sure if this is what you want, but you could simply setup the event handler for the textbox click to call the panels click event
- monrobot13
|
|
|
|
|
The thing is that inside that panel can be _anything_, varying at run-time. So I do not want to (or can’t) delegate to the child controls the detection and raise of the event.
|
|
|
|
|
I can't believe it. In the newest version of .NET, the tabcontrol still looks awefull, why don't they fix it at the MS House, it shouldn't be that much pane, or is it?
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
If you're looking for a nice TabControl (like the one in VS.NET) I'd suggest checking out the Magic Library at http://www.dotnetmagic.com[^]
- monrobot13
|
|
|
|
|
I know, but it seems so simple to fix
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
While MS seems to walk both sides of the fence sometimes, they aren't their to do the development for everyone. That's why they built VS in the first place - so people could develop stuff. Most of the controls MS provides are pretty low in functionality anyways - the TabControl is pretty nice for a freebie. And as you said - it's not a tough fix - so go do some development.
|
|
|
|
|
Maybe you can join our project, Universal GUI Library[^]. We are trying to create an improved control library for C++ and .NET.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Using the Media Player activex control with the latest version of directshow sdk I can't figure out how to play the file. Setting the filename is apparently done with the Url property. Also can't figure out how to seek...set the media player position.
|
|
|
|
|
|
OK but I'm trying to get away from programming directshow or using s/o else's wrapper. I'd prefer to use the MS Media Player control.
|
|
|
|
|
I know this is probably a trivial question, but would you change the volume level of the system? I haven't found any infomration on the net about it. If anyone can give me a hand I would appreciate it. I have tried using the BasicAudio filter from the Interop.QuartzLib but when I change the audio object.Volume and set it to an integer it crashes. Thanks in advance. fdsaf
Ripsi
|
|
|
|
|
I know this is probably a trivial question, but would you change the volume level of the system? I haven't found any infomration on the net about it. If anyone can give me a hand I would appreciate it. I have tried using the BasicAudio filter from the Interop.QuartzLib but when I change the audio object.Volume and set it to an integer it crashes. Thanks in advance.
Ripsi
|
|
|
|
|
Hi All,
I'm the first to admit that I'm not to good at the design aspect of programming. So first I was wondering if anyone had any good suggestions on books that I could read that would help out with this topic. All comments are appreciated.
Second, I have a design question. I'm currently writing a program that uses a tabcontrol and I'd like end user to be able to dynamically add/remove/insert tabs into the program, now the problem is I'm not sure of the best way to implement this. I did design one version that used a checked listbox (in an options form) to allow the user to add/remove/insert "items", when the user clicked ok I would check what "items" had a check and create the tabs for them. Where I ran into a problem was that even items without a check need to be kept in memory so that when the user opens the options again they are still there (and it they check them they should be created, and vice versa) the other problem is that each tab has to have some data associated with it. What I did in the first design was have an array that I threw back and forth between the two forms, but that proved to be a very poor design. I'm just wondering if anyone has any better design that I could try I would really love to hear it. Any ideas or simple things to try would be extremely appreciated.
Thanks All!
- monrobot13
|
|
|
|
|
When you ask for books on the design aspect of programming, do you mean the design of the program itself (architecture) or do you mean the interface design (aestetics) ?
If you mean the design of the program itself (architecture), then you probably need to get going in UML. Though...I can't say I know a good book on it. Design Patterns is another topic to get familiar with...a good book on Design Pattersn is this:
Design Patterns: Elements of Reusable Object-Oriented Software
by Gamma, Helm, Johnson, Vlissides
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
KingTermite wrote:
When you ask for books on the design aspect of programming, do you mean the design of the program itself (architecture) or do you mean the interface design (aestetics) ?
Whoops, I suppose I should have been clearer on that. I did mean architecture design and thanks for the book reccomendation.
|
|
|
|
|
Hello monrobot13,
First, I wonder if is there a way to hide or set "visible" property for each tab item?
Secondly, create a seperate class for each tab item. Instantiate an instance from each class for storing and updating data specific for each tab item. Do not destroy these objects until you terminate your app?
Just my wild ideas,
Hope you get good tips from others
Khang Nguyen
|
|
|
|
|
Khang Nguyen wrote:
First, I wonder if is there a way to hide or set "visible" property for each tab item?
The tabs do have a visible property, but setting it to false doesn't hide the tab. The only way I've found to make it hide is to complelety remove it from the control.
Khang Nguyen wrote:
Secondly, create a seperate class for each tab item. Instantiate an instance from each class for storing and updating data specific for each tab item. Do not destroy these objects until you terminate your app?
Thats a pretty good idea. Do you think it would be a good idea to then hold these items in an array for easy access?
- monrobot13
|
|
|
|
|
Thats a pretty good idea. Do you think it would be a good idea to then hold these items in an array for easy access?
That sounds like a good idea to me. (Khang Nguyen)
|
|
|
|
|
I want to recreate this this section of code for a windows application.
protected System.Web.UI.HtmlControls.HtmlInputFile Upload;<br />
<br />
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
if (Upload.PostedFile != null)<br />
{<br />
HttpPostedFile File = Upload.PostedFile;<br />
<br />
byte[] Data = new Byte[File.ContentLength];<br />
File.InputStream.Read(Data,0,File.ContentLength);<br />
<br />
int i = 0;<br />
<br />
for (i=0;i<Data.Length;i++)<br />
{<br />
TextBox1.Text += Data[i].ToString(); <br />
}<br />
<br />
object[] obj = new object[1]; <br />
<br />
obj[0] = Data;<br />
<br />
<br />
<br />
SqlHelper.ExecuteNonQuery(connectionString,"sp_img",obj); <br />
<br />
}<br />
<br />
}
Any help would be greatly appreciated
Da Intern
|
|
|
|
|
I haven't tried the code that i am going to write but i think it will work.
You want to store binary data in a db field if i guessed write, so:
<br />
System.IO.Filestream newf = System.IO.File.OpenRead(filename);<br />
byte[] data = new byte[newf.length];<br />
newf.Read(data,0,newf.length);<br />
<br />
<br />
<br />
<br />
for (i=0;i {<br />
TextBox1.Text += Data[i].ToString(); <br />
}<br />
<br />
object[] obj = new object[1]; <br />
<br />
obj[0] = Data;<br />
<br />
<br />
<br />
SqlHelper.ExecuteNonQuery(connectionString,"sp_img",obj);
Try it i think it will work
From Greece:
Dimitris Iliopoulos
dimilio@yahoo.com
|
|
|
|
|
is it possible to carry out SQL format selects directly onto datasets?
For example lets say I have a dataset with the following format :
<br />
col1 col2 col3 col4<br />
row1 a b c d<br />
row2 e f g h<br />
row3 i j k l<br />
Is there a way to run the following SQL command :
dsResult = SELECT col2, col3, col4 FROM dsSource.Tables[0] WHERE col1 = 'a'
Which would return the following into dsResult
<br />
col2 col3 col4<br />
b c d<br />
|
|
|
|
|
<br />
DataRow row = dsSource.Tables[0].Rows.Find( new object[] {'a'} );<br />
Good Luck
Alex Kucherenko
|
|
|
|
|
Unfortunatly I probably over simplified things, so although the code you posted works perfectly it wont work in my code.
This is the scenario I am up agaisnt. I have a populated dataset with a single table, multiple rows, and multiple columns.
I need to add a column to this dataset but it has to be at position 7 (of 40), i.e. not at the end as columns.Add() would do.
The reason for asking about the possibilites of using selects is that the only way I can imagine doing this is to :
1) foreach through each row in the source dataset
2) Select all the data into a comma seperated string.
3) Inserting the new column (techincally another '',) where needed.
4) Build a new datarow from the string.
5) Insert the new datarow into another dataset
This all seems way to over complex for what originally seemed like a simple problem. I am sure I am missing something here put I cant put my finger on what it is.
|
|
|
|
|
why do want the col in a specified position? you can create a Dataview but i don't think this is the best solution .If you want to show your data in a datagrid you can create a Tablestyle with specified columnstyles for this grid, so you can put the cols in specified positions look this piece of code:
System.Windows.Forms.DataGridTableStyle tempstyle=new System.Windows.Forms.DataGridTableStyle();
tempstyle.AllowSorting=true;
tempstyle.GridLineStyle=System.Windows.Forms.DataGridLineStyle.Solid;
tempstyle.MappingName=[tablename];
System.Windows.Forms.DataGridColumnStyle tempcol;
tempcol=new System.Windows.Forms.DataGridTextBoxColumn();
tempcol.HeaderText="Κωδικός";
tempcol.MappingName=[fieldname];
tempcol.NullText="";
tempcol.Width=50;
tempstyle.GridColumnStyles.Add(tempcol);
In this way add the columns you want in the position you like.
From Greece:
Dimitris Iliopoulos
dimilio@yahoo.com
|
|
|
|
|
OR
<br />
DataView view = new DataView( dsSource.Tables[0], "col1 = " + ... Value ..., "", DataViewRowState.CurrentRows );<br />
Good Luck
Alex Kucherenko
|
|
|
|