|
you are right , my ask is incomplete !
in my app. , I want to save my record (with a sql table ),also I use A listBox for navigate between Records :
private void PopulateListBox1()<br />
{<br />
.....<br />
try <br />
{<br />
strSQL = "SELECT name,id FROM MyTable";<br />
....<br />
while (myDataReader.Read())<br />
{<br />
objListItem = new ListItem(myDataReader["name"].ToString(),<br />
Convert.ToInt32(myDataReader["id"]));<br />
ListBox1.Items.Add(objListItem);<br />
}<br />
if (ListBox1.Items.Count > 0)<br />
{<br />
ListBox1.SetSelected(ListBox1.Items.Count-1,true);}....<br />
And in For Save I use the "PopulateListBox1() Function " :
private void UpdateInfo()<br />
{....<br />
try{<br />
strSQL ="update MyTable......";<br />
.....<br />
PopulateListBox1();<br />
....}<br />
So , when I want to save a Record , immediatly the LastRecord is selected .
(ofcourse my Record is saved).
thanks !
s_mostafa_h
-- modified at 10:41 Sunday 19th February, 2006
|
|
|
|
|
Can any one tell the process how i can get the handle to the MDI client(Not MDI Child) Window using Win32 PInvoke. Any kind of suggesion will be highly appriciated.
Thanks.
|
|
|
|
|
I was wanting to make an application that can display the graphical output of various different other applications specificly built to interact with it.
Example:
The main application is showing all the needed information on the main form... but the bottom right hand corner remains blank. The user can select a specialy created "daughter app" to run in this space by using a file open dialog box.
So if i make a clock or clandar program I want selecting this file to run the clock program excecutable BUT output the clock display inside the selected area of the main appliction.
I want to do this so i dont have to keep re-writing the main application when i change the available functionality of what can be displayed in this space.. so it might start out with only a selection of clock and calander but if I write an app to show weather reports, if your buddies are online or share prices, etc that can easily just be opened and displayed in this space.
Could any one give me a pointer on where to even get started with somthing like this?
Cheers.
|
|
|
|
|
You could try writing the clients as plugins to the main application. You could then pass a reference to that blank space (Panel) to the plugin and have the plugin draw itself.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
That is the sort of thing i was angling at, but It's not a subject i have ever encountered and could use some friendly prods as to the right subjects to google or search for here or on MSDN.
Thank you.
|
|
|
|
|
Depending on whether you want it to be interactive, you could periodically take a bmp of the "daughter app" and display it in the blank space.
|
|
|
|
|
You can't really. Not without a VERY convoluted effort using techniques reminiscent of PCAnywhere or VNC (hint, hint).
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi all!
this is the nature of the problem i am facing:
i imported a flash media on to a form. i need to put a picture over the flash media. the picture i created had a transparent background. but when i import it into form, it assumes the background of the form. i would want the image to keep the background transparent. how do i do that?
am i following the right approach? would it be better if i created the media with the graphics libraries in C#?
please help...fast...
|
|
|
|
|
Puddle of Blood wrote: but when i import it into form, it assumes the background of the form.
That is correct. Transparency in Windows at the present time is a fudge. Windows does not currently implement proper transparency as Windows Vista will do. The trick that the operating system uses is to ask the control's parent how it would render itself if it didn't have the control on top of it (This works most of the time, but you've found one of the instances where it doesn't). Windows then merges the parent's graphics with the rendering of the control and draws it solidly. In most circumstances the user wouldn't even know the difference. Since your picture control's parent will be the form, it is the form's background that gets rendered in the transparent area of the control.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
hi all!
this is the nature of the problem i am facing:
i imported a flash media on to a form. i need to put a picture over the flash media. the picture i created had a transparent background. but when i import it into form, it assumes the background of the form. i would want the image to keep the background transparent. how do i do that?
am i following the right approach? would it be better if i created the media with the graphics libraries in C#?
please help...fast...
thanks
|
|
|
|
|
Hello,
Is there anybody out there who could give me a hint how i can realize async callbacks from a server application to all connected clients. I tryed several ways solutions based on the articles on this website, but they didn't work fine.
In the scope of my apllication there is the need to tell all clients that something happend. So the client connects via .NET Remoting over TCP to some implemented and marshaled well-known interface. This works pretty fine and easy. So what i need now is that the client could take some real events from the server.
So if there are any ideas and any help i would be very thankful about getting told about it.
Thanks
Frank Friebe
|
|
|
|
|
Simple events should work. Add the event to the server interface, subscribe to it from your clients and it should work. You might get some security exceptions, see this[^] post for more details.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Message Removed
modified 27-May-16 4:08am.
|
|
|
|
|
I have download the tapi 3 application from the code project web site. Its almost working fine, but the problem is that after the call is connected, when the calling party dial any number from his/her phone, no event is fired in our application. Can any one guide me how to know the number dialed on the phone of the caller when the call is established ....
Looking for ur reply ....
Umair Hasan Zubairy
Good Luck
|
|
|
|
|
Hi all,
I need to make input array in asp.net using C#...
the data is comming from database as:id, name, position
the form should display like this...
posiotion will be in textbox..
name position
aa 1
bb 2
cc 3
button(Set Position)
now user can alter the position of names and when click on button, all records should be updated with new position values...
for this I want to make two input arrays like:
<input type='hidden' name='id[]' value='id from database'>
<input type='text' name='position[]' value='value of textbox'>
how can i set the database values to the textboxes and again fetch them in C# to update records with the new values entered by user...
any help will be very much appreciated..
Thanks in advance...
Suman Singh
|
|
|
|
|
Don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
Assuming that you are using the "codebehind" coding style (which is the recommended way) - your CS file linked to your ASPX page will have a class in which the textboxes representing positions (visible ones) as well as the textboxes representing the id-s (invisible ones) should have corresponding "protected" members (of type TextBox). If you do not see any, that may be because you are using the "non-ASP.NET" control "input". Instead, if you use the ASP.NET control TextBox (drag and drop them on your aspx form using the toolbar), the corresponding CS class objects will get auto generated.
That said, there is still way to continue using the HTML "input" controls and represent them in your CS file with corresonding TextBox members - in that case you have to declare the TextBox objects in your CS file by yourself.
All this because you need those CS objects to do what you are trying to do. Once you have them - then in Page_Start, if PostBack is false (first time) - just set the texts of the textboxes with the database values, and if PostBack is true (after Set Position button is clicked) - pick them up and execute your update query. That's it!
And yes, this is indeed cross posting.
Koushik Biswas
|
|
|
|
|
hi
i want to use Progressbar in My Winform App.please help me that how to use it in my Winform app ?
(please give an example like copying file or ... only in winform app (not web base apps or web service or ...))
regards ...
|
|
|
|
|
msdn.microsoft.com will show you how to use a progress bar. The key point is, you can't use one for a process that you call atomically ( i.e. you can't call File.Copy and show a progress bar while that one statement runs, at least not accurately ) In either case, you need to do your action in a worker thread so that you UI is updated properly.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I new to C# and I are looking to write an app that will enumerate a range of IP addresses on a network IE: 192.168.1.1 to 192.168.1.254. I am having trouble with converting an IP address string to int32 and vice versa as the string is in a dotted decimal notation IE: 192.168.1.1
Any suggestions?
Many thanks in advance
|
|
|
|
|
You can call the split method on the string to get an array of strings, one for each number. Then convert.ToInt16 will work fine.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi guys,
how can i get the window name of a program (e.g. MS Word) programatically? im using c#, and im using this in my program that ends/terminates an application based on data returned by some queries from a database.
i have no problems if i start a fresh instance of MS Word since i can have the window name hardcoded in my program (the default window name is "Document1 - Microsoft Word"), thus i can still close that application using my code. the problem is that when i open an existing file (thus the window name is dependent on the filename specified by the user), now when this happens, i cannot close the application since i cant get the window name dynamically. pls help.. tnx
|
|
|
|
|
Hi,
First get the active word application and iterate thru the Documents.
private void IterateWordDocs()
{
//Iterate docs
foreach (Microsoft.Office.Interop.Word.Document doc in WordApp.Documents)
{
//Your doc name
doc.Name == "YourDocName"
}
}
Regards
Gokul
|
|
|
|
|
You can use Process.GetProcesses to get the Process instances associated with MS Word and then use MainWindowTitle[^] to get the window titles.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi All,
I am interested in communicating with the USB device. I appriciate any code that would just enum all the USB deviced connection on my comp.
|
|
|
|