|
You can't do it with the plain old MessageBox class. If you want to have specially formatted text like that you're either going to have to make your own class or look around CP or the web for one that someone has already made.
- monrobot13
|
|
|
|
|
Thank you so much, gurus!
Khang Nguyen
|
|
|
|
|
Hi!
Can a windows form container control watch all input going to its components?
My use case:
I have a panel with a textbox inside. I need to know if the mouse was clicked inside that panel, even if it was clicked inside the textbox area.
Thanks!
|
|
|
|
|
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
|
|
|
|