|
Hi Josh, thanks for the reply!
What I´m trying to do is read a TreeView(Folder Browser Dialog) from another program.
By reading each item´s text I can select a especific Folder.
I noticed that usual codes did not catch anything from outside my program. For instance:
SubString Text = new SubString(255);
tvItem.pszText = Text;
SendMessage(TreeHandle, TVM_GETITEM, 0, ref tvItem);
This code works perfectly if the treeview is in your application, but SendMessage returns only false if the treeview is in another application(process).
Thank you
|
|
|
|
|
I have seen tabstrip Control Visual Studio Style 2005.
Can anyone tell me how i can get tabstripControl with tabs on downside.
|
|
|
|
|
SravanKrishna wrote: Can anyone tell me how i can get tabstripControl with tabs on downside
tabControl1.Alignment = TabAlignment.Bottom;
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
|
Hi,
Can any body tell me please how can i use multi column dropdown box against a column in datagrid view. It means when i click on the button displayed on the right side of the column, then that multi column drop down be displayed.
Waiting for reply....
Regrads,
Shahid
Ever Respect the elders
|
|
|
|
|
Can someone point me in the right direction? I would like to have a button on a ToolStrip that drops down a single ToolStripMenuItem that has a TracBar instead of a standard text link. Is this possible or would this need to be done completely from scratch.
|
|
|
|
|
Hi All !
I want to get the value of the last Record (ID)From a table , for example if the Last ID=35 , how i can get the value of it from a table ?
thanks a lot .
s_mostafa_h
|
|
|
|
|
try this :
sqlDataAdapter1 = new SqlDataAdapter("select max(IdColumnName) from TableName", sqlConnection1);
DataSet ds = new DataSet();
sqlDataAdapter1.Fill(ds);
int MaxID = Int32.Parse(ds.Tables[0].Rows[0][0].ToString());
Tamimi - Code
|
|
|
|
|
I assume you're doing this because you want to then use that ID to create associated records in other tables?
If so, then write a stored proc that does the insert and then returns the ID of the record added using either @@IDENTITY or SCOPE_IDENTITY()...
In not (or not using SQL Server), then nevermind.
|
|
|
|
|
If you have added a record and want to find out the id that the record recieved:
Access: select @@identity
MySQL: select last_insert_id()
MSSQL: select scope_identity()
Getting the largest id after adding a record is a very very bad method to get it's id. It works flawlessly when you are testing the system by yourself, but in a multi user system you will get the wrong id sometimes as another user added a record at the same time. The more users, the more frequent the errors will be.
---
b { font-weight: normal; }
|
|
|
|
|
thanks for ur reply ..
atlast , do I use this ?
<br />
"select max(IdColumnName) from TableName"<br />
s_mostafa_h
|
|
|
|
|
No, not if you just added a record and want to find out what id it got. Then you use one of the queries I showed.
You can use it if you want to find out what the highest id is in the table, but that information really isn't very useful. One millisecond after you got the value, another record could be added by someone else, and the information is outdated.
---
b { font-weight: normal; }
|
|
|
|
|
Does anyone know how to safely inherit from a "Form"? When I do this my owned Form stops be robust in Design mode.
Thanks for advance.
HZ
|
|
|
|
|
hi to all,
i'm working with xml data. i extract the data from an sql server data base via a stored procedure.
the result of the executed procedure is an XmlTextReader.
i'm trying to copy the content of the into a physical file on the hard disk.
i tried two solution.
first one consist on loading the reader into an XmlDocument and save it to the disk
the second consist on a loop on the reader and creating the xml file manually.
the problem is : when the procedure brings a lot of data,
sometimes i have some tags or attributes
wrapped between two lines.
like this : >mytag first_attrib="1" second_attrib="2" third_attr
ib="3"/>
or >anothertag first_attrib="1" second_attrib="2"/> >an
othertag third_attrib="3" fourth_attrib="4"/>
you can notice that in the first example the attribute is wrapped on two lines
and in the second case the tag is wrapped on two lines
so when i tried to load the reader into an xmldocument, i got an error message.
and when i tried to loop through the reader, i also got an error when the reader
arrive to the wrapped attribute (third_attrib in my examples)
the question is how can i solve the problem of wrapped tags or attributes ?
does anyone has a solution to my problem ?
best regards and thanks in advance
fady
|
|
|
|
|
hi to all,
i'm working with xml data. i extract the data from an sql server data base via a stored procedure.
the result of the executed procedure is an XmlTextReader.
i'm trying to copy the content of the into a physical file on the hard disk.
i tried two solution.
first one consist on loading the reader into an XmlDocument and save it to the disk
the second consist on a loop on the reader and creating the xml file manually.
the problem is : when the procedure brings a lot of data,
sometimes i have some tags or attributes
wrapped between two lines.
like this : <mytag first_attrib="1" second_attrib="2" third_attr
="" ib="3">
or <anothertag first_attrib="1" second_attrib="2"><an
othertag="" third_attrib="3" fourth_attrib="4">
you can notice that in the first example the attribute is wrapped on two lines
and in the second case the tag is wrapped on two lines
so when i tried to load the reader into an xmldocument, i got an error message.
and when i tried to loop through the reader, i also got an error when the reader
arrive to the wrapped attribute (third_attrib in my examples)
the question is how can i solve the problem of wrapped tags or attributes ?
does anyone has a solution to my problem ?
best regards and thanks in advance
fady
|
|
|
|
|
Hi,
I have a UserControl that contans an image and CAN also contan text ( using DrawString()).
I have a panel that has several of these UserControls that I can move around with a mouse ( using drag-drop).
What I would like to do, however, would be to be able to rotate the UserControl : ie: left 30 degrees or right 30 degrees or even upside-down.
I see various tools using Graphics/Matrix to be able to do that within a window, but I still end up with a regular square with an image in it.
My user control is basically a button and I would like to show the button at a 30 degree angle or upside down based on other logic.
Thanks
Gary
Just for the fun of it !
|
|
|
|
|
Sounds like you're working on a fun app! Unfortunately there is no support in WinForms (or Win32 for that matter) for rotating controls. The best you could do is display images instead of the Button (user control). Since bitmaps can be rotated, you could probably, with lots of effort, make it look and feel pretty cool using images.
If you have the option, I'd say develop this app using WPF. WPF has huge support for transforms, animations, and all types of visually exciting effects. I've been studying it now for about a month and am more and more amazed by it every day!!
Josh
|
|
|
|
|
I want to run an Office Communicator inside a User Control. I do not want it to open as a new window, but instead inside my panel. This is the code I have tried:
Process comm = new Process();
comm.StartInfo.CreateNoWindow = true;
comm.StartInfo.FileName = @"C:\Program Files\Microsoft Office Communicator\communicator.exe";
comm.Start();
The problem is that the Communicator is opened, but not inside my User Control. Does someone know how to solve this problem?
|
|
|
|
|
What you are trying to do is wrong, this is conceptuelly wrong.
Try to do the communicator as an embed control to your application,
HZ
|
|
|
|
|
|
How to set endtime time to playing audio file ...
|
|
|
|
|
Hello all,
I have to develop one application in which i can capture all packet passing thru my NIC. If u want more idea about this then see ethereal[^].
Divyang Mithaiwala
|
|
|
|
|
Search in codeproject.com using a keyword "packet capture".
You will get a lot of articles there.
|
|
|
|
|
Hello stancrm,
Thanx. Actually i have search for Articles but i use different key words. And i a fail. But your key word is good.
Thanx again.
Regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Why reinvent the wheel? You can get ethereal free. It is an excellent program, plus it can insert into the network in promiscuous mode
|
|
|
|