|
Thank you. I will post the message in the correct forum.
|
|
|
|
|
bhanu_8509 wrote: I will post the message in the correct forum.
Well you might want to check out that link i provided in my last reply. It may go a long way towards answering your question.
led mike
|
|
|
|
|
I have a little SQL query editor, with a TextBox and a DataGridView, for the query text and the results, respectively. I have these on a SplitContainer. I have no timers, nothing else.
My text in the TextBox keeps disappearing! If I highlight it, it's there, and sometimes when I click in the TextBox, it reappears, but much of the time it remains invisible. Any suggestions as to the cause of this will be most appreciated.
|
|
|
|
|
Hi,
maybe something is wrong with your selection colors?
|
|
|
|
|
All standard. Everything else works.
|
|
|
|
|
Is your textbox multiline? This can cause no end of fun if you expect single line behaviour.
Alan.
|
|
|
|
|
It is multiline, and large. The text literally just becomes invisible!
|
|
|
|
|
This is quite strange. I deleted and recreated the TextBox in question, with exactly the same configuration, and the problem disappeared.
|
|
|
|
|
See that come from holding your tongue correctly when adding the textbox. Peice of cake.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i have one dataset that contains 2 tables
table 1 is{1,2,3}
table 2 is {4,3}
i want to display in a form the following
[1,2,4]
how could i join the 2 tables
and when i press the next button the records in both tables must
move to the next record
please help me with this
|
|
|
|
|
ashrafhakami wrote: how could i join the 2 tables
Hard to say, based on this. Is there a column in common you can use to do a join ? If not, how do you know which 4 goes with which 1 and 2 ? Is 3 a column in common you can join on ?
ashrafhakami wrote: and when i press the next button the records in both tables must
move to the next record
If you get the SQL right you will have one table with the two lots of data merged.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanx for your passin by Christian Graus
i will explain more
in table one there are three columns which are
{ drug_name,drug_no,type_no}
in the second table
{ type, type_no}
in the form i need to display the following
drug_name:for example viagra
drug_no:4
type:tablet
when i move to the next record the type must change according to the drug_name and drug_no
for example the next record in the table one is
{Banadol,5,2}
and the second table is
{syrup,2}
i want to display in the form the followin
drug_name:Banadol
drug_np:2
type:syrup.
i did in my cod the followin
in the form_load the followin
for the first table where con is the connection oledb
dim sql as string="select * from drug"
cmd.connection= con.....
cmd.commandtext= sql
dataAdapter.fill(dataset,"drug")
txdrug_name.databindings.add("text",dataset,"drug.drug_name")
txdrug_no.databindings.add("text",dataset,"drug.drug_no")
and the second table is
dim sql2 as string="select type from type where type_no=1 "
cmd.connection= con.....
cmd.commandtext= sql2
dataAdapter2.fill(dataset,"type")
txdrug_type.databindings.add("text",dataset,"type.type")
and every thing was ok when displayed
but when i move to the next record the type never chang
even if i changed the sql (="select type from type where type_no=1 "
)
i even tried to assgin the type _no for table one to a variable to be like this ="select type from type where type_no=variable "
but i failed
please help me it is the a cadimic project
|
|
|
|
|
What you need is a single query:
select drug_name,drug_no, type
from table1 t1 inner join table2 t2 on t2.type_no = t1.type_no
where table1 is the drug_name/number tabler and table2 is the type_no/type table
and then
dim sql as string="{as shown above}"
cmd.connection= con.....
cmd.commandtext= sql
dataAdapter.fill(dataset,"drug")
txdrug_name.databindings.add("text",dataset,"drug.drug_name")
txdrug_no.databindings.add("text",dataset,"drug.drug_no")
txdrug_type.databindings.add("text",dataset,"drug.type")
Its called a table join. I suggest yuo try reading up on sql, otherwise your application is really going to suffer.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I would like to know how to use a progress bar to keep track of video during playback, does anyone know how or can point me to the right direction?
|
|
|
|
|
I suspect you will run into the infernal problem of the display not updating as your UI thread will be busy running the video, but you could try running a normal progress bar maybe updated by a timer started and stopped from the play/pause/stop events of your video player control.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
If your video control has a position property, you can set a timer and set the bar based on that, so it never goes out of sync
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
I would like to create a module that manages ZOrders of windows in a system so that a particular group of windows (as identified by their Captions or Window Classes) are always together in zorder.
This means no external apps (like notepad or Task Manager) should "interfere" with them. So far the approaches i`ve tried are :
1. Using Windows CBT Hooks to get Activation notifications for all windows in the system. Then based on which windows is being activated i do zorder management
2. Use the SetWinEvent Hook API , so whenever Foreground window changes i do my zorder management. But this is done "after" the foreground change has occured so to bypass it i use AttachThreadInput on the current foreground window, set my app window as the new Foreground window and then detach.
Issue is ZOrder cant be maintained reliably and this sometimes causes my apps to hang.
3. Make all my app windows as Owned Windows of a single Owner window, but with this the internal ZOrder gets messed up if i show/hide my app windows. Is there any extra step i should take internally in my app windows, or issue some Messages form my Owner window before showing/activating any apps ?
4. A general question was : If I give SetWindowPos with the handle of a hidden window, or specify it as the hWndAfter parameter , what effect will this have on the ZOrder ?
All my windows are TopLevel, Non-TopMost windows and they can create their own custom MessageBox and Dialogs (TopMost , Non-Topmost). So whatever mechanism i go with should be extensible to these message boxes too.
Are there any other ways to this task ? Something better or faster ?
I`ll be happy to provide more details if required.
Any help and suggestions are most welcome.
Thanks in advance.
|
|
|
|
|
HI,
I am getting the above msg when I try & close a MDI Child form in its form load method, as there is no data to display from SQL, so I catch the error, as below:-
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Sorry there has been an error" );
this.Close();
}
The message appears when it trys to close the form - has anyone any idea's.
The child form is opened from the MDI form as so:-
FrmUserList frmUserList = new FrmUserList(_isLiveConnection);
frmUserList.MdiParent = this;
frmUserList.Show();
Lady Programmers are a rare breed!
|
|
|
|
|
I have a collection of business objects bound to a DataGridView, and I would like changes made to my BO's through the grid to be persisted as they happen, or as close as possible to as they happen. I think a per row basis is fine, so which is the best event to handle in which to request that changes are persisted? At the moment I'm using RowValidated, so whenever a row is changed, it persists. Should I continue using this event?
|
|
|
|
|
|
Thanks Mike. I already implement IPropertyChanged, and my grid handles it nicely, but I want the grid to signal an object that a whole object, i.e. row, commit from the UI to the model, is mandated, much like editing records in Access. Until the user moves off a row, the grid should be able to restore the original values for that row.
|
|
|
|
|
Brady Kelly wrote: Until the user moves off a row, the grid should be able to restore the original values for that row.
Don't you need an Undo implementation for that. I mean your objects are bound right? So the original values are gone on a Cell by Cell basis right?
led mike
|
|
|
|
|
I'm looking in the LINQ to SQL DataContext neighbourhood for something that might help me there.
|
|
|
|
|
hi guys,
i am trying to upload a mp3 file from local disk to a remote server using FtpWebrequest. Everything went fine and the file is getting uploaded onto the remote server, but when i try to play that the file has no content in that, i got to a conclusion that it is not encoded properly during upload and here's where i request for someone's help as i dnt know how to encode a mp3 file while uploading
here is my code pls go thru and if you know where the prob is pls do suggest me.
Dim hostname As String = "ftp://ftp.domain.com/folder/"<br />
<br />
Dim fileName As String = path.Substring(path.LastIndexOf("\") + 1)<br />
Dim objMp3Info As New Monotic.Multimedia.MP3.MP3Info<br />
objMp3Info.Filename = path<br />
<br />
Dim username As String = "username"<br />
Dim password As String = "password"<br />
<br />
<br />
Dim request As FtpWebRequest = DirectCast(WebRequest.Create(hostname + "/" + fileName), FtpWebRequest)<br />
request.UseBinary = True<br />
request.Method = WebRequestMethods.Ftp.UploadFile<br />
<br />
request.Credentials = New NetworkCredential("username", "password")<br />
Dim sourceStream As New StreamReader(path)<br />
<br />
Dim fileContents As Byte() = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd()) ----- this is where i need someones help<br />
sourceStream.Close()<br />
<br />
request.ContentLength = fileContents.Length<br />
<br />
Dim requestStream As Stream = request.GetRequestStream()<br />
requestStream.Write(fileContents, 0, fileContents.Length)<br />
<br />
requestStream.Close()<br />
<br />
Dim response As FtpWebResponse = DirectCast(request.GetResponse(), FtpWebResponse)<br />
MessageBox.Show("File Uploaded Sucessfully, status {0}", response.StatusDescription)
Thanks in advance...
Regards
Srinivas
|
|
|
|
|
Hello,
I am presently creating a list box control for our custom gui application using C# .
The dll is compiled using 1.1 compact framework SDK and is run on windows XP/CE embedded..
The new list box control has to be modified to use custom graphics.. the requirement right now is to replace the windows standard scroll box with the custom images provided..however since we are using compact SDK many of the properties related to the scroll box are not available. Does anyone have an idea a work around .
Regards
Vivian Neil Fernandes
|
|
|
|