|
Dear members,
Let me put my small issue in front of you. I have a windows form like our excel sheet (spreadsheet). The only difference is, instead of excel cells i use labels. I also have menus and toolbar like excel. Like excel workspace, i also have a work space with cells (labels) inside a panel control.
Here i use panel control to group all cells under one group.
In excel we can zoom the sprdsheet area and can view some or all details at a stretch.
I would also like to have same mechanism here in my panel area (only working area).
It would be great pleasure if you can shoot your idea or help or any url's, which will help me to get out from this problem.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Here's an oddball question. I've been reading SIGGRAPH papers until my eyes bleed, but I'm still stuck. I have a laplacian pyramid, which I got from merging pyramids on several images. Now I need to restore the image from that pyramid. Every source I can find for this requires the gaussian pyramid as well, but as I've not done anything to merge those, the question is, which pyramind do I use ?
So my question is, can I merge a laplacian pyramid into the original image without requiring a gaussian pyramid as well ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I hate to see a good question go unanswered, so I'm only answering in the hopes that a pair of ignorant eyes (mine) can ask a question that'll help you find the answer.
Not having a clue what you were asking, I did a few quick searches to discover what in the world you were talking about. From what I can tell the laplacian pyramid culls information from an image, and would therefor not have everything you need in order to regenerate the original information. Is that a correct assumption on my part? If so, that may be the answer, but then you're apparently merging in some other pyramids as well. (Do they collectively have the information you need? If so, it is probably an algorithmic question, which I clearly can't help you with in this case.)
Maybe you ought to post this in the C++ forum, too? They may be a more likely group to be working in graphical image processing algorithms.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Hi group,
As this is my first mail for help.
I am developing a project in which i have to use the window media player with C# application , i am using SDK9 series.
I am facing 2 issue as
1- when the media /movie file playing finish the window comes in normal mode but i need it in fullscreen mode alwayas.
2- I am trying to loop for any file its not working
plz help asap
Regards,
Lalit Narayan Dubey
|
|
|
|
|
Lalit N Dubey wrote:
when the media /movie file playing finish the window comes in normal mode but i need it in fullscreen mode alwayas.
Instead of making it fullscreen mode, just size the window to the size of the screen
Lalit N Dubey wrote:
2- I am trying to loop for any file its not working
You can register a callback when a file ends, actually what happens is that there is a callback for state change. Write a log file of all state changes and run some files, so you get a good idea of the sequence of events. Then when the file ends, you can catch the event and start it again.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How one can impliment this idea using wmsdk9 series,
do u have any code which can help me.
well i have created a player object and if trying its full screen property its run only first time , but as the media file ends it comes in normal mode.
private AxMicrosoft.MediaPlayer.Interop.AxWindowsMediaPlayer axWindowsMediaPlayer1;
//axWindowsMediaPlayer1.fullScreen=true; gives error
Querry--
how can we retain in full screen mode for all play list or repeat.?
Regards,
Lalit Narayan Dubey
|
|
|
|
|
Lalit N Dubey wrote:
how can we retain in full screen mode for all play list or repeat.?
To reiterate: DON'T go full screen, go on a window under your control, and make THAT full screen.
|
|
|
|
|
I have an object that I am getting from an Excel cell range. I can look at it in the debugger, its an array of arrays (of objects I think). I want to store this in a variable, but I dont know how to cast it!! I DO know the size of the array of arrays (both, i am completely aware of the dimensions of this object.)
Can somebody please help?? So you can see, here is what I have currently but it throws a cast exception:
cellR = workS.get_Range("A" + curRow, "F" + curRow);
Object theLine = cellR.get_Value(System.Type.Missing);
Object[][] theOtherLine = new object[1][];
theOtherLine = (Object[][])theLine;
It does so at runtime.
Cheers!
Jim
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
Object[][] is a jagged array. Perhaps you need Object[,] ??
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Wow, thank you! How is that handled differtly in memory? Why do both of those exist?
Cheers,
Jim
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
Jagged arrays is simply an array of arrays, while a multidimensional array is truly one array with multiple dimensions. Jagged arrays can have different dimensions for each row in the first dimension, for eg, whereas multidimensional arrays always have the same number of dimensions.
int [][] x = new int[2][];
x[0] = new int[5];
x[1] = new int[10];
...
int [,]x = new int[2,10];
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi all,
I'm having a problem using class casts. I'm storing an ArrayList inside a DataTable, and when I want to retrieve the list, I get an InvalidCastException. Here is my code:
using System;<br />
using System.Data;<br />
using System.Collections;<br />
<br />
class CastTest {<br />
const string COL = "test";<br />
static void Main() {<br />
Console.WriteLine("CastTest");<br />
ArrayList list = new ArrayList();<br />
string str = "Hello world";<br />
list.Add(str); <br />
Console.WriteLine("arrayList created"); <br />
DataTable table = new DataTable();<br />
DataRow row = table.NewRow();<br />
table.Columns.Add(COL);<br />
table.Rows.Add(row);<br />
row[COL] = list; <br />
Console.WriteLine("table created"); <br />
object resultObj = table.Rows[0][COL]; <br />
Console.WriteLine("resultObj: " + resultObj); <br />
ArrayList resultList = (ArrayList)resultObj; <br />
string resultStr = (string)resultList[0];<br />
Console.WriteLine(resultStr);<br />
}<br />
}
The second last WriteLine statement prints: "resultObj: System.Collections.ArrayList". I seem to be retrieving the ArrayList as an object, but I'm unable to cast it. Why?
Thanks in advance.
Cheers,
Michael
|
|
|
|
|
I ran the above code, and as I suspected, the arraylist is having it's 'tostring()' called as it goes into the table. You don't have an arraylist, you have a string which says 'System.Collections.ArrayList'.
I doubt you can shove arrays into a cell of a table.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
With the help of a workmate, I've resolved the issue. The quirk was in the Add method of the DataColumnCollection class (which holds the cells for the rows). The writers of the method, in their infinite wisdom, convert the input value to a string before adding it. This is default behaviour. It can be overridden by creating a custom DataColumn to hold the type of the input data. I'm including the code which now works.
using System;<br />
using System.Data;<br />
using System.Collections;<br />
class CastTest {<br />
const string COL = "test";<br />
static void Main() {<br />
Console.WriteLine("CastTest");<br />
ArrayList list = new ArrayList();<br />
string str = "Hello world";<br />
list.Add(str); <br />
Console.WriteLine("arrayList created"); <br />
DataTable table = new DataTable();<br />
DataColumn dC = new DataColumn(COL, list.GetType());<br />
table.Columns.Add(dC);<br />
DataRow row = table.NewRow();<br />
table.Rows.Add(row);<br />
row[COL] = list;<br />
Console.WriteLine("table created"); <br />
object resultObj = table.Rows[0][COL]; <br />
Console.WriteLine("resultObj type: " + resultObj.GetType()); <br />
ArrayList resultList = (ArrayList) resultObj; <br />
string resultStr = (string)resultList[0];<br />
Console.WriteLine(resultStr);<br />
}<br />
}
I guess I should be reading the documentation more closely so that I would be more aware of "features" like this
Thanks for the replies. Regards,
Michael
|
|
|
|
|
Can somebody tell me how to escape the semicolan character in C#.
|
|
|
|
|
Use the @ character before the opening double-quote of a string, such as:
string myName = @"My name is ; Ashok Dhamija";
label1.Text = myName;
This will correctly show the string alongwith the semi-colon character. Once you use the @ character as above, there is no need to further add any escape characters in the string.
Edited on 25 April:
The @ character will obviate the need for using the escape character while defining a string with any sort of characters used in it (whatsoever, whether otherwise requiring an escape character or not)including semi-colon (though a semi-colon does not require an escape character as pointed out by leppie in the next message)
|
|
|
|
|
|
Connection.close and Connection.dispose, which one is better?
Can someone tell me which one should I use?
Thanks in advance.
|
|
|
|
|
Assume nothing. If you want to close it, close it. If you want to dispose of it, close it and then dispose it. Better yet, the using keyword will dispose of it for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Neither. The methods are used for different purposes entirely.
Calling .Close() will close the connection, but leave the object available so it can be reopened.
Calling .Dispose() will close the connection and destory the object, tagging it for GC.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Destroy the object and tagging it for GC? I don't agree, Dispose can only release managed/unmanaged resources, how does it make it eligible for GC? GC only checks for the reachability of objects, AFAIK and calling Dispose doesn't help in getting it GC'ed.
Generally, Close and Dispose are supposed to do the same thing. What connection object are you talking about? In case it is an SqlConnection, the MSDN doc clearly says "If the SqlConnection goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling Close or Dispose."
BTW, remember about the other thread where we were discussing about connection pooling. The MSDN doc for the Close method says "It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled.". So obviously, if you use connection pooling, pooled database connections remain open.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
My mistake! RectalCranial Inversion...
In connection pooling, you're right, the connection remains open. But it has it's appropriate uses. A single user application is not one of them. In the case of a Web Site, on the other hand, connection pooling is a beautiful thing, because connections must be recycled quickly to maintain performance for thousands of page fetches and database accesses per second. A single user application simply doesn't need that kind of performance, (and I'll add the obligitory "except in special cases" here.)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Senthil,
Is connection pooling turned on by default?
On the other hand, use the Close method or the "using" would be the right way, according to MSDN doc. Am I right?
I find something else from MSDN "Dispose method calls Close, and returns the SqlConnection to the connection pool"
It is very confusing.
|
|
|
|
|
Yes, connection pooling is turned on by default.
You don't need to worry about it though, you just call Close or Dispose on the connection, either direcly or through the "using" statement. The framework takes care of putting the object back to the pool (if connection pooling is on) or really closing the connection (if connection pooling is off).
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hey!
I have the folowing string
"\nHEY\r\nThis Test\r\n\nTest running in OS\r\n\nRE: Test 38"
When adding this to a richTextBox it shold look somthing like this
-- START --
HEY
This Test
Test running in OS
Re: Test 38
-- END OF STRING --
But instead it ends up like this
-- START --
HEY
This
Test
Test runnin
g in OS
RE:
Test 38
-- END OF STRING --
How is this posible?
The string is added by using invoke to the richtext box
<br />
rtIncomeLogg.Invoke(new DelegateAddDataToLogg(addData), new object[] { this, data });<br />
data is the string.
<br />
private void addData(object inSender, string inData)<br />
{<br />
try<br />
{<br />
rtIncomeLogg.AppendText(inData);<br />
<br />
rtIncomeLogg.Focus();<br />
rtIncomeLogg.Select(rtIncomeLogg.TextLength, 1);<br />
rtIncomeLogg.Select();<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("Error in " + this.ToString() + " - addData : " + ex.Message);<br />
}<br />
}<br />
<br />
Any ide?
Best Regards
SnowJim
|
|
|
|
|