|
I tried this piece of code in an empty vb.net app, and it seems to supress the window movement.
|
|
|
|
|
true but I don't think that that is its main purpuse I believe that the movement supressing is a 'side-affect' beceause the code is run continously.
also there is nowhere that this would be needed (the movement restriction) so I doubt that my ex co-worker implemented it for this.
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Here's the link[^] to the documentation on the WM_SYSCOMMAND notification message. It clearly shows that SC_MOVE is used to move the window. I've verified that both constants he used (0x112 and 0xF010) are correct and that, yes, the code stops the window its in from being moved. It's the only thing this code does.
|
|
|
|
|
thank you very much
now I know why this code is implemented
appearently the component we use (datawindows) (I know it sucks, wish I knew this 7 months ago, but I'm trying to get it thrown out, unfortanatly for this project that's not possible) acts as a window and can be moved around on the parent form so he supresses this using this code.
don't really like it (because this programme will be run on a terminal server so any code that runs (olmost) coninuasly is bad) but don't have a better solution so I guess I'll just let it be (for the moment)
thank you again
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
I´m not shure about this, but I think the code does not run continuously, only when an the user tries to move the window, windows will put the "move window" message in the queue, and then this code is executed. And when intercepting the windows move, there is less instead of more traffic)
|
|
|
|
|
i want to display record in datareport with dynamic
dim con as adodb.connection
dim cmd as adodb.recordset
set con=new adodb.connection
set rs=new adodb.recordset
con.open"dsn=dsnname ( data base msaccess)
rs.open"select * from emp where empname='" & text.text & "',con,1,2
Datareport1.datasoure=rs
datareport1.show
i follow the above coding but the error display (invalid datasource and type mismatch)
iam not user the (data source property)
kindly send reply
|
|
|
|
|
It would appear that your DSN is not valid in some way. Since you're using a DSN, and not a full connection string, it's impossible to tell you what's wrong with it.
|
|
|
|
|
How can i write the ode for tab pages?means when i click the tab then the tab page will display,so what is the process?
Thanks,
Kalyan
|
|
|
|
|
|
I need to convert a string to a DataGridViewCell. I tried " CType(StringHere, DataGridViewCell) " but that does not work. If anybody know anything about this, please reply as this is extremely urgent. Thanks!
|
|
|
|
|
Noone cares how "urgent" it is. We get to answering posts in our own time, whenever we get the chance. This is an all volunteer effort. Besides, what makes you think your problem, that you want answered for FREE, is any more important that any other problem he on the boards?
To answer your question - you can't do that. It's impossible to convert a string to an object. What are you trying to do with this?
|
|
|
|
|
I am trying to get text from a textbox in one form and post it to a Label in another form.
So far I have:
Public Class properties
Dim temForm1 As Form1
Private Sub properties_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label8.Text = temForm1.tbFilename.Text
End Sub
End Class
The code checks out until you run the application and then it comes up with some type of error.
Can anyone tell me how to solve this problem and get the text from my textbox in Form1 to the label in my Properties form?
Thanks in Advanced!
|
|
|
|
|
It's a bit difficult to diagnose the problem without an error, but the only thing i can think of is that your form's instance hasn't been instantiated properly.
Try the following:
---- Main form click event:
Dim frm2 As New Form1()
frm2.Show()
Label8.Text = frm2.tbFilename.Text
frm2.Close()
If that doesn't work, then you're doing something else wrong that you haven't specified.
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
i need the text in the textbox, which is in form1, to load into the label, which is in the properties form, when the properties form is opened from a menustrip.
|
|
|
|
|
You need to pass the value of the textbox to the new form when you instantiate it
oFrm = New frmSource(Text1.text)
Then in the sub new on the form you put the text into the label
Sub New(ByVal sText As String)<br />
<br />
' This call is required by the Windows Form Designer.<br />
InitializeComponent()<br />
<br />
' Add any initialization after the InitializeComponent() call.<br />
Label1.text = sText<br />
End Sub
Quote from Great Outdoors:
its a confident traveller who farts in India
|
|
|
|
|
Wow - I spent two hours fighting bad internet and you're still not got a good answer
Member 3694999 wrote: it comes up with some type of error.
This is ridiculous. IF you want help, tell us the error message.
Member 3694999 wrote: im temForm1 As Form1
This may work, IF you set this to be the form1 instance that is visible on your screen. If not, it's a waste of time, and my guess is you got a null reference because you gave it no value at all
What you need to do is read the article on this site on passing values between forms, especially the section on delegates. Use delegates always to pass values between forms. Every other way is a hack
Christian Graus - Microsoft MVP - C++
"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,
There was a topic posted last week about this same problem, but I think mine is a bit more specific.
Now, I want to get files from rapidshare using my premium account, however haven't the first clue where to start. There are plenty of articles on the web about how to download binary files over http, but its the requesting data from rapidshare and providing the login credentials that I can't find anything on. I *think* I need to use NetworkCredential, but again, haven't a clue where to start with this one.
If anyone could give me any pointers or send me in the right direction it would be much appreciated.
Thanks.
John.
|
|
|
|
|
I'm writing an application that manipulates various office documents, but am having trouble with Fields containting dates that automatically update.
All my efforts so far are too late in the process. As soon as I perform a wrd.Document.Open(filename), the fields have updated.
Is there a way to open a word document and unlink, or lock, the fields before they update?
Cheers,
Anthony
|
|
|
|
|
atregent wrote: Is there a way to open a word document and unlink, or lock, the fields before they update?
This question is geared more towards a Word-centric forum than VB.NET. AFAIK, there's no way to stop the field from updating, but I could be wrong.
|
|
|
|
|
how can i change the ruler measurement in vb.net 2003 crystal report???
thank you in advance!!!
jyn
|
|
|
|
|
Do I have to Import any namespaces when I set up a TableAdapter and/or DataTable?.
I am having a problem, where if I drag and drop a Table Adapter to the form then if I do anything at all the form shows errors. The errors are in designer generated code that I did not change. I am wondering about something else. If this is not as simple as just importing the right namespace or class, then it might be because I started this program in Visual Basic 2003. Then I let Visual Basic 2005 do programatic changes to it, so that it would work with VB 2005.
This does not happen when I remove the TableAdapter. I downloaded 2008, but am not sure if I want to use it yet. There has got to be some bugs.
Is there another way to do this?
|
|
|
|
|
The DataTable class lives inside a namespace of System.Data
Try creating an untyped DataTable in code manually to see if it recognizes the object successfully without errors. If it does, then the problem lies elsewhere...
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
I need to know how to get the column names of a database. I want to offer my users the ability to choose a database from a list of databases and then have them select what columns they want. I want to know how to get the column names and store them in a combobox. Does anyone know how to do this or where I can find an article? Thank you.
|
|
|
|
|
This is from something I wrote a while back for checking the structure of an Access table, it might be of some help to point you in the right direction:
Dim tblExport As DataTable<br />
Dim TableName as string = "tblTest"<br />
tblExport = TestConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, TableName, "TABLE"})
|
|
|
|
|
The Microsoft SQL Server equivalent is:
SELECT syscolumns.name
FROM syscolumns INNER JOIN sysobjects ON syscolumns.id = sysobjects.id
WHERE sysobjects.name = ''
Daniel Minnaar
.NET Solutions Architect
|
|
|
|